summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Cache/Cache.php30
-rw-r--r--system/libraries/Cache/drivers/Cache_apc.php24
-rw-r--r--system/libraries/Cache/drivers/Cache_file.php40
-rw-r--r--system/libraries/Calendar.php18
-rw-r--r--system/libraries/Cart.php22
-rw-r--r--system/libraries/Driver.php10
-rw-r--r--system/libraries/Email.php46
-rw-r--r--system/libraries/Encrypt.php2
-rw-r--r--system/libraries/Form_validation.php32
-rw-r--r--system/libraries/Ftp.php8
-rw-r--r--system/libraries/Image_lib.php118
-rw-r--r--system/libraries/Javascript.php12
-rw-r--r--system/libraries/Log.php8
-rw-r--r--system/libraries/Pagination.php18
-rw-r--r--system/libraries/Parser.php18
-rw-r--r--system/libraries/Profiler.php48
-rw-r--r--system/libraries/Session.php30
-rw-r--r--system/libraries/Sha1.php8
-rw-r--r--system/libraries/Table.php12
-rw-r--r--system/libraries/Trackback.php16
-rw-r--r--system/libraries/Typography.php36
-rw-r--r--system/libraries/Unit_test.php2
-rw-r--r--system/libraries/Upload.php28
-rw-r--r--system/libraries/User_agent.php2
-rw-r--r--system/libraries/Xmlrpc.php90
-rw-r--r--system/libraries/Xmlrpcs.php44
-rw-r--r--system/libraries/Zip.php12
-rw-r--r--system/libraries/javascript/Jquery.php218
28 files changed, 476 insertions, 476 deletions
diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php
index 61e7aa761..938c80857 100644
--- a/system/libraries/Cache/Cache.php
+++ b/system/libraries/Cache/Cache.php
@@ -10,22 +10,22 @@
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 2.0
- * @filesource
+ * @filesource
*/
// ------------------------------------------------------------------------
/**
- * CodeIgniter Caching Class
+ * CodeIgniter Caching Class
*
* @package CodeIgniter
* @subpackage Libraries
* @category Core
* @author ExpressionEngine Dev Team
- * @link
+ * @link
*/
class CI_Cache extends CI_Driver_Library {
-
+
protected $valid_drivers = array(
'cache_apc', 'cache_file', 'cache_memcached', 'cache_dummy'
);
@@ -33,7 +33,7 @@ class CI_Cache extends CI_Driver_Library {
protected $_cache_path = NULL; // Path of cache files (if file-based cache)
protected $_adapter = 'dummy';
protected $_backup_driver;
-
+
// ------------------------------------------------------------------------
/**
@@ -52,16 +52,16 @@ class CI_Cache extends CI_Driver_Library {
// ------------------------------------------------------------------------
/**
- * Get
+ * Get
*
- * Look for a value in the cache. If it exists, return the data
+ * Look for a value in the cache. If it exists, return the data
* if not, return FALSE
*
- * @param string
+ * @param string
* @return mixed value that is stored/FALSE on failure
*/
public function get($id)
- {
+ {
return $this->{$this->_adapter}->get($id);
}
@@ -112,7 +112,7 @@ class CI_Cache extends CI_Driver_Library {
* Cache Info
*
* @param string user/filehits
- * @return mixed array on success, false on failure
+ * @return mixed array on success, false on failure
*/
public function cache_info($type = 'user')
{
@@ -120,7 +120,7 @@ class CI_Cache extends CI_Driver_Library {
}
// ------------------------------------------------------------------------
-
+
/**
* Get Cache Metadata
*
@@ -131,7 +131,7 @@ class CI_Cache extends CI_Driver_Library {
{
return $this->{$this->_adapter}->get_metadata($id);
}
-
+
// ------------------------------------------------------------------------
/**
@@ -139,11 +139,11 @@ class CI_Cache extends CI_Driver_Library {
*
* Initialize class properties based on the configuration array.
*
- * @param array
+ * @param array
* @return void
*/
private function _initialize($config)
- {
+ {
$default_config = array(
'adapter',
'memcached'
@@ -207,7 +207,7 @@ class CI_Cache extends CI_Driver_Library {
return $obj;
}
-
+
// ------------------------------------------------------------------------
}
// End Class
diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php
index de75719c4..ea129eded 100644
--- a/system/libraries/Cache/drivers/Cache_apc.php
+++ b/system/libraries/Cache/drivers/Cache_apc.php
@@ -10,30 +10,30 @@
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 2.0
- * @filesource
+ * @filesource
*/
// ------------------------------------------------------------------------
/**
- * CodeIgniter APC Caching Class
+ * CodeIgniter APC Caching Class
*
* @package CodeIgniter
* @subpackage Libraries
* @category Core
* @author ExpressionEngine Dev Team
- * @link
+ * @link
*/
class CI_Cache_apc extends CI_Driver {
/**
- * Get
+ * Get
*
- * Look for a value in the cache. If it exists, return the data
+ * Look for a value in the cache. If it exists, return the data
* if not, return FALSE
*
- * @param string
+ * @param string
* @return mixed value that is stored/FALSE on failure
*/
public function get($id)
@@ -43,8 +43,8 @@ class CI_Cache_apc extends CI_Driver {
return (is_array($data)) ? $data[0] : FALSE;
}
- // ------------------------------------------------------------------------
-
+ // ------------------------------------------------------------------------
+
/**
* Cache Save
*
@@ -58,7 +58,7 @@ class CI_Cache_apc extends CI_Driver {
{
return apc_store($id, array($data, time(), $ttl), $ttl);
}
-
+
// ------------------------------------------------------------------------
/**
@@ -90,7 +90,7 @@ class CI_Cache_apc extends CI_Driver {
* Cache Info
*
* @param string user/filehits
- * @return mixed array on success, false on failure
+ * @return mixed array on success, false on failure
*/
public function cache_info($type = NULL)
{
@@ -137,13 +137,13 @@ class CI_Cache_apc extends CI_Driver {
log_message('error', 'The APC PHP extension must be loaded to use APC Cache.');
return FALSE;
}
-
+
return TRUE;
}
// ------------------------------------------------------------------------
-
+
}
// End Class
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php
index 13e2d1af6..39dcd15c2 100644
--- a/system/libraries/Cache/drivers/Cache_file.php
+++ b/system/libraries/Cache/drivers/Cache_file.php
@@ -10,19 +10,19 @@
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 2.0
- * @filesource
+ * @filesource
*/
// ------------------------------------------------------------------------
/**
- * CodeIgniter Memcached Caching Class
+ * CodeIgniter Memcached Caching Class
*
* @package CodeIgniter
* @subpackage Libraries
* @category Core
* @author ExpressionEngine Dev Team
- * @link
+ * @link
*/
class CI_Cache_file extends CI_Driver {
@@ -36,9 +36,9 @@ class CI_Cache_file extends CI_Driver {
{
$CI =& get_instance();
$CI->load->helper('file');
-
+
$path = $CI->config->item('cache_path');
-
+
$this->_cache_path = ($path == '') ? APPPATH.'cache/' : $path;
}
@@ -56,16 +56,16 @@ class CI_Cache_file extends CI_Driver {
{
return FALSE;
}
-
+
$data = read_file($this->_cache_path.$id);
$data = unserialize($data);
-
- if (time() > $data['time'] + $data['ttl'])
+
+ if (time() > $data['time'] + $data['ttl'])
{
unlink($this->_cache_path.$id);
return FALSE;
}
-
+
return $data['data'];
}
@@ -76,22 +76,22 @@ class CI_Cache_file extends CI_Driver {
*
* @param string unique key
* @param mixed data to store
- * @param int length of time (in seconds) the cache is valid
+ * @param int length of time (in seconds) the cache is valid
* - Default is 60 seconds
* @return boolean true on success/false on failure
*/
public function save($id, $data, $ttl = 60)
- {
+ {
$contents = array(
'time' => time(),
- 'ttl' => $ttl,
+ 'ttl' => $ttl,
'data' => $data
);
-
+
if (write_file($this->_cache_path.$id, serialize($contents)))
{
@chmod($this->_cache_path.$id, 0777);
- return TRUE;
+ return TRUE;
}
return FALSE;
@@ -116,7 +116,7 @@ class CI_Cache_file extends CI_Driver {
* Clean the Cache
*
* @return boolean false on failure/true on success
- */
+ */
public function clean()
{
return delete_files($this->_cache_path);
@@ -151,10 +151,10 @@ class CI_Cache_file extends CI_Driver {
{
return FALSE;
}
-
- $data = read_file($this->_cache_path.$id);
+
+ $data = read_file($this->_cache_path.$id);
$data = unserialize($data);
-
+
if (is_array($data))
{
$data = $data['data'];
@@ -170,7 +170,7 @@ class CI_Cache_file extends CI_Driver {
'mtime' => $mtime
);
}
-
+
return FALSE;
}
@@ -180,7 +180,7 @@ class CI_Cache_file extends CI_Driver {
* Is supported
*
* In the file driver, check to see that the cache directory is indeed writable
- *
+ *
* @return boolean
*/
public function is_supported()
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index df0fd6eeb..7dcbaab47 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -99,7 +99,7 @@ class CI_Calendar {
{
// Set and validate the supplied month/year
if ($year == '')
- $year = date("Y", $this->local_time);
+ $year = date("Y", $this->local_time);
if ($month == '')
$month = date("m", $this->local_time);
@@ -128,7 +128,7 @@ class CI_Calendar {
// Set the starting day number
$local_date = mktime(12, 0, 0, $month, 1, $year);
$date = getdate($local_date);
- $day = $start_day + 1 - $date["wday"];
+ $day = $start_day + 1 - $date["wday"];
while ($day > 1)
{
@@ -157,8 +157,8 @@ class CI_Calendar {
// "previous" month link
if ($this->show_next_prev == TRUE)
{
- // Add a trailing slash to the URL if needed
- $this->next_prev_url = preg_replace("/(.+?)\/*$/", "\\1/", $this->next_prev_url);
+ // Add a trailing slash to the URL if needed
+ $this->next_prev_url = preg_replace("/(.+?)\/*$/", "\\1/", $this->next_prev_url);
$adjusted_date = $this->adjust_date($month - 1, $year);
$out .= str_replace('{previous_url}', $this->next_prev_url.$adjusted_date['year'].'/'.$adjusted_date['month'], $this->temp['heading_previous_cell']);
@@ -233,7 +233,7 @@ class CI_Calendar {
$out .= $this->temp['cal_cell_blank'];
}
- $out .= ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_end_today'] : $this->temp['cal_cell_end'];
+ $out .= ($is_current_month == TRUE AND $day == $cur_day) ? $this->temp['cal_cell_end_today'] : $this->temp['cal_cell_end'];
$day++;
}
@@ -287,7 +287,7 @@ class CI_Calendar {
* Get Day Names
*
* Returns an array of day names (Sunday, Monday, etc.) based
- * on the type. Options: long, short, abrev
+ * on the type. Options: long, short, abrev
*
* @access public
* @param string
@@ -404,7 +404,7 @@ class CI_Calendar {
*/
function default_template()
{
- return array (
+ return array (
'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',
'heading_row_start' => '<tr>',
'heading_previous_cell' => '<th><a href="{previous_url}">&lt;&lt;</a></th>',
@@ -451,7 +451,7 @@ class CI_Calendar {
$today = array('cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today');
- foreach (array('table_open', 'table_close', 'heading_row_start', 'heading_previous_cell', 'heading_title_cell', 'heading_next_cell', 'heading_row_end', 'week_row_start', 'week_day_cell', 'week_row_end', 'cal_row_start', 'cal_cell_start', 'cal_cell_content', 'cal_cell_no_content', 'cal_cell_blank', 'cal_cell_end', 'cal_row_end', 'cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today') as $val)
+ foreach (array('table_open', 'table_close', 'heading_row_start', 'heading_previous_cell', 'heading_title_cell', 'heading_next_cell', 'heading_row_end', 'week_row_start', 'week_day_cell', 'week_row_end', 'cal_row_start', 'cal_cell_start', 'cal_cell_content', 'cal_cell_no_content', 'cal_cell_blank', 'cal_cell_end', 'cal_row_end', 'cal_cell_start_today', 'cal_cell_content_today', 'cal_cell_no_content_today', 'cal_cell_end_today') as $val)
{
if (preg_match("/\{".$val."\}(.*?)\{\/".$val."\}/si", $this->template, $match))
{
diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php
index 7f65b48b9..fbccfb3d9 100644
--- a/system/libraries/Cart.php
+++ b/system/libraries/Cart.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -30,7 +30,7 @@ class CI_Cart {
var $product_id_rules = '\.a-z0-9_-'; // alpha-numeric, dashes, underscores, or periods
var $product_name_rules = '\.\:\-_ a-z0-9'; // alpha-numeric, dashes, underscores, colons or periods
- // Private variables. Do not change!
+ // Private variables. Do not change!
var $CI;
var $_cart_contents = array();
@@ -45,7 +45,7 @@ class CI_Cart {
// Set the super object to a local variable for use later
$this->CI =& get_instance();
- // Are any config settings being passed manually? If so, set them
+ // Are any config settings being passed manually? If so, set them
$config = array();
if (count($params) > 0)
{
@@ -148,7 +148,7 @@ class CI_Cart {
// --------------------------------------------------------------------
- // Does the $items array contain an id, quantity, price, and name? These are required
+ // Does the $items array contain an id, quantity, price, and name? These are required
if ( ! isset($items['id']) OR ! isset($items['qty']) OR ! isset($items['price']) OR ! isset($items['name']))
{
log_message('error', 'The cart array must contain a product ID, quantity, price, and name.');
@@ -157,7 +157,7 @@ class CI_Cart {
// --------------------------------------------------------------------
- // Prep the quantity. It can only be a number. Duh...
+ // Prep the quantity. It can only be a number. Duh...
$items['qty'] = trim(preg_replace('/([^0-9])/i', '', $items['qty']));
// Trim any leading zeros
$items['qty'] = trim(preg_replace('/(^[0]+)/i', '', $items['qty']));
@@ -175,7 +175,7 @@ class CI_Cart {
// Note: These can be user-specified by setting the $this->product_id_rules variable.
if ( ! preg_match("/^[".$this->product_id_rules."]+$/i", $items['id']))
{
- log_message('error', 'Invalid product ID. The product ID can only contain alpha-numeric characters, dashes, and underscores');
+ log_message('error', 'Invalid product ID. The product ID can only contain alpha-numeric characters, dashes, and underscores');
return FALSE;
}
@@ -191,7 +191,7 @@ class CI_Cart {
// --------------------------------------------------------------------
- // Prep the price. Remove anything that isn't a number or decimal point.
+ // Prep the price. Remove anything that isn't a number or decimal point.
$items['price'] = trim(preg_replace('/([^0-9\.])/i', '', $items['price']));
// Trim any leading zeros
$items['price'] = trim(preg_replace('/(^[0]+)/i', '', $items['price']));
@@ -210,7 +210,7 @@ class CI_Cart {
// Each row in the cart array, however, must have a unique index that identifies not only
// a particular product, but makes it possible to store identical products with different options.
// For example, what if someone buys two identical t-shirts (same product ID), but in
- // different sizes? The product ID (and other attributes, like the name) will be identical for
+ // different sizes? The product ID (and other attributes, like the name) will be identical for
// both sizes because it's the same shirt. The only difference will be the size.
// Internally, we need to treat identical submissions, but with different options, as a unique product.
// Our solution is to convert the options array to a string and MD5 it along with the product ID.
@@ -271,7 +271,7 @@ class CI_Cart {
}
// You can either update a single product using a one-dimensional array,
- // or multiple products using a multi-dimensional one. The way we
+ // or multiple products using a multi-dimensional one. The way we
// determine the array type is by looking for a required array key named "id".
// If it's not found we assume it's a multi-dimensional array
$save_cart = FALSE;
@@ -344,7 +344,7 @@ class CI_Cart {
return FALSE;
}
- // Is the quantity zero? If so we will remove the item from the cart.
+ // Is the quantity zero? If so we will remove the item from the cart.
// If the quantity is greater than zero we are updating
if ($items['qty'] == 0)
{
@@ -392,7 +392,7 @@ class CI_Cart {
$this->_cart_contents['total_items'] = count($this->_cart_contents);
$this->_cart_contents['cart_total'] = $total;
- // Is our cart empty? If so we delete it from the session
+ // Is our cart empty? If so we delete it from the session
if (count($this->_cart_contents) <= 2)
{
$this->CI->session->unset_userdata('cart_contents');
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index d1925c0ec..1e01fcc1f 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -43,11 +43,11 @@ class CI_Driver_Library {
// The class will be prefixed with the parent lib
$child_class = $this->lib_name.'_'.$child;
-
+
// Remove the CI_ prefix and lowercase
- $lib_name = ucfirst(strtolower(preg_replace('/^CI_/', '', $this->lib_name)));
- $driver_name = strtolower(preg_replace('/^CI_/', '', $child_class));
-
+ $lib_name = ucfirst(strtolower(str_replace('CI_', '', $this->lib_name)));
+ $driver_name = strtolower(str_replace('CI_', '', $child_class));
+
if (in_array($driver_name, array_map('strtolower', $this->valid_drivers)))
{
// check and see if the driver is in a separate file
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index cd89f8f3d..3166e2f7e 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -31,25 +31,25 @@ class CI_Email {
var $useragent = "CodeIgniter";
var $mailpath = "/usr/sbin/sendmail"; // Sendmail path
var $protocol = "mail"; // mail/sendmail/smtp
- var $smtp_host = ""; // SMTP Server. Example: mail.earthlink.net
+ var $smtp_host = ""; // SMTP Server. Example: mail.earthlink.net
var $smtp_user = ""; // SMTP Username
var $smtp_pass = ""; // SMTP Password
var $smtp_port = "25"; // SMTP Port
var $smtp_timeout = 5; // SMTP Timeout in seconds
- var $wordwrap = TRUE; // TRUE/FALSE Turns word-wrap on/off
+ var $wordwrap = TRUE; // TRUE/FALSE Turns word-wrap on/off
var $wrapchars = "76"; // Number of characters to wrap at.
- var $mailtype = "text"; // text/html Defines email formatting
+ var $mailtype = "text"; // text/html Defines email formatting
var $charset = "utf-8"; // Default char set: iso-8859-1 or us-ascii
var $multipart = "mixed"; // "mixed" (in the body) or "related" (separate)
var $alt_message = ''; // Alternative message for HTML emails
- var $validate = FALSE; // TRUE/FALSE. Enables email validation
+ var $validate = FALSE; // TRUE/FALSE. Enables email validation
var $priority = "3"; // Default priority (1 - 5)
var $newline = "\n"; // Default newline. "\r\n" or "\n" (Use "\r\n" to comply with RFC 822)
- var $crlf = "\n"; // The RFC 2045 compliant CRLF for quoted-printable is "\r\n". Apparently some servers,
+ var $crlf = "\n"; // The RFC 2045 compliant CRLF for quoted-printable is "\r\n". Apparently some servers,
// even on the receiving end think they need to muck with CRLFs, so using "\n", while
// distasteful, is the only thing that seems to work for all environments.
- var $send_multipart = TRUE; // TRUE/FALSE - Yahoo does not like multipart alternative, so this is an override. Set to FALSE for Yahoo.
- var $bcc_batch_mode = FALSE; // TRUE/FALSE Turns on/off Bcc batch feature
+ var $send_multipart = TRUE; // TRUE/FALSE - Yahoo does not like multipart alternative, so this is an override. Set to FALSE for Yahoo.
+ var $bcc_batch_mode = FALSE; // TRUE/FALSE Turns on/off Bcc batch feature
var $bcc_batch_size = 200; // If bcc_batch_mode = TRUE, sets max number of Bccs in each batch
var $_safe_mode = FALSE;
var $_subject = "";
@@ -396,7 +396,7 @@ class CI_Email {
{
$this->_attach_name[] = $filename;
$this->_attach_type[] = $this->_mime_types(next(explode('.', basename($filename))));
- $this->_attach_disp[] = $disposition; // Can also be 'inline' Not sure if it matters
+ $this->_attach_disp[] = $disposition; // Can also be 'inline' Not sure if it matters
return $this;
}
@@ -600,7 +600,7 @@ class CI_Email {
$from = str_replace(">", "", $from);
$from = str_replace("<", "", $from);
- return "<".uniqid('').strstr($from, '@').">";
+ return "<".uniqid('').strstr($from, '@').">";
}
// --------------------------------------------------------------------
@@ -660,15 +660,15 @@ class CI_Email {
*/
private function _get_content_type()
{
- if ($this->mailtype == 'html' && count($this->_attach_name) == 0)
+ if ($this->mailtype == 'html' && count($this->_attach_name) == 0)
{
return 'html';
}
- elseif ($this->mailtype == 'html' && count($this->_attach_name) > 0)
+ elseif ($this->mailtype == 'html' && count($this->_attach_name) > 0)
{
return 'html-attach';
}
- elseif ($this->mailtype == 'text' && count($this->_attach_name) > 0)
+ elseif ($this->mailtype == 'text' && count($this->_attach_name) > 0)
{
return 'plain-attach';
}
@@ -881,7 +881,7 @@ class CI_Email {
// Use PHP's native public function to do the initial wordwrap.
// We set the cut flag to FALSE so that any individual words that are
- // too long get left alone. In the next step we'll deal with them.
+ // too long get left alone. In the next step we'll deal with them.
$str = wordwrap($str, $charlim, "\n", FALSE);
// Split the string into individual lines of text and cycle through them
@@ -999,7 +999,7 @@ class CI_Email {
*/
private function _build_message()
{
- if ($this->wordwrap === TRUE AND $this->mailtype != 'html')
+ if ($this->wordwrap === TRUE AND $this->mailtype != 'html')
{
$this->_body = $this->word_wrap($this->_body);
}
@@ -1135,7 +1135,7 @@ class CI_Email {
return FALSE;
}
- $h = "--".$this->_atc_boundary.$this->newline;
+ $h = "--".$this->_atc_boundary.$this->newline;
$h .= "Content-type: ".$ctype."; ";
$h .= "name=\"".$basename."\"".$this->newline;
$h .= "Content-Disposition: ".$this->_attach_disp[$i].";".$this->newline;
@@ -1237,7 +1237,7 @@ class CI_Email {
// encode = signs
if ($ascii == '61')
{
- $char = $escape.strtoupper(sprintf('%02s', dechex($ascii))); // =3D
+ $char = $escape.strtoupper(sprintf('%02s', dechex($ascii))); // =3D
}
// If we're at the character limit, add the line to the output,
@@ -1267,7 +1267,7 @@ class CI_Email {
/**
* Prep Q Encoding
*
- * Performs "Q Encoding" on a string for use in email headers. It's related
+ * Performs "Q Encoding" on a string for use in email headers. It's related
* but not identical to quoted-printable, so it has its own method
*
* @access public
@@ -1349,7 +1349,7 @@ class CI_Email {
$this->reply_to($this->_headers['From']);
}
- if (( ! isset($this->_recipients) AND ! isset($this->_headers['To'])) AND
+ if (( ! isset($this->_recipients) AND ! isset($this->_headers['To'])) AND
( ! isset($this->_bcc_array) AND ! isset($this->_headers['Bcc'])) AND
( ! isset($this->_headers['Cc'])))
{
@@ -1359,7 +1359,7 @@ class CI_Email {
$this->_build_headers();
- if ($this->bcc_batch_mode AND count($this->_bcc_array) > 0)
+ if ($this->bcc_batch_mode AND count($this->_bcc_array) > 0)
{
if (count($this->_bcc_array) > $this->bcc_batch_size)
return $this->batch_bcc_send();
@@ -1380,7 +1380,7 @@ class CI_Email {
// --------------------------------------------------------------------
/**
- * Batch Bcc Send. Sends groups of BCCs in batches
+ * Batch Bcc Send. Sends groups of BCCs in batches
*
* @access public
* @return bool
@@ -1752,7 +1752,7 @@ class CI_Email {
// --------------------------------------------------------------------
/**
- * SMTP Authenticate
+ * SMTP Authenticate
*
* @access private
* @return bool
@@ -1764,7 +1764,7 @@ class CI_Email {
return TRUE;
}
- if ($this->smtp_user == "" AND $this->smtp_pass == "")
+ if ($this->smtp_user == "" AND $this->smtp_pass == "")
{
$this->_set_error_message('lang:email_no_smtp_unpw');
return FALSE;
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index b30a8cf0b..2f7db6623 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 6f79a554a..d8bcbd62b 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -102,7 +102,7 @@ class CI_Form_validation {
}
// No fields? Nothing to do...
- if ( ! is_string($field) OR ! is_string($rules) OR $field == '')
+ if ( ! is_string($field) OR ! is_string($rules) OR $field == '')
{
return $this;
}
@@ -110,8 +110,8 @@ class CI_Form_validation {
// If the field label wasn't passed we use the field name
$label = ($label == '') ? $field : $label;
- // Is the field name an array? We test for the existence of a bracket "[" in
- // the field name to determine this. If it is an array, we break it apart
+ // Is the field name an array? We test for the existence of a bracket "[" in
+ // the field name to determine this. If it is an array, we break it apart
// into its components so that we can fetch the corresponding POST data later
if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
{
@@ -155,8 +155,8 @@ class CI_Form_validation {
/**
* Set Error Message
*
- * Lets users set their own error messages on the fly. Note: The key
- * name has to match the function name that it corresponds to.
+ * Lets users set their own error messages on the fly. Note: The key
+ * name has to match the function name that it corresponds to.
*
* @access public
* @param string
@@ -281,7 +281,7 @@ class CI_Form_validation {
*/
function run($group = '')
{
- // Do we even have any data to process? Mm?
+ // Do we even have any data to process? Mm?
if (count($_POST) == 0)
{
return FALSE;
@@ -291,7 +291,7 @@ class CI_Form_validation {
// If not, we look to see if they were assigned via a config file
if (count($this->_field_data) == 0)
{
- // No validation rules? We're done...
+ // No validation rules? We're done...
if (count($this->_config_rules) == 0)
{
return FALSE;
@@ -648,7 +648,7 @@ class CI_Form_validation {
}
}
- // Did the rule test negatively? If so, grab the error.
+ // Did the rule test negatively? If so, grab the error.
if ($result === FALSE)
{
if ( ! isset($this->_error_messages[$rule]))
@@ -664,7 +664,7 @@ class CI_Form_validation {
}
// Is the parameter we are inserting into the error message the name
- // of another field? If so we need to grab its "field label"
+ // of another field? If so we need to grab its "field label"
if (isset($this->_field_data[$param]) AND isset($this->_field_data[$param]['label']))
{
$param = $this->_translate_fieldname($this->_field_data[$param]['label']);
@@ -704,7 +704,7 @@ class CI_Form_validation {
// Grab the variable
$line = substr($fieldname, 5);
- // Were we able to translate the field name? If not we use $line
+ // Were we able to translate the field name? If not we use $line
if (FALSE === ($fieldname = $this->CI->lang->line($line)))
{
return $line;
@@ -735,7 +735,7 @@ class CI_Form_validation {
}
// If the data is an array output them one at a time.
- // E.g: form_input('name[]', set_value('name[]');
+ // E.g: form_input('name[]', set_value('name[]');
if (is_array($this->_field_data[$field]['postdata']))
{
return array_shift($this->_field_data[$field]['postdata']);
@@ -914,7 +914,7 @@ class CI_Form_validation {
return FALSE;
}
- return TRUE;
+ return TRUE;
}
// --------------------------------------------------------------------
@@ -1207,7 +1207,7 @@ class CI_Form_validation {
// --------------------------------------------------------------------
/**
- * Is a Natural number (0,1,2,3, etc.)
+ * Is a Natural number (0,1,2,3, etc.)
*
* @access public
* @param string
@@ -1221,7 +1221,7 @@ class CI_Form_validation {
// --------------------------------------------------------------------
/**
- * Is a Natural number, but not a zero (1,2,3, etc.)
+ * Is a Natural number, but not a zero (1,2,3, etc.)
*
* @access public
* @param string
@@ -1354,7 +1354,7 @@ class CI_Form_validation {
*/
function encode_php_tags($str)
{
- return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
+ return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
}
}
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index d7a8b3b02..859cc9c30 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -158,7 +158,7 @@ class CI_FTP {
*
* The second parameter lets us momentarily turn off debugging so that
* this function can be used to test for the existence of a folder
- * without throwing an error. There's no FTP equivalent to is_dir()
+ * without throwing an error. There's no FTP equivalent to is_dir()
* so we do it by trying to change to a particular directory.
* Internally, this parameter is only used by the "mirror" function below.
*
@@ -417,7 +417,7 @@ class CI_FTP {
}
// Add a trailing slash to the file path if needed
- $filepath = preg_replace("/(.+?)\/*$/", "\\1/", $filepath);
+ $filepath = preg_replace("/(.+?)\/*$/", "\\1/", $filepath);
$list = $this->list_files($filepath);
@@ -513,7 +513,7 @@ class CI_FTP {
* Read a directory and recreate it remotely
*
* This function recursively reads a folder and everything it contains (including
- * sub-folders) and creates a mirror via FTP based on it. Whatever the directory structure
+ * sub-folders) and creates a mirror via FTP based on it. Whatever the directory structure
* of the original file path will be recreated on the server.
*
* @access public
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 8902f524d..099a238dd 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -26,7 +26,7 @@
*/
class CI_Image_lib {
- var $image_library = 'gd2'; // Can be: imagemagick, netpbm, gd, gd2
+ var $image_library = 'gd2'; // Can be: imagemagick, netpbm, gd, gd2
var $library_path = '';
var $dynamic_output = FALSE; // Whether to send to browser or write to disk
var $source_image = '';
@@ -37,28 +37,28 @@ class CI_Image_lib {
var $create_thumb = FALSE;
var $thumb_marker = '_thumb';
var $maintain_ratio = TRUE; // Whether to maintain aspect ratio when resizing or use hard values
- var $master_dim = 'auto'; // auto, height, or width. Determines what to use as the master dimension
+ var $master_dim = 'auto'; // auto, height, or width. Determines what to use as the master dimension
var $rotation_angle = '';
var $x_axis = '';
var $y_axis = '';
// Watermark Vars
var $wm_text = ''; // Watermark text if graphic is not used
- var $wm_type = 'text'; // Type of watermarking. Options: text/overlay
+ var $wm_type = 'text'; // Type of watermarking. Options: text/overlay
var $wm_x_transp = 4;
var $wm_y_transp = 4;
var $wm_overlay_path = ''; // Watermark image path
var $wm_font_path = ''; // TT font
var $wm_font_size = 17; // Font size (different versions of GD will either use points or pixels)
- var $wm_vrt_alignment = 'B'; // Vertical alignment: T M B
+ var $wm_vrt_alignment = 'B'; // Vertical alignment: T M B
var $wm_hor_alignment = 'C'; // Horizontal alignment: L R C
var $wm_padding = 0; // Padding around text
var $wm_hor_offset = 0; // Lets you push text to the right
- var $wm_vrt_offset = 0; // Lets you push text down
+ var $wm_vrt_offset = 0; // Lets you push text down
var $wm_font_color = '#ffffff'; // Text color
var $wm_shadow_color = ''; // Dropshadow color
var $wm_shadow_distance = 2; // Dropshadow distance
- var $wm_opacity = 50; // Image opacity: 1 - 100 Only works with image
+ var $wm_opacity = 50; // Image opacity: 1 - 100 Only works with image
// Private Vars
var $source_folder = '';
@@ -146,14 +146,14 @@ class CI_Image_lib {
if ($this->source_image == '')
{
$this->set_error('imglib_source_image_required');
- return FALSE;
+ return FALSE;
}
/*
* Is getimagesize() Available?
*
* We use it to determine the image properties (width/height).
- * Note: We need to figure out how to determine image
+ * Note: We need to figure out how to determine image
* properties using ImageMagick and NetPBM
*
*/
@@ -189,7 +189,7 @@ class CI_Image_lib {
// Set the Image Properties
if ( ! $this->get_image_properties($this->source_folder.$this->source_image))
{
- return FALSE;
+ return FALSE;
}
/*
@@ -197,7 +197,7 @@ class CI_Image_lib {
*
* If the user has set a "new_image" name it means
* we are making a copy of the source image. If not
- * it means we are altering the original. We'll
+ * it means we are altering the original. We'll
* set the destination filename and path accordingly.
*
*/
@@ -267,7 +267,7 @@ class CI_Image_lib {
*
* When creating thumbs or copies, the target width/height
* might not be in correct proportion with the source
- * image's width/height. We'll recalculate it here.
+ * image's width/height. We'll recalculate it here.
*
*/
if ($this->maintain_ratio === TRUE && ($this->width != '' AND $this->height != ''))
@@ -399,7 +399,7 @@ class CI_Image_lib {
if ($this->rotation_angle == '' OR ! in_array($this->rotation_angle, $degs))
{
$this->set_error('imglib_rotation_angle_required');
- return FALSE;
+ return FALSE;
}
// Reassign the width and height
@@ -469,8 +469,8 @@ class CI_Image_lib {
// Let's set up our values based on the action
if ($action == 'crop')
{
- // Reassign the source width/height if cropping
- $this->orig_width = $this->width;
+ // Reassign the source width/height if cropping
+ $this->orig_width = $this->width;
$this->orig_height = $this->height;
// GD 2.0 has a cropping bug so we'll test for it
@@ -487,19 +487,19 @@ class CI_Image_lib {
$this->y_axis = 0;
}
- // Create the image handle
+ // Create the image handle
if ( ! ($src_img = $this->image_create_gd()))
{
return FALSE;
}
- // Create The Image
+ // Create The Image
//
- // old conditional which users report cause problems with shared GD libs who report themselves as "2.0 or greater"
- // it appears that this is no longer the issue that it was in 2004, so we've removed it, retaining it in the comment
- // below should that ever prove inaccurate.
+ // old conditional which users report cause problems with shared GD libs who report themselves as "2.0 or greater"
+ // it appears that this is no longer the issue that it was in 2004, so we've removed it, retaining it in the comment
+ // below should that ever prove inaccurate.
//
- // if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor') AND $v2_override == FALSE)
+ // if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor') AND $v2_override == FALSE)
if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor'))
{
$create = 'imagecreatetruecolor';
@@ -521,7 +521,7 @@ class CI_Image_lib {
$copy($dst_img, $src_img, 0, 0, $this->x_axis, $this->y_axis, $this->width, $this->height, $this->orig_width, $this->orig_height);
- // Show the image
+ // Show the image
if ($this->dynamic_output == TRUE)
{
$this->image_display_gd($dst_img);
@@ -535,7 +535,7 @@ class CI_Image_lib {
}
}
- // Kill the file handles
+ // Kill the file handles
imagedestroy($dst_img);
imagedestroy($src_img);
@@ -558,7 +558,7 @@ class CI_Image_lib {
*/
function image_process_imagemagick($action = 'resize')
{
- // Do we have a vaild library path?
+ // Do we have a vaild library path?
if ($this->library_path == '')
{
$this->set_error('imglib_libpath_invalid');
@@ -593,7 +593,7 @@ class CI_Image_lib {
$cmd .= " ".$angle." \"$this->full_src_path\" \"$this->full_dst_path\" 2>&1";
}
- else // Resize
+ else // Resize
{
$cmd .= " -resize ".$this->width."x".$this->height." \"$this->full_src_path\" \"$this->full_dst_path\" 2>&1";
}
@@ -634,7 +634,7 @@ class CI_Image_lib {
return FALSE;
}
- // Build the resizing command
+ // Build the resizing command
switch ($this->image_type)
{
case 1 :
@@ -684,7 +684,7 @@ class CI_Image_lib {
@exec($cmd, $output, $retval);
- // Did it work?
+ // Did it work?
if ($retval > 0)
{
$this->set_error('imglib_image_process_failed');
@@ -711,7 +711,7 @@ class CI_Image_lib {
*/
function image_rotate_gd()
{
- // Create the image handle
+ // Create the image handle
if ( ! ($src_img = $this->image_create_gd()))
{
return FALSE;
@@ -724,10 +724,10 @@ class CI_Image_lib {
$white = imagecolorallocate($src_img, 255, 255, 255);
- // Rotate it!
+ // Rotate it!
$dst_img = imagerotate($src_img, $this->rotation_angle, $white);
- // Save the Image
+ // Save the Image
if ($this->dynamic_output == TRUE)
{
$this->image_display_gd($dst_img);
@@ -741,7 +741,7 @@ class CI_Image_lib {
}
}
- // Kill the file handles
+ // Kill the file handles
imagedestroy($dst_img);
imagedestroy($src_img);
@@ -769,14 +769,14 @@ class CI_Image_lib {
return FALSE;
}
- $width = $this->orig_width;
+ $width = $this->orig_width;
$height = $this->orig_height;
if ($this->rotation_angle == 'hor')
{
for ($i = 0; $i < $height; $i++)
{
- $left = 0;
+ $left = 0;
$right = $width-1;
while ($left < $right)
@@ -813,7 +813,7 @@ class CI_Image_lib {
}
}
- // Show the image
+ // Show the image
if ($this->dynamic_output == TRUE)
{
$this->image_display_gd($src_img);
@@ -827,7 +827,7 @@ class CI_Image_lib {
}
}
- // Kill the file handles
+ // Kill the file handles
imagedestroy($src_img);
// Set the file to 777
@@ -876,24 +876,24 @@ class CI_Image_lib {
return FALSE;
}
- // Fetch source image properties
+ // Fetch source image properties
$this->get_image_properties();
- // Fetch watermark image properties
+ // Fetch watermark image properties
$props = $this->get_image_properties($this->wm_overlay_path, TRUE);
$wm_img_type = $props['image_type'];
$wm_width = $props['width'];
$wm_height = $props['height'];
- // Create two image resources
- $wm_img = $this->image_create_gd($this->wm_overlay_path, $wm_img_type);
+ // Create two image resources
+ $wm_img = $this->image_create_gd($this->wm_overlay_path, $wm_img_type);
$src_img = $this->image_create_gd($this->full_src_path);
// Reverse the offset if necessary
// When the image is positioned at the bottom
// we don't want the vertical offset to push it
- // further down. We want the reverse, so we'll
- // invert the offset. Same with the horizontal
+ // further down. We want the reverse, so we'll
+ // invert the offset. Same with the horizontal
// offset when the image is at the right
$this->wm_vrt_alignment = strtoupper(substr($this->wm_vrt_alignment, 0, 1));
@@ -905,11 +905,11 @@ class CI_Image_lib {
if ($this->wm_hor_alignment == 'R')
$this->wm_hor_offset = $this->wm_hor_offset * -1;
- // Set the base x and y axis values
+ // Set the base x and y axis values
$x_axis = $this->wm_hor_offset + $this->wm_padding;
$y_axis = $this->wm_vrt_offset + $this->wm_padding;
- // Set the vertical position
+ // Set the vertical position
switch ($this->wm_vrt_alignment)
{
case 'T':
@@ -920,7 +920,7 @@ class CI_Image_lib {
break;
}
- // Set the horizontal position
+ // Set the horizontal position
switch ($this->wm_hor_alignment)
{
case 'L':
@@ -931,7 +931,7 @@ class CI_Image_lib {
break;
}
- // Build the finalized image
+ // Build the finalized image
if ($wm_img_type == 3 AND function_exists('imagealphablending'))
{
@imagealphablending($src_img, TRUE);
@@ -954,7 +954,7 @@ class CI_Image_lib {
imagecopymerge($src_img, $wm_img, $x_axis, $y_axis, 0, 0, $wm_width, $wm_height, $this->wm_opacity);
}
- // Output the image
+ // Output the image
if ($this->dynamic_output == TRUE)
{
$this->image_display_gd($src_img);
@@ -994,7 +994,7 @@ class CI_Image_lib {
return FALSE;
}
- // Fetch source image properties
+ // Fetch source image properties
$this->get_image_properties();
// Set RGB values for text and shadow
@@ -1015,8 +1015,8 @@ class CI_Image_lib {
// Reverse the vertical offset
// When the image is positioned at the bottom
// we don't want the vertical offset to push it
- // further down. We want the reverse, so we'll
- // invert the offset. Note: The horizontal
+ // further down. We want the reverse, so we'll
+ // invert the offset. Note: The horizontal
// offset flips itself automatically
if ($this->wm_vrt_alignment == 'B')
@@ -1033,13 +1033,13 @@ class CI_Image_lib {
if ($this->wm_font_size == '')
$this->wm_font_size = '17';
- $fontwidth = $this->wm_font_size-($this->wm_font_size/4);
+ $fontwidth = $this->wm_font_size-($this->wm_font_size/4);
$fontheight = $this->wm_font_size;
$this->wm_vrt_offset += $this->wm_font_size;
}
else
{
- $fontwidth = imagefontwidth($this->wm_font_size);
+ $fontwidth = imagefontwidth($this->wm_font_size);
$fontheight = imagefontheight($this->wm_font_size);
}
@@ -1080,11 +1080,11 @@ class CI_Image_lib {
case "C":
if ($this->wm_use_drop_shadow)
$x_shad += floor(($this->orig_width - $fontwidth*strlen($this->wm_text))/2);
- $x_axis += floor(($this->orig_width -$fontwidth*strlen($this->wm_text))/2);
+ $x_axis += floor(($this->orig_width -$fontwidth*strlen($this->wm_text))/2);
break;
}
- // Add the text to the source image
+ // Add the text to the source image
if ($this->wm_use_truetype)
{
if ($this->wm_use_drop_shadow)
@@ -1098,7 +1098,7 @@ class CI_Image_lib {
imagestring($src_img, $this->wm_font_size, $x_axis, $y_axis, $this->wm_text, $txt_color);
}
- // Output the final image
+ // Output the final image
if ($this->dynamic_output == TRUE)
{
$this->image_display_gd($src_img);
@@ -1366,7 +1366,7 @@ class CI_Image_lib {
* Size calculator
*
* This function takes a known width x height and
- * recalculates it to a new size. Only one
+ * recalculates it to a new size. Only one
* new variable needs to be known
*
* $props = array(
@@ -1374,7 +1374,7 @@ class CI_Image_lib {
* 'height' => $height,
* 'new_width' => 40,
* 'new_height' => ''
- * );
+ * );
*
* @access public
* @param array
@@ -1418,10 +1418,10 @@ class CI_Image_lib {
* Explode source_image
*
* This is a helper function that extracts the extension
- * from the source_image. This function lets us deal with
- * source_images with multiple periods, like: my.cool.jpg
+ * from the source_image. This function lets us deal with
+ * source_images with multiple periods, like: my.cool.jpg
* It returns an associative array with two elements:
- * $array['ext'] = '.jpg';
+ * $array['ext'] = '.jpg';
* $array['name'] = 'my.cool';
*
* @access public
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index 34e0d7001..9e42a4385 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -49,10 +49,10 @@ class CI_Javascript {
// make js to refer to current library
$this->js =& $this->CI->$js_library_driver;
- log_message('debug', "Javascript Class Initialized and loaded. Driver used: $js_library_driver");
+ log_message('debug', "Javascript Class Initialized and loaded. Driver used: $js_library_driver");
}
- // --------------------------------------------------------------------
+ // --------------------------------------------------------------------
// Event Code
// --------------------------------------------------------------------
@@ -378,7 +378,7 @@ class CI_Javascript {
return $this->js->_unload($element, $js);
}
- // --------------------------------------------------------------------
+ // --------------------------------------------------------------------
// Effects
// --------------------------------------------------------------------
@@ -685,7 +685,7 @@ class CI_Javascript {
return $str;
}
-
+
// --------------------------------------------------------------------
/**
@@ -855,7 +855,7 @@ class CI_Javascript {
}
elseif (is_string($result) OR $is_key)
{
- return '"'.str_replace(array('\\', "\t", "\n", "\r", '"', '/'), array('\\\\', '\\t', '\\n', "\\r", '\"', '\/'), $result).'"';
+ return '"'.str_replace(array('\\', "\t", "\n", "\r", '"', '/'), array('\\\\', '\\t', '\\n', "\\r", '\"', '\/'), $result).'"';
}
elseif (is_scalar($result))
{
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index 9f1db76ba..2505fc678 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -30,7 +30,7 @@ class CI_Log {
protected $_threshold = 1;
protected $_date_fmt = 'Y-m-d H:i:s';
protected $_enabled = TRUE;
- protected $_levels = array('ERROR' => '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4');
+ protected $_levels = array('ERROR' => '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4');
/**
* Constructor
@@ -84,11 +84,11 @@ class CI_Log {
}
$filepath = $this->_log_path.'log-'.date('Y-m-d').'.php';
- $message = '';
+ $message = '';
if ( ! file_exists($filepath))
{
- $message .= "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
+ $message .= "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
}
if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 1113f862f..d9c22d501 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -30,10 +30,10 @@ class CI_Pagination {
var $prefix = ''; // A custom prefix added to the path.
var $suffix = ''; // A custom suffix added to the path.
- var $total_rows = ''; // Total number of items (database results)
+ var $total_rows = 0; // Total number of items (database results)
var $per_page = 10; // Max number of items you want shown per page
- var $num_links = 2; // Number of "digit" links to show before/after the currently viewed page
- var $cur_page = 0; // The current page being viewed
+ var $num_links = 2; // Number of "digit" links to show before/after the currently viewed page
+ var $cur_page = 0; // The current page being viewed
var $first_link = '&lsaquo; First';
var $next_link = '&gt;';
var $prev_link = '&lt;';
@@ -177,9 +177,9 @@ class CI_Pagination {
// Calculate the start and end numbers. These determine
// which number to start and end the digit links with
$start = (($this->cur_page - $this->num_links) > 0) ? $this->cur_page - ($this->num_links - 1) : 1;
- $end = (($this->cur_page + $this->num_links) < $num_pages) ? $this->cur_page + $this->num_links : $num_pages;
+ $end = (($this->cur_page + $this->num_links) < $num_pages) ? $this->cur_page + $this->num_links : $num_pages;
- // Is pagination being used over GET or POST? If get, add a per_page query
+ // Is pagination being used over GET or POST? If get, add a per_page query
// string. If post, add a trailing slash to the base URL if needed
if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
{
@@ -194,14 +194,14 @@ class CI_Pagination {
$output = '';
// Render the "First" link
- if ($this->first_link !== FALSE AND $this->cur_page > ($this->num_links + 1))
+ if ($this->first_link !== FALSE AND $this->cur_page > ($this->num_links + 1))
{
$first_url = ($this->first_url == '') ? $this->base_url : $this->first_url;
$output .= $this->first_tag_open.'<a '.$this->anchor_class.'href="'.$first_url.'">'.$this->first_link.'</a>'.$this->first_tag_close;
}
// Render the "previous" link
- if ($this->prev_link !== FALSE AND $this->cur_page != 1)
+ if ($this->prev_link !== FALSE AND $this->cur_page != 1)
{
$i = $uri_page_number - $this->per_page;
@@ -263,7 +263,7 @@ class CI_Pagination {
$output .= $this->last_tag_open.'<a '.$this->anchor_class.'href="'.$this->base_url.$this->prefix.$i.$this->suffix.'">'.$this->last_link.'</a>'.$this->last_tag_close;
}
- // Kill double slashes. Note: Sometimes we can end up with a double slash
+ // Kill double slashes. Note: Sometimes we can end up with a double slash
// in the penultimate link so we'll kill all double slashes.
$output = preg_replace("#([^:])//+#", "\\1/", $output);
diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php
index d223da020..f48f2a7e5 100644
--- a/system/libraries/Parser.php
+++ b/system/libraries/Parser.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -31,7 +31,7 @@ class CI_Parser {
var $object;
/**
- * Parse a template
+ * Parse a template
*
* Parses pseudo-variables contained in the specified template view,
* replacing them with the data in the second param
@@ -53,7 +53,7 @@ class CI_Parser {
// --------------------------------------------------------------------
/**
- * Parse a String
+ * Parse a String
*
* Parses pseudo-variables contained in the specified string,
* replacing them with the data in the second param
@@ -72,7 +72,7 @@ class CI_Parser {
// --------------------------------------------------------------------
/**
- * Parse a template
+ * Parse a template
*
* Parses pseudo-variables contained in the specified template,
* replacing them with the data in the second param
@@ -114,7 +114,7 @@ class CI_Parser {
// --------------------------------------------------------------------
/**
- * Set the left/right variable delimiters
+ * Set the left/right variable delimiters
*
* @access public
* @param string
@@ -130,7 +130,7 @@ class CI_Parser {
// --------------------------------------------------------------------
/**
- * Parse a single key/value
+ * Parse a single key/value
*
* @access private
* @param string
@@ -146,9 +146,9 @@ class CI_Parser {
// --------------------------------------------------------------------
/**
- * Parse a tag pair
+ * Parse a tag pair
*
- * Parses tag pairs: {some_tag} string... {/some_tag}
+ * Parses tag pairs: {some_tag} string... {/some_tag}
*
* @access private
* @param string
@@ -188,7 +188,7 @@ class CI_Parser {
// --------------------------------------------------------------------
/**
- * Matches a variable pair
+ * Matches a variable pair
*
* @access private
* @param string
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index b73ddaf0d..96ab15789 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -44,13 +44,13 @@ class CI_Profiler {
'session_data',
'config'
);
-
+
protected $_query_toggle_count = 25;
-
- protected $CI;
+
+ protected $CI;
// --------------------------------------------------------------------
-
+
public function __construct($config = array())
{
$this->CI =& get_instance();
@@ -102,7 +102,7 @@ class CI_Profiler {
*
* This function cycles through the entire array of mark points and
* matches any two points that are named identically (ending in "_start"
- * and "_end" respectively). It then compiles the execution times for
+ * and "_end" respectively). It then compiles the execution times for
* all points and returns it as an array
*
* @return array
@@ -125,9 +125,9 @@ class CI_Profiler {
// Build a table containing the profile data.
// Note: At some point we should turn this into a template that can
- // be modified. We also might want to make this data available to be logged
+ // be modified. We also might want to make this data available to be logged
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_benchmarks" style="border:1px solid #900;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#900;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_benchmarks').'&nbsp;&nbsp;</legend>';
@@ -168,7 +168,7 @@ class CI_Profiler {
if (count($dbs) == 0)
{
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_queries" style="border:1px solid #0000FF;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#0000FF;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_queries').'&nbsp;&nbsp;</legend>';
@@ -187,23 +187,23 @@ class CI_Profiler {
// Key words we want bolded
$highlight = array('SELECT', 'DISTINCT', 'FROM', 'WHERE', 'AND', 'LEFT&nbsp;JOIN', 'ORDER&nbsp;BY', 'GROUP&nbsp;BY', 'LIMIT', 'INSERT', 'INTO', 'VALUES', 'UPDATE', 'OR&nbsp;', 'HAVING', 'OFFSET', 'NOT&nbsp;IN', 'IN', 'LIKE', 'NOT&nbsp;LIKE', 'COUNT', 'MAX', 'MIN', 'ON', 'AS', 'AVG', 'SUM', '(', ')');
- $output = "\n\n";
-
+ $output = "\n\n";
+
$count = 0;
-
+
foreach ($dbs as $db)
{
$count++;
-
+
$hide_queries = (count($db->queries) > $this->_query_toggle_count) ? ' display:none' : '';
-
+
$show_hide_js = '(<span style="cursor: pointer;" onclick="var s=document.getElementById(\'ci_profiler_queries_db_'.$count.'\').style;s.display=s.display==\'none\'?\'\':\'none\';this.innerHTML=this.innerHTML==\''.$this->CI->lang->line('profiler_section_hide').'\'?\''.$this->CI->lang->line('profiler_section_show').'\':\''.$this->CI->lang->line('profiler_section_hide').'\';">'.$this->CI->lang->line('profiler_section_hide').'</span>)';
-
+
if ($hide_queries != '')
{
$show_hide_js = '(<span style="cursor: pointer;" onclick="var s=document.getElementById(\'ci_profiler_queries_db_'.$count.'\').style;s.display=s.display==\'none\'?\'\':\'none\';this.innerHTML=this.innerHTML==\''.$this->CI->lang->line('profiler_section_show').'\'?\''.$this->CI->lang->line('profiler_section_hide').'\':\''.$this->CI->lang->line('profiler_section_show').'\';">'.$this->CI->lang->line('profiler_section_show').'</span>)';
}
-
+
$output .= '<fieldset style="border:1px solid #0000FF;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#0000FF;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_database').':&nbsp; '.$db->database.'&nbsp;&nbsp;&nbsp;'.$this->CI->lang->line('profiler_queries').': '.count($db->queries).'&nbsp;&nbsp;'.$show_hide_js.'</legend>';
@@ -249,7 +249,7 @@ class CI_Profiler {
*/
protected function _compile_get()
{
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_get" style="border:1px solid #cd6e00;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#cd6e00;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_get_data').'&nbsp;&nbsp;</legend>';
@@ -298,7 +298,7 @@ class CI_Profiler {
*/
protected function _compile_post()
{
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_post" style="border:1px solid #009900;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#009900;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_post_data').'&nbsp;&nbsp;</legend>';
@@ -347,7 +347,7 @@ class CI_Profiler {
*/
protected function _compile_uri_string()
{
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_uri_string" style="border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#000;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_uri_string').'&nbsp;&nbsp;</legend>';
@@ -376,7 +376,7 @@ class CI_Profiler {
*/
protected function _compile_controller_info()
{
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_controller_info" style="border:1px solid #995300;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#995300;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_controller_info').'&nbsp;&nbsp;</legend>';
@@ -400,7 +400,7 @@ class CI_Profiler {
*/
protected function _compile_memory_usage()
{
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_memory_usage" style="border:1px solid #5a0099;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#5a0099;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_memory_usage').'&nbsp;&nbsp;</legend>';
@@ -412,7 +412,7 @@ class CI_Profiler {
}
else
{
- $output .= "<div style='color:#5a0099;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_memory_usage')."</div>";
+ $output .= "<div style='color:#5a0099;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_memory')."</div>";
}
$output .= "</fieldset>";
@@ -431,7 +431,7 @@ class CI_Profiler {
*/
protected function _compile_http_headers()
{
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_http_headers" style="border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#000;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_headers').'&nbsp;&nbsp;(<span style="cursor: pointer;" onclick="var s=document.getElementById(\'ci_profiler_httpheaders_table\').style;s.display=s.display==\'none\'?\'\':\'none\';this.innerHTML=this.innerHTML==\''.$this->CI->lang->line('profiler_section_show').'\'?\''.$this->CI->lang->line('profiler_section_hide').'\':\''.$this->CI->lang->line('profiler_section_show').'\';">'.$this->CI->lang->line('profiler_section_show').'</span>)</legend>';
@@ -462,7 +462,7 @@ class CI_Profiler {
*/
protected function _compile_config()
{
- $output = "\n\n";
+ $output = "\n\n";
$output .= '<fieldset id="ci_profiler_config" style="border:1px solid #000;padding:6px 10px 10px 10px;margin:20px 0 20px 0;background-color:#eee">';
$output .= "\n";
$output .= '<legend style="color:#000;">&nbsp;&nbsp;'.$this->CI->lang->line('profiler_config').'&nbsp;&nbsp;(<span style="cursor: pointer;" onclick="var s=document.getElementById(\'ci_profiler_config_table\').style;s.display=s.display==\'none\'?\'\':\'none\';this.innerHTML=this.innerHTML==\''.$this->CI->lang->line('profiler_section_show').'\'?\''.$this->CI->lang->line('profiler_section_hide').'\':\''.$this->CI->lang->line('profiler_section_show').'\';">'.$this->CI->lang->line('profiler_section_show').'</span>)</legend>';
diff --git a/system/libraries/Session.php b/system/libraries/Session.php
index 2c8a80163..76525dbb8 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -81,14 +81,14 @@ class CI_Session {
$this->CI->load->library('encrypt');
}
- // Are we using a database? If so, load it
+ // Are we using a database? If so, load it
if ($this->sess_use_database === TRUE AND $this->sess_table_name != '')
{
$this->CI->load->database();
}
- // Set the "now" time. Can either be GMT or server time, based on the
- // config prefs. We use this to set the "last activity" time
+ // Set the "now" time. Can either be GMT or server time, based on the
+ // config prefs. We use this to set the "last activity" time
$this->now = $this->_get_time();
// Set the session length. If the session expiration is
@@ -97,12 +97,12 @@ class CI_Session {
{
$this->sess_expiration = (60*60*24*365*2);
}
-
+
// Set the cookie name
$this->sess_cookie_name = $this->cookie_prefix.$this->sess_cookie_name;
// Run the Session routine. If a session doesn't exist we'll
- // create a new one. If it does, we'll update it.
+ // create a new one. If it does, we'll update it.
if ( ! $this->sess_read())
{
$this->sess_create();
@@ -137,7 +137,7 @@ class CI_Session {
// Fetch the cookie
$session = $this->CI->input->cookie($this->sess_cookie_name);
- // No cookie? Goodbye cruel world!...
+ // No cookie? Goodbye cruel world!...
if ($session === FALSE)
{
log_message('debug', 'A session cookie was not found.');
@@ -155,8 +155,8 @@ class CI_Session {
$hash = substr($session, strlen($session)-32); // get last 32 chars
$session = substr($session, 0, strlen($session)-32);
- // Does the md5 hash match? This is to prevent manipulation of session data in userspace
- if ($hash !== md5($session.$this->encryption_key))
+ // Does the md5 hash match? This is to prevent manipulation of session data in userspace
+ if ($hash !== md5($session.$this->encryption_key))
{
log_message('error', 'The session cookie data did not match what was expected. This could be a possible hacking attempt.');
$this->sess_destroy();
@@ -212,14 +212,14 @@ class CI_Session {
$query = $this->CI->db->get($this->sess_table_name);
- // No result? Kill it!
+ // No result? Kill it!
if ($query->num_rows() == 0)
{
$this->sess_destroy();
return FALSE;
}
- // Is there custom data? If so, add it to the main session array
+ // Is there custom data? If so, add it to the main session array
$row = $query->row();
if (isset($row->user_data) AND $row->user_data != '')
{
@@ -252,7 +252,7 @@ class CI_Session {
*/
function sess_write()
{
- // Are we saving custom data to the DB? If not, all we do is update the cookie
+ // Are we saving custom data to the DB? If not, all we do is update the cookie
if ($this->sess_use_database === FALSE)
{
$this->_set_cookie();
@@ -272,7 +272,7 @@ class CI_Session {
$cookie_userdata[$val] = $this->userdata[$val];
}
- // Did we find any custom data? If not, we turn the empty array into a string
+ // Did we find any custom data? If not, we turn the empty array into a string
// since there's no reason to serialize and store an empty array in the DB
if (count($custom_userdata) === 0)
{
@@ -288,7 +288,7 @@ class CI_Session {
$this->CI->db->where('session_id', $this->userdata['session_id']);
$this->CI->db->update($this->sess_table_name, array('last_activity' => $this->userdata['last_activity'], 'user_data' => $custom_userdata));
- // Write the cookie. Notice that we manually pass the cookie data array to the
+ // Write the cookie. Notice that we manually pass the cookie data array to the
// _set_cookie() function. Normally that function will store $this->userdata, but
// in this case that array contains custom data, which we do not want in the cookie.
$this->_set_cookie($cookie_userdata);
@@ -535,7 +535,7 @@ class CI_Session {
*/
function keep_flashdata($key)
{
- // 'old' flashdata gets removed. Here we mark all
+ // 'old' flashdata gets removed. Here we mark all
// flashdata as 'new' to preserve it from _flashdata_sweep()
// Note the function will return FALSE if the $key
// provided cannot be found
diff --git a/system/libraries/Sha1.php b/system/libraries/Sha1.php
index 1a657572b..04e07d1c1 100644
--- a/system/libraries/Sha1.php
+++ b/system/libraries/Sha1.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -74,10 +74,10 @@ class CI_SHA1 {
$x[$n * 16 - 1] = strlen($str) * 8;
- $a = 1732584193;
+ $a = 1732584193;
$b = -271733879;
$c = -1732584194;
- $d = 271733878;
+ $d = 271733878;
$e = -1009589776;
for ($i = 0; $i < count($x); $i += 16)
@@ -142,7 +142,7 @@ class CI_SHA1 {
// --------------------------------------------------------------------
/**
- * Return result based on iteration
+ * Return result based on iteration
*
* @access private
* @return string
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index def696776..764df37da 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -81,9 +81,9 @@ class CI_Table {
// --------------------------------------------------------------------
/**
- * Set columns. Takes a one-dimensional array as input and creates
+ * Set columns. Takes a one-dimensional array as input and creates
* a multi-dimensional array with a depth equal to the number of
- * columns. This allows a single array with many elements to be
+ * columns. This allows a single array with many elements to be
* displayed in a table that has a fixed column count.
*
* @access public
@@ -247,7 +247,7 @@ class CI_Table {
}
}
- // Is there anything to display? No? Smite them!
+ // Is there anything to display? No? Smite them!
if (count($this->heading) == 0 AND count($this->rows) == 0)
{
return 'Undefined table data';
@@ -376,7 +376,7 @@ class CI_Table {
// --------------------------------------------------------------------
/**
- * Clears the table arrays. Useful if multiple tables are being generated
+ * Clears the table arrays. Useful if multiple tables are being generated
*
* @access public
* @return void
@@ -495,7 +495,7 @@ class CI_Table {
*/
function _default_template()
{
- return array (
+ return array (
'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',
'thead_open' => '<thead>',
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index b0a767822..b0f8a9098 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -125,7 +125,7 @@ class CI_Trackback {
// --------------------------------------------------------------------
/**
- * Receive Trackback Data
+ * Receive Trackback Data
*
* This function simply validates the incoming TB data.
* It returns FALSE on failure and TRUE on success.
@@ -170,7 +170,7 @@ class CI_Trackback {
/**
* Send Trackback Error Message
*
- * Allows custom errors to be set. By default it
+ * Allows custom errors to be set. By default it
* sends the "incomplete information" error, as that's
* the most common one.
*
@@ -221,7 +221,7 @@ class CI_Trackback {
* Process Trackback
*
* Opens a socket connection and passes the data to
- * the server. Returns TRUE on success, FALSE on failure
+ * the server. Returns TRUE on success, FALSE on failure
*
* @access public
* @param string
@@ -359,11 +359,11 @@ class CI_Trackback {
if (strpos($url, '?') !== FALSE)
{
$tb_array = explode('/', $url);
- $tb_end = $tb_array[count($tb_array)-1];
+ $tb_end = $tb_array[count($tb_array)-1];
if ( ! is_numeric($tb_end))
{
- $tb_end = $tb_array[count($tb_array)-2];
+ $tb_end = $tb_array[count($tb_array)-2];
}
$tb_array = explode('=', $tb_end);
@@ -378,7 +378,7 @@ class CI_Trackback {
if ( ! is_numeric($tb_id))
{
- $tb_id = $tb_array[count($tb_array)-2];
+ $tb_id = $tb_array[count($tb_array)-2];
}
}
@@ -406,7 +406,7 @@ class CI_Trackback {
$temp = '__TEMP_AMPERSANDS__';
$str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
- $str = preg_replace("/&(\w+);/", "$temp\\1;", $str);
+ $str = preg_replace("/&(\w+);/", "$temp\\1;", $str);
$str = str_replace(array("&","<",">","\"", "'", "-"),
array("&amp;", "&lt;", "&gt;", "&quot;", "&#39;", "&#45;"),
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index 734cec104..3ceb0b52b 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -53,7 +53,7 @@ class CI_Typography {
* - Converts single and double quotes into correctly facing curly quote entities.
* - Converts three dots into ellipsis.
* - Converts double dashes into em-dashes.
- * - Converts two spaces into entities
+ * - Converts two spaces into entities
*
* @access public
* @param string
@@ -73,7 +73,7 @@ class CI_Typography {
$str = str_replace(array("\r\n", "\r"), "\n", $str);
}
- // Reduce line breaks. If there are more than two consecutive linebreaks
+ // Reduce line breaks. If there are more than two consecutive linebreaks
// we'll compress them down to a maximum of two since there's no benefit to more.
if ($reduce_linebreaks === TRUE)
{
@@ -94,7 +94,7 @@ class CI_Typography {
}
}
- // match and yank <pre> tags if they exist. It's cheaper to do this separately since most content will
+ // match and yank <pre> tags if they exist. It's cheaper to do this separately since most content will
// not contain <pre> tags, and it keeps the PCRE patterns below simpler and faster
if (strpos($str, '<pre') !== FALSE)
{
@@ -110,12 +110,12 @@ class CI_Typography {
$str = preg_replace_callback("#\{.+?\}#si", array($this, '_protect_characters'), $str);
}
- // Convert "ignore" tags to temporary marker. The parser splits out the string at every tag
- // it encounters. Certain inline tags, like image tags, links, span tags, etc. will be
+ // Convert "ignore" tags to temporary marker. The parser splits out the string at every tag
+ // it encounters. Certain inline tags, like image tags, links, span tags, etc. will be
// adversely affected if they are split out so we'll convert the opening bracket < temporarily to: {@TAG}
$str = preg_replace("#<(/*)(".$this->inline_elements.")([ >])#i", "{@TAG}\\1\\2\\3", $str);
- // Split the string at every tag. This expression creates an array with this prototype:
+ // Split the string at every tag. This expression creates an array with this prototype:
//
// [array]
// {
@@ -126,7 +126,7 @@ class CI_Typography {
// }
$chunks = preg_split('/(<(?:[^<>]+(?:"[^"]*"|\'[^\']*\')?)+>)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
- // Build our finalized string. We cycle through the array, skipping tags, and processing the contained text
+ // Build our finalized string. We cycle through the array, skipping tags, and processing the contained text
$str = '';
$process = TRUE;
$paragraph = FALSE;
@@ -143,7 +143,7 @@ class CI_Typography {
{
if (preg_match("#".$this->skip_elements."#", $match[2]))
{
- $process = ($match[1] == '/') ? TRUE : FALSE;
+ $process = ($match[1] == '/') ? TRUE : FALSE;
}
if ($match[1] == '')
@@ -161,17 +161,17 @@ class CI_Typography {
continue;
}
- // Force a newline to make sure end tags get processed by _format_newlines()
+ // Force a newline to make sure end tags get processed by _format_newlines()
if ($current_chunk == $total_chunks)
{
$chunk .= "\n";
}
- // Convert Newlines into <p> and <br /> tags
+ // Convert Newlines into <p> and <br /> tags
$str .= $this->_format_newlines($chunk);
}
- // No opening block level tag? Add it if needed.
+ // No opening block level tag? Add it if needed.
if ( ! preg_match("/^\s*<(?:".$this->block_elements.")/i", $str))
{
$str = preg_replace("/^(.*?)<(".$this->block_elements.")/i", '<p>$1</p><$2', $str);
@@ -204,14 +204,14 @@ class CI_Typography {
'#<p></p><('.$this->block_elements.')#' => '<$1',
// Clean up stray non-breaking spaces preceeding block elements
- '#(&nbsp;\s*)+<('.$this->block_elements.')#' => ' <$2',
+ '#(&nbsp;\s*)+<('.$this->block_elements.')#' => ' <$2',
// Replace the temporary markers we added earlier
'/\{@TAG\}/' => '<',
'/\{@DQ\}/' => '"',
'/\{@SQ\}/' => "'",
'/\{@DD\}/' => '--',
- '/\{@NBS\}/' => ' ',
+ '/\{@NBS\}/' => ' ',
// An unintended consequence of the _format_newlines function is that
// some of the newlines get truncated, resulting in <p> tags
@@ -296,7 +296,7 @@ class CI_Typography {
'/(\w)\.{3}/' => '$1&#8230;',
// double space after sentences
- '/(\W) /' => '$1&nbsp; ',
+ '/(\W) /' => '$1&nbsp; ',
// ampersands, if not a character entity
'/&(?!#?[a-zA-Z0-9]{2,};)/' => '&amp;'
@@ -324,7 +324,7 @@ class CI_Typography {
return $str;
}
- if (strpos($str, "\n") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required))
+ if (strpos($str, "\n") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required))
{
return $str;
}
@@ -341,7 +341,7 @@ class CI_Typography {
// We trim off the right-side new line so that the closing </p> tag
// will be positioned immediately following the string, matching
// the behavior of the opening <p> tag
- $str = '<p>'.rtrim($str).'</p>';
+ $str = '<p>'.rtrim($str).'</p>';
}
// Remove empty paragraphs if they are on the first line, as this
@@ -367,7 +367,7 @@ class CI_Typography {
*/
function _protect_characters($match)
{
- return str_replace(array("'",'"','--',' '), array('{@SQ}', '{@DQ}', '{@DD}', '{@NBS}'), $match[0]);
+ return str_replace(array("'",'"','--',' '), array('{@SQ}', '{@DQ}', '{@DD}', '{@NBS}'), $match[0]);
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index 5bd7e801a..c9012f646 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 3177424c4..51fbf772c 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -185,7 +185,7 @@ class CI_Upload {
case 8: // UPLOAD_ERR_EXTENSION
$this->set_error('upload_stopped_by_extension');
break;
- default : $this->set_error('upload_no_file_selected');
+ default : $this->set_error('upload_no_file_selected');
break;
}
@@ -290,7 +290,7 @@ class CI_Upload {
/*
* Run the file through the XSS hacking filter
* This helps prevent malicious code from being
- * embedded within a file. Scripts can easily
+ * embedded within a file. Scripts can easily
* be disguised as images or other file types.
*/
if ($this->xss_clean)
@@ -305,8 +305,8 @@ class CI_Upload {
/*
* Move the file to the final destination
* To deal with different server configurations
- * we'll attempt to use copy() first. If that fails
- * we'll use move_uploaded_file(). One of the two should
+ * we'll attempt to use copy() first. If that fails
+ * we'll use move_uploaded_file(). One of the two should
* reliably work in most environments
*/
if ( ! @copy($this->file_temp, $this->upload_path.$this->file_name))
@@ -321,7 +321,7 @@ class CI_Upload {
/*
* Set the finalized image dimensions
* This sets the image width/height (assuming the
- * file was an image). We use this information
+ * file was an image). We use this information
* in the "data" function.
*/
$this->set_image_properties($this->upload_path.$this->file_name);
@@ -518,7 +518,7 @@ class CI_Upload {
$this->image_width = $D['0'];
$this->image_height = $D['1'];
$this->image_type = ( ! isset($types[$D['2']])) ? 'unknown' : $types[$D['2']];
- $this->image_size_str = $D['3']; // string containing height and width
+ $this->image_size_str = $D['3']; // string containing height and width
}
}
}
@@ -551,7 +551,7 @@ class CI_Upload {
// IE will sometimes return odd mime-types during upload, so here we just standardize all
// jpegs or pngs to the same file type.
- $png_mimes = array('image/x-png');
+ $png_mimes = array('image/x-png');
$jpeg_mimes = array('image/jpg', 'image/jpe', 'image/jpeg', 'image/pjpeg');
if (in_array($this->file_type, $png_mimes))
@@ -642,7 +642,7 @@ class CI_Upload {
*/
public function is_allowed_filesize()
{
- if ($this->max_size != 0 AND $this->file_size > $this->max_size)
+ if ($this->max_size != 0 AND $this->file_size > $this->max_size)
{
return FALSE;
}
@@ -721,7 +721,7 @@ class CI_Upload {
return FALSE;
}
- $this->upload_path = preg_replace("/(.+?)\/*$/", "\\1/", $this->upload_path);
+ $this->upload_path = preg_replace("/(.+?)\/*$/", "\\1/", $this->upload_path);
return TRUE;
}
@@ -834,7 +834,7 @@ class CI_Upload {
$current = ini_get('memory_limit') * 1024 * 1024;
// There was a bug/behavioural change in PHP 5.2, where numbers over one million get output
- // into scientific notation. number_format() ensures this number is an integer
+ // into scientific notation. number_format() ensures this number is an integer
// http://bugs.php.net/bug.php?id=43053
$new_memory = number_format(ceil(filesize($file) + $current), 0, '.', '');
@@ -844,8 +844,8 @@ class CI_Upload {
// If the file being uploaded is an image, then we should have no problem with XSS attacks (in theory), but
// IE can be fooled into mime-type detecting a malformed image as an html file, thus executing an XSS attack on anyone
- // using IE who looks at the image. It does this by inspecting the first 255 bytes of an image. To get around this
- // CI will itself look at the first 255 bytes of an image to determine its relative safety. This can save a lot of
+ // using IE who looks at the image. It does this by inspecting the first 255 bytes of an image. To get around this
+ // CI will itself look at the first 255 bytes of an image to determine its relative safety. This can save a lot of
// processor power and time if it is actually a clean image, as it will be in nearly all instances _except_ an
// attempted XSS attack.
@@ -933,7 +933,7 @@ class CI_Upload {
/**
* List of Mime Types
*
- * This is a list of mime types. We use it to validate
+ * This is a list of mime types. We use it to validate
* the "allowed types" set by the developer
*
* @param string
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index 016102a2a..543d1d5a3 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index 5da6ea6ae..aba609167 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -46,7 +46,7 @@ class CI_Xmlrpc {
var $xmlrpcTypes = array();
var $valid_parents = array();
var $xmlrpcerr = array(); // Response numbers
- var $xmlrpcstr = array(); // Response strings
+ var $xmlrpcstr = array(); // Response strings
var $xmlrpc_defencoding = 'UTF-8';
var $xmlrpcName = 'XML-RPC for CodeIgniter';
@@ -61,12 +61,12 @@ class CI_Xmlrpc {
var $message = '';
var $error = ''; // Error string for request
var $result;
- var $response = array(); // Response from remote server
+ var $response = array(); // Response from remote server
var $xss_clean = TRUE;
//-------------------------------------
- // VALUES THAT MULTIPLE CLASSES NEED
+ // VALUES THAT MULTIPLE CLASSES NEED
//-------------------------------------
public function __construct($config = array())
@@ -112,7 +112,7 @@ class CI_Xmlrpc {
$this->xmlrpcerr['unknown_method'] = '1';
$this->xmlrpcstr['unknown_method'] = 'This is not a known method for this XML-RPC Server';
$this->xmlrpcerr['invalid_return'] = '2';
- $this->xmlrpcstr['invalid_return'] = 'The XML data received was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further.';
+ $this->xmlrpcstr['invalid_return'] = 'The XML data received was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further.';
$this->xmlrpcerr['incorrect_params'] = '3';
$this->xmlrpcstr['incorrect_params'] = 'Incorrect parameters were passed to method';
$this->xmlrpcerr['introspect_unknown'] = '4';
@@ -129,7 +129,7 @@ class CI_Xmlrpc {
//-------------------------------------
- // Initialize Prefs
+ // Initialize Prefs
//-------------------------------------
function initialize($config = array())
@@ -148,7 +148,7 @@ class CI_Xmlrpc {
// END
//-------------------------------------
- // Take URL and parse it
+ // Take URL and parse it
//-------------------------------------
function server($url, $port=80)
@@ -172,7 +172,7 @@ class CI_Xmlrpc {
// END
//-------------------------------------
- // Set Timeout
+ // Set Timeout
//-------------------------------------
function timeout($seconds=5)
@@ -185,7 +185,7 @@ class CI_Xmlrpc {
// END
//-------------------------------------
- // Set Methods
+ // Set Methods
//-------------------------------------
function method($function)
@@ -195,7 +195,7 @@ class CI_Xmlrpc {
// END
//-------------------------------------
- // Take Array of Data and Create Objects
+ // Take Array of Data and Create Objects
//-------------------------------------
function request($incoming)
@@ -216,7 +216,7 @@ class CI_Xmlrpc {
//-------------------------------------
- // Set Debug
+ // Set Debug
//-------------------------------------
function set_debug($flag = TRUE)
@@ -225,7 +225,7 @@ class CI_Xmlrpc {
}
//-------------------------------------
- // Values Parsing
+ // Values Parsing
//-------------------------------------
function values_parsing($value, $return = FALSE)
@@ -268,7 +268,7 @@ class CI_Xmlrpc {
//-------------------------------------
- // Sends XML-RPC Request
+ // Sends XML-RPC Request
//-------------------------------------
function send_request()
@@ -294,7 +294,7 @@ class CI_Xmlrpc {
// END
//-------------------------------------
- // Returns Error
+ // Returns Error
//-------------------------------------
function display_error()
@@ -304,7 +304,7 @@ class CI_Xmlrpc {
// END
//-------------------------------------
- // Returns Remote Server Response
+ // Returns Remote Server Response
//-------------------------------------
function display_response()
@@ -314,7 +314,7 @@ class CI_Xmlrpc {
// END
//-------------------------------------
- // Sends an Error Message for Server Request
+ // Sends an Error Message for Server Request
//-------------------------------------
function send_error_message($number, $message)
@@ -325,7 +325,7 @@ class CI_Xmlrpc {
//-------------------------------------
- // Send Response for Server Request
+ // Send Response for Server Request
//-------------------------------------
function send_response($response)
@@ -399,7 +399,7 @@ class XML_RPC_Client extends CI_Xmlrpc
}
$r = "\r\n";
- $op = "POST {$this->path} HTTP/1.0$r";
+ $op = "POST {$this->path} HTTP/1.0$r";
$op .= "Host: {$this->server}$r";
$op .= "Content-Type: text/xml$r";
$op .= "User-Agent: {$this->xmlrpcName}$r";
@@ -447,7 +447,7 @@ class XML_RPC_Response
else if ( ! is_object($val))
{
// programmer error, not an object
- error_log("Invalid type '" . gettype($val) . "' (value: $val) passed to XML_RPC_Response. Defaulting to empty value.");
+ error_log("Invalid type '" . gettype($val) . "' (value: $val) passed to XML_RPC_Response. Defaulting to empty value.");
$this->val = new XML_RPC_Values();
}
else
@@ -504,7 +504,7 @@ class XML_RPC_Response
function decode($array=FALSE)
{
$CI =& get_instance();
-
+
if ($array !== FALSE && is_array($array))
{
while (list($key) = each($array))
@@ -541,7 +541,7 @@ class XML_RPC_Response
//-------------------------------------
- // XML-RPC Object to PHP Types
+ // XML-RPC Object to PHP Types
//-------------------------------------
function xmlrpc_decoder($xmlrpc_val)
@@ -581,7 +581,7 @@ class XML_RPC_Response
//-------------------------------------
- // ISO-8601 time to server or UTC time
+ // ISO-8601 time to server or UTC time
//-------------------------------------
function iso8601_decode($time, $utc=0)
@@ -630,7 +630,7 @@ class XML_RPC_Message extends CI_Xmlrpc
}
//-------------------------------------
- // Create Payload to Send
+ // Create Payload to Send
//-------------------------------------
function createPayload()
@@ -650,7 +650,7 @@ class XML_RPC_Message extends CI_Xmlrpc
}
//-------------------------------------
- // Parse External XML-RPC Server's Response
+ // Parse External XML-RPC Server's Response
//-------------------------------------
function parseResponse($fp)
@@ -663,7 +663,7 @@ class XML_RPC_Message extends CI_Xmlrpc
}
//-------------------------------------
- // DISPLAY HTTP CONTENT for DEBUGGING
+ // DISPLAY HTTP CONTENT for DEBUGGING
//-------------------------------------
if ($this->debug === TRUE)
@@ -674,7 +674,7 @@ class XML_RPC_Message extends CI_Xmlrpc
}
//-------------------------------------
- // Check for data
+ // Check for data
//-------------------------------------
if ($data == "")
@@ -686,7 +686,7 @@ class XML_RPC_Message extends CI_Xmlrpc
//-------------------------------------
- // Check for HTTP 200 Response
+ // Check for HTTP 200 Response
//-------------------------------------
if (strncmp($data, 'HTTP', 4) == 0 && ! preg_match('/^HTTP\/[0-9\.]+ 200 /', $data))
@@ -697,7 +697,7 @@ class XML_RPC_Message extends CI_Xmlrpc
}
//-------------------------------------
- // Create and Set Up XML Parser
+ // Create and Set Up XML Parser
//-------------------------------------
$parser = xml_parser_create($this->xmlrpc_defencoding);
@@ -718,7 +718,7 @@ class XML_RPC_Message extends CI_Xmlrpc
//-------------------------------------
- // GET HEADERS
+ // GET HEADERS
//-------------------------------------
$lines = explode("\r\n", $data);
@@ -734,7 +734,7 @@ class XML_RPC_Message extends CI_Xmlrpc
//-------------------------------------
- // PARSE XML DATA
+ // PARSE XML DATA
//-------------------------------------
if ( ! xml_parse($parser, $data, count($data)))
@@ -750,7 +750,7 @@ class XML_RPC_Message extends CI_Xmlrpc
xml_parser_free($parser);
// ---------------------------------------
- // Got Ourselves Some Badness, It Seems
+ // Got Ourselves Some Badness, It Seems
// ---------------------------------------
if ($this->xh[$parser]['isf'] > 1)
@@ -772,7 +772,7 @@ class XML_RPC_Message extends CI_Xmlrpc
}
//-------------------------------------
- // DISPLAY XML CONTENT for DEBUGGING
+ // DISPLAY XML CONTENT for DEBUGGING
//-------------------------------------
if ($this->debug === TRUE)
@@ -797,7 +797,7 @@ class XML_RPC_Message extends CI_Xmlrpc
}
//-------------------------------------
- // SEND RESPONSE
+ // SEND RESPONSE
//-------------------------------------
$v = $this->xh[$parser]['value'];
@@ -826,21 +826,21 @@ class XML_RPC_Message extends CI_Xmlrpc
}
// ------------------------------------
- // Begin Return Message Parsing section
+ // Begin Return Message Parsing section
// ------------------------------------
// quick explanation of components:
- // ac - used to accumulate values
- // isf - used to indicate a fault
- // lv - used to indicate "looking for a value": implements
+ // ac - used to accumulate values
+ // isf - used to indicate a fault
+ // lv - used to indicate "looking for a value": implements
// the logic to allow values with no types to be strings
- // params - used to store parameters in method calls
- // method - used to store method name
+ // params - used to store parameters in method calls
+ // method - used to store method name
// stack - array with parent tree of the xml element,
// used to validate the nesting of elements
//-------------------------------------
- // Start Element Handler
+ // Start Element Handler
//-------------------------------------
function open_tag($the_parser, $name, $attrs)
@@ -942,7 +942,7 @@ class XML_RPC_Message extends CI_Xmlrpc
//-------------------------------------
- // End Element Handler
+ // End Element Handler
//-------------------------------------
function closing_tag($the_parser, $name)
@@ -951,7 +951,7 @@ class XML_RPC_Message extends CI_Xmlrpc
// Remove current element from stack and set variable
// NOTE: If the XML validates, then we do not have to worry about
- // the opening and closing of elements. Nesting is checked on the opening
+ // the opening and closing of elements. Nesting is checked on the opening
// tag so we be safe there as well.
$curr_elem = array_shift($this->xh[$the_parser]['stack']);
@@ -1080,13 +1080,13 @@ class XML_RPC_Message extends CI_Xmlrpc
// We're all good kids with nuthin' to do
break;
default:
- // End of an Invalid Element. Taken care of during the opening tag though
+ // End of an Invalid Element. Taken care of during the opening tag though
break;
}
}
//-------------------------------------
- // Parses Character Data
+ // Parses Character Data
//-------------------------------------
function character_data($the_parser, $data)
@@ -1116,7 +1116,7 @@ class XML_RPC_Message extends CI_Xmlrpc
function output_parameters($array=FALSE)
{
$CI =& get_instance();
-
+
if ($array !== FALSE && is_array($array))
{
while (list($key) = each($array))
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index 9cd332147..88af60693 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -132,7 +132,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
function serve()
{
$r = $this->parseRequest();
- $payload = '<?xml version="1.0" encoding="'.$this->xmlrpc_defencoding.'"?'.'>'."\n";
+ $payload = '<?xml version="1.0" encoding="'.$this->xmlrpc_defencoding.'"?'.'>'."\n";
$payload .= $this->debug_msg;
$payload .= $r->prepare_response();
@@ -156,7 +156,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
function add_to_map($methodname, $function, $sig, $doc)
{
$this->methods[$methodname] = array(
- 'function' => $function,
+ 'function' => $function,
'signature' => $sig,
'docstring' => $doc
);
@@ -176,7 +176,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
global $HTTP_RAW_POST_DATA;
//-------------------------------------
- // Get Data
+ // Get Data
//-------------------------------------
if ($data == '')
@@ -185,7 +185,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
}
//-------------------------------------
- // Set up XML Parser
+ // Set up XML Parser
//-------------------------------------
$parser = xml_parser_create($this->xmlrpc_defencoding);
@@ -207,7 +207,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
//-------------------------------------
- // PARSE + PROCESS XML DATA
+ // PARSE + PROCESS XML DATA
//-------------------------------------
if ( ! xml_parse($parser, $data, 1))
@@ -235,7 +235,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
{
if ($this->debug === TRUE)
{
- $plist .= "$i - " . print_r(get_object_vars($parser_object->xh[$parser]['params'][$i]), TRUE). ";\n";
+ $plist .= "$i - " . print_r(get_object_vars($parser_object->xh[$parser]['params'][$i]), TRUE). ";\n";
}
$m->addParam($parser_object->xh[$parser]['params'][$i]);
@@ -252,7 +252,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
}
//-------------------------------------
- // SET DEBUGGING MESSAGE
+ // SET DEBUGGING MESSAGE
//-------------------------------------
if ($this->debug === TRUE)
@@ -285,7 +285,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
}
//-------------------------------------
- // Valid Method
+ // Valid Method
//-------------------------------------
if ( ! isset($this->methods[$methName]['function']))
@@ -294,7 +294,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
}
//-------------------------------------
- // Check for Method (and Object)
+ // Check for Method (and Object)
//-------------------------------------
$method_parts = explode(".", $this->methods[$methName]['function']);
@@ -320,7 +320,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
}
//-------------------------------------
- // Checking Methods Signature
+ // Checking Methods Signature
//-------------------------------------
if (isset($this->methods[$methName]['signature']))
@@ -353,7 +353,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
}
//-------------------------------------
- // Calls the Function
+ // Calls the Function
//-------------------------------------
if ($objectCall === TRUE)
@@ -381,11 +381,11 @@ class CI_Xmlrpcs extends CI_Xmlrpc
return call_user_func($this->methods[$methName]['function'], $m);
}
}
-
+
// --------------------------------------------------------------------
/**
- * Server Function: List Methods
+ * Server Function: List Methods
*
* @access public
* @param mixed
@@ -409,11 +409,11 @@ class CI_Xmlrpcs extends CI_Xmlrpc
$v->addArray($output);
return new XML_RPC_Response($v);
}
-
+
// --------------------------------------------------------------------
/**
- * Server Function: Return Signature for Method
+ * Server Function: Return Signature for Method
*
* @access public
* @param mixed
@@ -458,7 +458,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
// --------------------------------------------------------------------
/**
- * Server Function: Doc String for Method
+ * Server Function: Doc String for Method
*
* @access public
* @param mixed
@@ -480,11 +480,11 @@ class CI_Xmlrpcs extends CI_Xmlrpc
return new XML_RPC_Response(0, $this->xmlrpcerr['introspect_unknown'], $this->xmlrpcstr['introspect_unknown']);
}
}
-
+
// --------------------------------------------------------------------
/**
- * Server Function: Multi-call
+ * Server Function: Multi-call
*
* @access public
* @param mixed
@@ -528,7 +528,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
// --------------------------------------------------------------------
/**
- * Multi-call Function: Error Handling
+ * Multi-call Function: Error Handling
*
* @access public
* @param mixed
@@ -536,7 +536,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
*/
function multicall_error($err)
{
- $str = is_string($err) ? $this->xmlrpcstr["multicall_${err}"] : $err->faultString();
+ $str = is_string($err) ? $this->xmlrpcstr["multicall_${err}"] : $err->faultString();
$code = is_string($err) ? $this->xmlrpcerr["multicall_${err}"] : $err->faultCode();
$struct['faultCode'] = new XML_RPC_Values($code, 'int');
@@ -548,7 +548,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
// --------------------------------------------------------------------
/**
- * Multi-call Function: Processes method
+ * Multi-call Function: Processes method
*
* @access public
* @param mixed
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 666327d5c..1ae3e7f25 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -30,7 +30,7 @@
* @author ExpressionEngine Dev Team
* @link http://codeigniter.com/user_guide/libraries/zip.html
*/
-class CI_Zip {
+class CI_Zip {
var $zipdata = '';
var $directory = '';
@@ -150,7 +150,7 @@ class CI_Zip {
* Add Data to Zip
*
* Lets you add files to the archive. If the path is included
- * in the filename it will be placed within a directory. Make
+ * in the filename it will be placed within a directory. Make
* sure you use add_dir() first to create the folder.
*
* @access public
@@ -192,7 +192,7 @@ class CI_Zip {
$filepath = str_replace("\\", "/", $filepath);
$uncompressed_size = strlen($data);
- $crc32 = crc32($data);
+ $crc32 = crc32($data);
$gzdata = gzcompress($data);
$gzdata = substr($gzdata, 2, -4);
@@ -267,7 +267,7 @@ class CI_Zip {
* Read a directory and add it to the zip.
*
* This function recursively reads a folder and everything it contains (including
- * sub-folders) and creates a zip based on it. Whatever directory structure
+ * sub-folders) and creates a zip based on it. Whatever directory structure
* is in the original file path will be recreated in the zip file.
*
* @access public
@@ -402,7 +402,7 @@ class CI_Zip {
/**
* Initialize Data
*
- * Lets you clear current zip data. Useful if you need to create
+ * Lets you clear current zip data. Useful if you need to create
* multiple zips with different data.
*
* @access public
diff --git a/system/libraries/javascript/Jquery.php b/system/libraries/javascript/Jquery.php
index baab83d25..97107f0cc 100644
--- a/system/libraries/javascript/Jquery.php
+++ b/system/libraries/javascript/Jquery.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
@@ -23,7 +23,7 @@
* @category Loader
* @link http://www.codeigniter.com/user_guide/libraries/javascript.html
*/
-
+
class CI_Jquery extends CI_Javascript {
var $_javascript_folder = 'js';
@@ -36,20 +36,20 @@ class CI_Jquery extends CI_Javascript {
public function __construct($params)
{
- $this->CI =& get_instance();
+ $this->CI =& get_instance();
extract($params);
if ($autoload === TRUE)
{
- $this->script();
+ $this->script();
}
-
+
log_message('debug', "Jquery Class Initialized");
}
-
- // --------------------------------------------------------------------
+
+ // --------------------------------------------------------------------
// Event Code
- // --------------------------------------------------------------------
+ // --------------------------------------------------------------------
/**
* Blur
@@ -65,9 +65,9 @@ class CI_Jquery extends CI_Javascript {
{
return $this->_add_event($element, $js, 'blur');
}
-
+
// --------------------------------------------------------------------
-
+
/**
* Change
*
@@ -82,9 +82,9 @@ class CI_Jquery extends CI_Javascript {
{
return $this->_add_event($element, $js, 'change');
}
-
+
// --------------------------------------------------------------------
-
+
/**
* Click
*
@@ -112,7 +112,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Double Click
*
@@ -129,7 +129,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Error
*
@@ -146,7 +146,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Focus
*
@@ -163,7 +163,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Hover
*
@@ -185,7 +185,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Keydown
*
@@ -202,7 +202,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Keyup
*
@@ -216,10 +216,10 @@ class CI_Jquery extends CI_Javascript {
function _keyup($element = 'this', $js = '')
{
return $this->_add_event($element, $js, 'keyup');
- }
+ }
// --------------------------------------------------------------------
-
+
/**
* Load
*
@@ -233,10 +233,10 @@ class CI_Jquery extends CI_Javascript {
function _load($element = 'this', $js = '')
{
return $this->_add_event($element, $js, 'load');
- }
-
+ }
+
// --------------------------------------------------------------------
-
+
/**
* Mousedown
*
@@ -253,7 +253,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Mouse Out
*
@@ -270,7 +270,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Mouse Over
*
@@ -321,7 +321,7 @@ class CI_Jquery extends CI_Javascript {
{
$array_js = array($array_js);
}
-
+
foreach ($array_js as $js)
{
$this->jquery_code_for_compile[] = "\t$js\n";
@@ -361,7 +361,7 @@ class CI_Jquery extends CI_Javascript {
{
return $this->_add_event($element, $js, 'scroll');
}
-
+
// --------------------------------------------------------------------
/**
@@ -379,10 +379,10 @@ class CI_Jquery extends CI_Javascript {
return $this->_add_event($element, $js, 'unload');
}
- // --------------------------------------------------------------------
+ // --------------------------------------------------------------------
// Effects
- // --------------------------------------------------------------------
-
+ // --------------------------------------------------------------------
+
/**
* Add Class
*
@@ -395,7 +395,7 @@ class CI_Jquery extends CI_Javascript {
function _addClass($element = 'this', $class='')
{
$element = $this->_prep_element($element);
- $str = "$({$element}).addClass(\"$class\");";
+ $str = "$({$element}).addClass(\"$class\");";
return $str;
}
@@ -416,9 +416,9 @@ class CI_Jquery extends CI_Javascript {
{
$element = $this->_prep_element($element);
$speed = $this->_validate_speed($speed);
-
+
$animations = "\t\t\t";
-
+
foreach ($params as $param=>$value)
{
$animations .= $param.': \''.$value.'\', ';
@@ -430,19 +430,19 @@ class CI_Jquery extends CI_Javascript {
{
$speed = ', '.$speed;
}
-
+
if ($extra != '')
{
$extra = ', '.$extra;
}
-
- $str = "$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.");";
-
+
+ $str = "$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.");";
+
return $str;
}
// --------------------------------------------------------------------
-
+
/**
* Fade In
*
@@ -456,21 +456,21 @@ class CI_Jquery extends CI_Javascript {
*/
function _fadeIn($element = 'this', $speed = '', $callback = '')
{
- $element = $this->_prep_element($element);
+ $element = $this->_prep_element($element);
$speed = $this->_validate_speed($speed);
-
+
if ($callback != '')
{
$callback = ", function(){\n{$callback}\n}";
}
-
- $str = "$({$element}).fadeIn({$speed}{$callback});";
-
+
+ $str = "$({$element}).fadeIn({$speed}{$callback});";
+
return $str;
}
-
+
// --------------------------------------------------------------------
-
+
/**
* Fade Out
*
@@ -486,14 +486,14 @@ class CI_Jquery extends CI_Javascript {
{
$element = $this->_prep_element($element);
$speed = $this->_validate_speed($speed);
-
+
if ($callback != '')
{
$callback = ", function(){\n{$callback}\n}";
}
-
- $str = "$({$element}).fadeOut({$speed}{$callback});";
-
+
+ $str = "$({$element}).fadeOut({$speed}{$callback});";
+
return $str;
}
@@ -512,19 +512,19 @@ class CI_Jquery extends CI_Javascript {
*/
function _hide($element = 'this', $speed = '', $callback = '')
{
- $element = $this->_prep_element($element);
+ $element = $this->_prep_element($element);
$speed = $this->_validate_speed($speed);
-
+
if ($callback != '')
{
$callback = ", function(){\n{$callback}\n}";
}
-
- $str = "$({$element}).hide({$speed}{$callback});";
+
+ $str = "$({$element}).hide({$speed}{$callback});";
return $str;
}
-
+
// --------------------------------------------------------------------
/**
@@ -539,12 +539,12 @@ class CI_Jquery extends CI_Javascript {
function _removeClass($element = 'this', $class='')
{
$element = $this->_prep_element($element);
- $str = "$({$element}).removeClass(\"$class\");";
+ $str = "$({$element}).removeClass(\"$class\");";
return $str;
}
// --------------------------------------------------------------------
-
+
/**
* Slide Up
*
@@ -558,21 +558,21 @@ class CI_Jquery extends CI_Javascript {
*/
function _slideUp($element = 'this', $speed = '', $callback = '')
{
- $element = $this->_prep_element($element);
+ $element = $this->_prep_element($element);
$speed = $this->_validate_speed($speed);
-
+
if ($callback != '')
{
$callback = ", function(){\n{$callback}\n}";
}
-
- $str = "$({$element}).slideUp({$speed}{$callback});";
-
+
+ $str = "$({$element}).slideUp({$speed}{$callback});";
+
return $str;
}
-
+
// --------------------------------------------------------------------
-
+
/**
* Slide Down
*
@@ -588,19 +588,19 @@ class CI_Jquery extends CI_Javascript {
{
$element = $this->_prep_element($element);
$speed = $this->_validate_speed($speed);
-
+
if ($callback != '')
{
$callback = ", function(){\n{$callback}\n}";
}
-
- $str = "$({$element}).slideDown({$speed}{$callback});";
-
+
+ $str = "$({$element}).slideDown({$speed}{$callback});";
+
return $str;
}
// --------------------------------------------------------------------
-
+
/**
* Slide Toggle
*
@@ -616,19 +616,19 @@ class CI_Jquery extends CI_Javascript {
{
$element = $this->_prep_element($element);
$speed = $this->_validate_speed($speed);
-
+
if ($callback != '')
{
$callback = ", function(){\n{$callback}\n}";
}
-
- $str = "$({$element}).slideToggle({$speed}{$callback});";
-
+
+ $str = "$({$element}).slideToggle({$speed}{$callback});";
+
return $str;
}
-
+
// --------------------------------------------------------------------
-
+
/**
* Toggle
*
@@ -641,12 +641,12 @@ class CI_Jquery extends CI_Javascript {
function _toggle($element = 'this')
{
$element = $this->_prep_element($element);
- $str = "$({$element}).toggle();";
+ $str = "$({$element}).toggle();";
return $str;
}
-
+
// --------------------------------------------------------------------
-
+
/**
* Toggle Class
*
@@ -659,12 +659,12 @@ class CI_Jquery extends CI_Javascript {
function _toggleClass($element = 'this', $class='')
{
$element = $this->_prep_element($element);
- $str = "$({$element}).toggleClass(\"$class\");";
+ $str = "$({$element}).toggleClass(\"$class\");";
return $str;
}
-
+
// --------------------------------------------------------------------
-
+
/**
* Show
*
@@ -678,16 +678,16 @@ class CI_Jquery extends CI_Javascript {
*/
function _show($element = 'this', $speed = '', $callback = '')
{
- $element = $this->_prep_element($element);
+ $element = $this->_prep_element($element);
$speed = $this->_validate_speed($speed);
-
+
if ($callback != '')
{
$callback = ", function(){\n{$callback}\n}";
}
-
- $str = "$({$element}).show({$speed}{$callback});";
-
+
+ $str = "$({$element}).show({$speed}{$callback});";
+
return $str;
}
@@ -696,7 +696,7 @@ class CI_Jquery extends CI_Javascript {
/**
* Updater
*
- * An Ajax call that populates the designated DOM node with
+ * An Ajax call that populates the designated DOM node with
* returned content
*
* @access private
@@ -705,13 +705,13 @@ class CI_Jquery extends CI_Javascript {
* @param string optional parameters
* @return string
*/
-
+
function _updater($container = 'this', $controller, $options = '')
- {
+ {
$container = $this->_prep_element($container);
-
+
$controller = (strpos('://', $controller) === FALSE) ? $controller : $this->CI->config->site_url($controller);
-
+
// ajaxStart and ajaxStop are better choices here... but this is a stop gap
if ($this->CI->config->item('javascript_ajax_img') == '')
{
@@ -721,7 +721,7 @@ class CI_Jquery extends CI_Javascript {
{
$loading_notifier = '<img src=\'' . $this->CI->config->slash_item('base_url') . $this->CI->config->item('javascript_ajax_img') . '\' alt=\'Loading\' />';
}
-
+
$updater = "$($container).empty();\n"; // anything that was in... get it out
$updater .= "\t\t$($container).prepend(\"$loading_notifier\");\n"; // to replace with an image
@@ -741,7 +741,7 @@ class CI_Jquery extends CI_Javascript {
// --------------------------------------------------------------------
// Pre-written handy stuff
// --------------------------------------------------------------------
-
+
/**
* Zebra tables
*
@@ -753,8 +753,8 @@ class CI_Jquery extends CI_Javascript {
function _zebraTables($class = '', $odd = 'odd', $hover = '')
{
$class = ($class != '') ? '.'.$class : '';
-
- $zebra = "\t\$(\"table{$class} tbody tr:nth-child(even)\").addClass(\"{$odd}\");";
+
+ $zebra = "\t\$(\"table{$class} tbody tr:nth-child(even)\").addClass(\"{$odd}\");";
$this->jquery_code_for_compile[] = $zebra;
@@ -771,7 +771,7 @@ class CI_Jquery extends CI_Javascript {
// --------------------------------------------------------------------
// Plugins
// --------------------------------------------------------------------
-
+
/**
* Corner Plugin
*
@@ -793,7 +793,7 @@ class CI_Jquery extends CI_Javascript {
return "$(" . $this->_prep_element($element) . ").corner(".$corner_style.");";
}
-
+
// --------------------------------------------------------------------
/**
@@ -805,7 +805,7 @@ class CI_Jquery extends CI_Javascript {
* @return void
*/
function modal($src, $relative = FALSE)
- {
+ {
$this->jquery_code_for_load[] = $this->external($src, $relative);
}
@@ -897,7 +897,7 @@ class CI_Jquery extends CI_Javascript {
{
$this->jquery_code_for_compile[] = "\t$(" . $this->_prep_element($table) . ").tablesorter($options);\n";
}
-
+
// --------------------------------------------------------------------
// Class functions
// --------------------------------------------------------------------
@@ -912,7 +912,7 @@ class CI_Jquery extends CI_Javascript {
* @param string The code to execute
* @param string The event to pass
* @return string
- */
+ */
function _add_event($element, $js, $event)
{
if (is_array($js))
@@ -953,15 +953,15 @@ class CI_Jquery extends CI_Javascript {
$script = '$(document).ready(function() {' . "\n";
$script .= implode('', $this->jquery_code_for_compile);
$script .= '});';
-
+
$output = ($script_tags === FALSE) ? $script : $this->inline($script);
$this->CI->load->vars(array($view_var => $output));
}
-
+
// --------------------------------------------------------------------
-
+
/**
* Clear Compile
*
@@ -976,7 +976,7 @@ class CI_Jquery extends CI_Javascript {
}
// --------------------------------------------------------------------
-
+
/**
* Document Ready
*
@@ -992,7 +992,7 @@ class CI_Jquery extends CI_Javascript {
$js = array ($js);
}
-
+
foreach ($js as $script)
{
$this->jquery_code_for_compile[] = $script;
@@ -1016,7 +1016,7 @@ class CI_Jquery extends CI_Javascript {
$this->jquery_code_for_load[] = $library_src;
return $library_src;
}
-
+
// --------------------------------------------------------------------
/**
@@ -1036,10 +1036,10 @@ class CI_Jquery extends CI_Javascript {
{
$element = '"'.$element.'"';
}
-
+
return $element;
}
-
+
// --------------------------------------------------------------------
/**
@@ -1050,7 +1050,7 @@ class CI_Jquery extends CI_Javascript {
* @access private
* @param string
* @return string
- */
+ */
function _validate_speed($speed)
{
if (in_array($speed, array('slow', 'normal', 'fast')))
@@ -1061,7 +1061,7 @@ class CI_Jquery extends CI_Javascript {
{
$speed = '';
}
-
+
return $speed;
}