From c941d855dc32ec44107cb863596fa385c7aed015 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 6 Aug 2013 14:44:40 +0200 Subject: Various typos and tabs adjustments --- application/config/doctypes.php | 12 ++++++------ application/config/smileys.php | 4 ++-- application/config/user_agents.php | 2 +- index.php | 2 +- system/core/Common.php | 4 ++-- system/core/Input.php | 2 +- system/core/Router.php | 4 ++-- system/database/drivers/oci8/oci8_driver.php | 2 +- system/database/drivers/oci8/oci8_result.php | 2 +- system/libraries/Upload.php | 2 +- user_guide_src/source/changelog.rst | 10 +++++----- user_guide_src/source/helpers/smiley_helper.rst | 6 +++--- user_guide_src/source/installation/upgrade_300.rst | 2 +- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/application/config/doctypes.php b/application/config/doctypes.php index fe5420263..b1a8959c2 100644 --- a/application/config/doctypes.php +++ b/application/config/doctypes.php @@ -26,19 +26,19 @@ */ $_doctypes = array( - 'xhtml11' => '', + 'xhtml11' => '', 'xhtml1-strict' => '', 'xhtml1-trans' => '', 'xhtml1-frame' => '', 'xhtml-basic11' => '', - 'html5' => '', + 'html5' => '', 'html4-strict' => '', 'html4-trans' => '', 'html4-frame' => '', - 'mathml1' => '', - 'mathml2' => '', - 'svg10' => '', - 'svg11' => '', + 'mathml1' => '', + 'mathml2' => '', + 'svg10' => '', + 'svg11' => '', 'svg11-basic' => '', 'svg11-tiny' => '', 'xhtml-math-svg-xh' => '', diff --git a/application/config/smileys.php b/application/config/smileys.php index 4b253098b..3c49c469e 100644 --- a/application/config/smileys.php +++ b/application/config/smileys.php @@ -30,7 +30,7 @@ | SMILEYS | ------------------------------------------------------------------- | This file contains an array of smileys for use with the emoticon helper. -| Individual images can be used to replace multiple simileys. For example: +| Individual images can be used to replace multiple smileys. For example: | :-) and :) use the same image replacement. | | Please see user guide for more info: @@ -84,7 +84,7 @@ $smileys = array( ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), ':snake:' => array('snake.gif', '19', '19', 'snake'), ':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'), - ':question:' => array('question.gif', '19', '19', 'question') // no comma after last item + ':question:' => array('question.gif', '19', '19', 'question') ); diff --git a/application/config/user_agents.php b/application/config/user_agents.php index 88ab06358..0c8605820 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -182,7 +182,7 @@ $mobiles = array( 'operamini' => 'Opera Mini', 'opera mini' => 'Opera Mini', 'opera mobi' => 'Opera Mobile', - 'fennec' => 'Firefox Mobile', + 'fennec' => 'Firefox Mobile', // Other 'digital paths' => 'Digital Paths', diff --git a/index.php b/index.php index f93cadb9d..3040ef080 100755 --- a/index.php +++ b/index.php @@ -77,7 +77,7 @@ switch (ENVIRONMENT) *--------------------------------------------------------------- * * This variable must contain the name of your "system" folder. - * Include the path if the folder is not in the same directory + * Include the path if the folder is not in the same directory * as this file. */ $system_path = 'system'; diff --git a/system/core/Common.php b/system/core/Common.php index b95a05db9..b9e318394 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -556,8 +556,8 @@ if ( ! function_exists('_exception_handler')) /** * Exception Handler * - * This is the custom exception handler that is declaired at the top - * of Codeigniter.php. The main reason we use this is to permit + * This is the custom exception handler that is declared at the top + * of CodeIgniter.php. The main reason we use this is to permit * PHP errors to be logged in our own log files since the user may * not have access to server logs. Since this function * effectively intercepts PHP errors, however, we also need diff --git a/system/core/Input.php b/system/core/Input.php index 0ef81128e..6f184a3ca 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -47,7 +47,7 @@ class CI_Input { public $ip_address = FALSE; /** - * User agent strin + * User agent string * * @var string */ diff --git a/system/core/Router.php b/system/core/Router.php index 989ae542e..0f7278ae6 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -351,10 +351,10 @@ class CI_Router { return $this->_set_request(explode('/', $this->routes[$uri])); } - // Loop through the route array looking for wild-cards + // Loop through the route array looking for wildcards foreach ($this->routes as $key => $val) { - // Convert wild-cards to RegEx + // Convert wildcards to RegEx $key = str_replace(array(':any', ':num'), array('[^/]+', '[0-9]+'), $key); // Does the RegEx match? diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 93e62b4dd..020a3a4ba 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -18,7 +18,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index fd1d28787..ce09b62bc 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -18,7 +18,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 85428044d..15eb74bd5 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -463,7 +463,7 @@ class CI_Upload { } // Are the image dimensions within the allowed size? - // Note: This can fail if the server has an open_basdir restriction. + // Note: This can fail if the server has an open_basedir restriction. if ( ! $this->is_allowed_dimensions()) { $this->set_error('upload_invalid_dimensions'); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8b5798751..a987c507d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -75,7 +75,7 @@ Release Date: Not Released - :php:func:`anchor_popup()` will now fill the *href* attribute with the URL and its JS code will return FALSE instead. - Added JS window name support to the :php:func:`anchor_popup()` function. - Added support (auto-detection) for HTTP/1.1 response code 303 in :php:func:`redirect()`. - - Changed :php:func:`redirect()` to only choose the **refresh** method only on IIS servers, instead of all servers on Windows (when **auto** is used). + - Changed :php:func:`redirect()` to choose the **refresh** method only on IIS servers, instead of all servers on Windows (when **auto** is used). - Changed :php:func:`anchor()`, :php:func:`anchor_popup()`, and :php:func:`redirect()` to support protocol-relative URLs (e.g. *//ellislab.com/codeigniter*). - Added an optional second parameter to both :php:func:`base_url()` and :php:func:`site_url()` that allows enforcing of a protocol different than the one in the *base_url* configuration setting. @@ -515,7 +515,7 @@ Bug fixes for 3.0 - Fixed a bug (#784, #861) - :doc:`Database Forge ` method ``create_table()`` used to accept constraints for MSSQL/SQLSRV integer-type columns. - Fixed a bug (#706) - SQLSRV/MSSSQL didn't escape field names. - Fixed a bug (#1452) - ``protect_identifiers()`` didn't properly detect identifiers with spaces in their names. -- Fixed a bug where ``protect_identifiers()`` ignored it's extra arguments when the value passed to it is an array. +- Fixed a bug where ``protect_identifiers()`` ignored its extra arguments when the value passed to it is an array. - Fixed a bug where ``_has_operator()`` didn't detect BETWEEN. - Fixed a bug in :doc:`Query Builder `'s ``join()`` method where it failed with identifiers containing dashes. - Fixed a bug (#1264) - :doc:`Database Forge ` and :doc:`Database Utilities ` didn't update/reset the databases and tables list cache when a table or a database is created, dropped or renamed. @@ -555,7 +555,7 @@ Bug fixes for 3.0 - Fixed a bug where the :doc:`Session Library ` accepted cookies with *last_activity* values being in the future. - Fixed a bug (#1897) - :doc:`Email Library ` triggered PHP E_WARNING errors when *mail* protocol used and ``to()`` is never called. - Fixed a bug (#1409) - :doc:`Email Library ` didn't properly handle multibyte characters when applying Q-encoding to headers. -- Fixed a bug where :doc:`Email Library ` didn't honor it's *wordwrap* setting while handling alternative messages. +- Fixed a bug where :doc:`Email Library ` didn't honor its *wordwrap* setting while handling alternative messages. - Fixed a bug (#1476, #1909) - :doc:`Pagination Library ` didn't take into account actual routing when determining the current page. - Fixed a bug (#1766) - :doc:`Query Builder ` didn't always take into account the *dbprefix* setting. - Fixed a bug (#779) - :doc:`URI Class ` didn't always trim slashes from the *uri_string* as shown in the documentation. @@ -602,7 +602,7 @@ Bug fixes for 3.0 - Fixed a bug (#2490) - :doc:`Database Class ` method ``query()`` returning boolean instead of a result object for PostgreSQL-specific *INSERT INTO ... RETURNING* statements. - Fixed a bug (#249) - :doc:`Cache Library ` didn't properly handle Memcache(d) configurations with missing options. - Fixed a bug (#180) - :php:func:`config_item()` didn't take into account run-time configuration changes. -- Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exits. +- Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exists. - Fixed a bug (#2560) - :doc:`Form Helper ` function :php:func:`form_open()` set the 'method="post"' attribute only if the passed attributes equaled an empty string. - Fixed a bug (#2585) - :doc:`Query Builder ` methods ``min()``, ``max()``, ``avg()``, ``sum()`` didn't escape field names. @@ -684,7 +684,7 @@ Bug fixes for 2.1.1 - Fixed a bug (#538) - Windows paths were ignored when using the :doc:`Image Manipulation Library ` to create a new file. - Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found. - Fixed a bug - CSRF cookie value was allowed to be any (non-empty) string before being written to the output, making code injection a risk. -- Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite. +- Fixed a bug (#726) - PDO put a 'dbname' argument in its connection string regardless of the database platform in use, which made it impossible to use SQLite. - Fixed a bug - ``CI_DB_pdo_driver::num_rows()`` was not returning properly value with SELECT queries, cause it was relying on ``PDOStatement::rowCount()``. - Fixed a bug (#1059) - ``CI_Image_lib::clear()`` was not correctly clearing all necessary object properties, namely width and height. diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst index 3925f8b1a..cfd52ffbc 100644 --- a/user_guide_src/source/helpers/smiley_helper.rst +++ b/user_guide_src/source/helpers/smiley_helper.rst @@ -17,7 +17,7 @@ This helper is loaded using the following code:: Overview ======== -The Smiley helper has a renderer that takes plain text simileys, like +The Smiley helper has a renderer that takes plain text smileys, like :-) and turns them into a image representation, like |smile!| It also lets you display a set of smiley images that when clicked will @@ -44,7 +44,7 @@ The Controller -------------- In your **application/controllers/** directory, create a file called -smileys.php and place the code below in it. +Smileys.php and place the code below in it. .. important:: Change the URL in the :php:func:`get_clickable_smileys()` function below so that it points to your smiley folder. @@ -156,7 +156,7 @@ string, the second must contain the URL to your smiley folder Example:: - $str = 'Here are some simileys: :-) ;-)'; + $str = 'Here are some smileys: :-) ;-)'; $str = parse_smileys($str, "http://example.com/images/smileys/"); echo $str; diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 2e73ad1ce..89835585c 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -207,7 +207,7 @@ If your application relies on IF EXISTS, you'll have to change its usage. // Produces DROP TABLE IF EXISTS `table_name` $this->dbforge->drop_table('table_name', TRUE); -.. note:: The given example users MySQL-specific syntax, but it should work across +.. note:: The given example uses MySQL-specific syntax, but it should work across all drivers with the exception of ODBC. *********************************************************** -- cgit v1.2.3-24-g4f1b From 40d124924ea331c6a57ab1b3f743299a41eb3f0c Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 6 Aug 2013 14:46:00 +0200 Subject: Replace php_sapi_name() function with PHP_SAPI constant exact same behavior but faster, shorter --- system/core/Common.php | 2 +- system/core/Input.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/core/Common.php b/system/core/Common.php index b9e318394..28c60832c 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -538,7 +538,7 @@ if ( ! function_exists('set_status_header')) $server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : FALSE; - if (strpos(php_sapi_name(), 'cgi') === 0) + if (strpos(PHP_SAPI, 'cgi') === 0) { header('Status: '.$code.' '.$text, TRUE); } diff --git a/system/core/Input.php b/system/core/Input.php index 6f184a3ca..1e67ce183 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -872,7 +872,7 @@ class CI_Input { */ public function is_cli_request() { - return (php_sapi_name() === 'cli' OR defined('STDIN')); + return (PHP_SAPI === 'cli' OR defined('STDIN')); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b