summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authornisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in>2013-03-21 09:59:46 +0100
committernisheeth-barthwal <nisheeth.barthwal@nbaztec.co.in>2013-03-21 09:59:46 +0100
commit76f42d9dcd42bf90c407f151d04ef207c8deebdf (patch)
treec98568cd18540f2df23881ceed82cf9f1616d4c4 /user_guide_src/source
parent7d10006a0001ff0e7d82ec994b1e9cbb63683ffc (diff)
parent13f6eabafa655828a8c09b4ae0a58a2e3776c269 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst2
-rw-r--r--user_guide_src/source/general/common_functions.rst2
-rw-r--r--user_guide_src/source/general/errors.rst21
-rw-r--r--user_guide_src/source/general/reserved_names.rst18
4 files changed, 37 insertions, 6 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index d805c8f10..a9c420af1 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -484,7 +484,7 @@ Bug fixes for 3.0
- Fixed a bug - :doc:`DB result <database/results>` method ``list_fields()`` didn't reset its field pointer for the *mysql*, *mysqli* and *mssql* drivers.
- Fixed a bug (#73) - :doc:`Security Library <libraries/security>` method ``sanitize_filename()`` could be tricked by an XSS attack.
- Fixed a bug (#2211) - :doc:`Migration Library <libraries/migration>` extensions couldn't execute ``CI_Migration::__construct()``.
-- Fixed a bug (#2255) - :doc:`Email Library <libraries/email>` didn't apply ``smtp_timeout``to socket reads and writes.
+- Fixed a bug (#2255) - :doc:`Email Library <libraries/email>` didn't apply ``smtp_timeout`` to socket reads and writes.
- Fixed a bug (#2239) - :doc:`Email Library <libraries/email>` improperly handled the Subject when used with ``bcc_batch_mode`` resulting in E_WARNING messages and an empty Subject.
- Fixed a bug (#2234) - :doc:`Query Builder <database/query_builder>` didn't reset JOIN cache for write-type queries.
- Fixed a bug (#2298) - :doc:`Database Results <database/results>` method `next_row()` kept returning the last row, allowing for infinite loops.
diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst
index 7917d3239..79bd9b459 100644
--- a/user_guide_src/source/general/common_functions.rst
+++ b/user_guide_src/source/general/common_functions.rst
@@ -31,7 +31,7 @@ version of PHP is lower than the supplied version number.
is_really_writable()
====================
-.. php:function:: is_really_writeable($file)
+.. php:function:: is_really_writable($file)
:param string $file: File path
:returns: bool
diff --git a/user_guide_src/source/general/errors.rst b/user_guide_src/source/general/errors.rst
index 8c941aadb..441cedb80 100644
--- a/user_guide_src/source/general/errors.rst
+++ b/user_guide_src/source/general/errors.rst
@@ -18,6 +18,15 @@ procedural interfaces that are available globally throughout the
application. This approach permits error messages to get triggered
without having to worry about class/function scoping.
+CodeIgniter also returns a status code whenever a portion of the core
+calls ``exit()``. This exit status code is separate from the HTTP status
+code, and serves as a notice to other processes that may be watching of
+whether the script completed successfully, or if not, what kind of
+problem it encountered that caused it to abort. These values are
+defined in *application/config/constants.php*. While exit status codes
+are most useful in CLI settings, returning the proper code helps server
+software keep track of your scripts and the health of your application.
+
The following functions let you generate errors:
show_error()
@@ -36,7 +45,12 @@ following error template::
application/errors/error_general.php
The optional parameter ``$status_code`` determines what HTTP status
-code should be sent with the error.
+code should be sent with the error. If ``$status_code`` is less than 100,
+the HTTP status code will be set to 500, and the exit status code will
+be set to ``$status_code + EXIT__AUTO_MIN``. If that value is larger than
+``EXIT__AUTO_MAX``, or if ``$status_code`` is 100 or higher, the exit
+status code will be set to ``EXIT_ERROR``. You can check in
+*application/config/constants.php* for more detail.
show_404()
==========
@@ -53,8 +67,9 @@ the following error template::
application/errors/error_404.php
The function expects the string passed to it to be the file path to the
-page that isn't found. Note that CodeIgniter automatically shows 404
-messages if controllers are not found.
+page that isn't found. The exit status code will be set to ``EXIT_UNKNOWN_FILE``.
+Note that CodeIgniter automatically shows 404 messages if controllers are
+not found.
CodeIgniter automatically logs any ``show_404()`` calls. Setting the
optional second parameter to FALSE will skip logging.
diff --git a/user_guide_src/source/general/reserved_names.rst b/user_guide_src/source/general/reserved_names.rst
index d91292363..ccc17d61b 100644
--- a/user_guide_src/source/general/reserved_names.rst
+++ b/user_guide_src/source/general/reserved_names.rst
@@ -25,15 +25,21 @@ your controller any of these:
Functions
---------
+- :php:func:`is_php()`
- :php:func:`is_really_writable()`
- ``load_class()``
+- ``is_loaded()``
- ``get_config()``
- :php:func:`config_item()`
- :php:func:`show_error()`
- :php:func:`show_404()`
- :php:func:`log_message()`
+- :php:func:`set_status_header()`
- :php:func:`get_mimes()`
- :php:func:`html_escape()`
+- :php:func:`remove_invisible_characters()`
+- :php:func:`is_https()`
+- :php:func:`function_usable()`
- :php:func:`get_instance()`
- ``_exception_handler()``
- ``_stringify_attributes()``
@@ -66,4 +72,14 @@ Constants
- FOPEN_WRITE_CREATE
- FOPEN_READ_WRITE_CREATE
- FOPEN_WRITE_CREATE_STRICT
-- FOPEN_READ_WRITE_CREATE_STRICT \ No newline at end of file
+- FOPEN_READ_WRITE_CREATE_STRICT
+- EXIT_SUCCESS
+- EXIT_ERROR
+- EXIT_CONFIG
+- EXIT_UNKNOWN_FILE
+- EXIT_UNKNOWN_CLASS
+- EXIT_UNKNOWN_METHOD
+- EXIT_USER_INPUT
+- EXIT_DATABASE
+- EXIT__AUTO_MIN
+- EXIT__AUTO_MAX \ No newline at end of file