summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/.htaccess7
-rw-r--r--system/core/Common.php41
-rw-r--r--system/core/Input.php25
-rw-r--r--system/core/Loader.php6
-rw-r--r--system/core/Output.php6
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--system/database/drivers/pdo/pdo_driver.php2
-rw-r--r--system/database/drivers/postgre/postgre_driver.php2
-rw-r--r--system/database/drivers/sqlite3/sqlite3_forge.php2
-rw-r--r--system/database/drivers/sqlite3/sqlite3_result.php2
-rw-r--r--system/database/drivers/sqlite3/sqlite3_utility.php2
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php2
-rw-r--r--system/helpers/captcha_helper.php3
-rw-r--r--system/helpers/date_helper.php17
-rw-r--r--system/helpers/file_helper.php4
-rw-r--r--system/helpers/form_helper.php7
-rw-r--r--system/helpers/html_helper.php30
-rw-r--r--system/helpers/path_helper.php2
-rw-r--r--system/helpers/security_helper.php2
-rw-r--r--system/helpers/typography_helper.php4
-rw-r--r--system/helpers/url_helper.php50
-rw-r--r--system/language/english/calendar_lang.php91
-rw-r--r--system/language/english/date_lang.php1
-rw-r--r--system/language/english/email_lang.php37
-rw-r--r--system/language/english/form_validation_lang.php53
-rw-r--r--system/language/english/ftp_lang.php25
-rw-r--r--system/language/english/imglib_lang.php37
-rw-r--r--system/language/english/migration_lang.php14
-rw-r--r--system/language/english/unit_test_lang.php1
-rw-r--r--system/language/english/upload_lang.php33
-rw-r--r--system/libraries/Cache/drivers/Cache_wincache.php2
-rw-r--r--system/libraries/Email.php20
-rw-r--r--system/libraries/Migration.php2
-rw-r--r--system/libraries/Pagination.php38
-rw-r--r--system/libraries/Xmlrpcs.php2
35 files changed, 300 insertions, 274 deletions
diff --git a/system/.htaccess b/system/.htaccess
index 14249c50b..6c63ed4c4 100644
--- a/system/.htaccess
+++ b/system/.htaccess
@@ -1 +1,6 @@
-Deny from all \ No newline at end of file
+<IfModule authz_core_module>
+ Require all denied
+</IfModule>
+<IfModule !authz_core_module>
+ Deny from all
+</IfModule> \ No newline at end of file
diff --git a/system/core/Common.php b/system/core/Common.php
index 7e93ed46d..57374b07d 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -172,7 +172,7 @@ if ( ! function_exists('load_class'))
if ($name === FALSE)
{
// Note: We use exit() rather then show_error() in order to avoid a
- // self-referencing loop with the Excptions class
+ // self-referencing loop with the Exceptions class
set_status_header(503);
exit('Unable to locate the specified class: '.$class.'.php');
}
@@ -598,5 +598,44 @@ if ( ! function_exists('html_escape'))
}
}
+// ------------------------------------------------------------------------
+
+if ( ! function_exists('_stringify_attributes'))
+{
+ /**
+ * Stringify attributes for use in HTML tags.
+ *
+ * Helper function used to convert a string, array, or object
+ * of attributes to a string.
+ *
+ * @param mixed string, array, object
+ * @param bool
+ * @return string
+ */
+ function _stringify_attributes($attributes, $js = FALSE)
+ {
+ $atts = NULL;
+
+ if (empty($attributes))
+ {
+ return $atts;
+ }
+
+ if (is_string($attributes))
+ {
+ return ' '.$attributes;
+ }
+
+ $attributes = (array) $attributes;
+
+ foreach ($attributes as $key => $val)
+ {
+ $atts .= ($js) ? $key.'='.$val.',' : ' '.$key.'="'.$val.'"';
+ }
+
+ return rtrim($atts, ',');
+ }
+}
+
/* End of file Common.php */
/* Location: ./system/core/Common.php */ \ No newline at end of file
diff --git a/system/core/Input.php b/system/core/Input.php
index 162e40c85..968a42a9a 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -330,10 +330,33 @@ class CI_Input {
if (config_item('proxy_ips') != '' && $this->server('HTTP_X_FORWARDED_FOR') && $this->server('REMOTE_ADDR'))
{
+ $has_ranges = strpos($proxies, '/') !== false;
$proxies = preg_split('/[\s,]/', config_item('proxy_ips'), -1, PREG_SPLIT_NO_EMPTY);
$proxies = is_array($proxies) ? $proxies : array($proxies);
+
+ if ($has_ranges)
+ {
+ $long_ip = ip2long($_SERVER['REMOTE_ADDR']);
+ $bit_32 = 1 << 32;
+
+ // Go through each of the IP Addresses to check for and
+ // test against range notation
+ foreach($proxies as $ip)
+ {
+ list($address, $mask_length) = explode('/', $ip);
+
+ // Generate the bitmask for a 32 bit IP Address
+ $bitmask = $bit_32 - (1 << (32 - (int)$mask_length));
+ if (($long_ip & $bitmask) == $address)
+ {
+ $this->ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
+ break;
+ }
+ }
- $this->ip_address = in_array($_SERVER['REMOTE_ADDR'], $proxies) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
+ } else {
+ $this->ip_address = in_array($_SERVER['REMOTE_ADDR'], $proxies) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
+ }
}
elseif ( ! $this->server('HTTP_CLIENT_IP') && $this->server('REMOTE_ADDR'))
{
diff --git a/system/core/Loader.php b/system/core/Loader.php
index d51ee0b34..0bc6e844a 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -237,9 +237,9 @@ class CI_Loader {
{
if (is_array($model))
{
- foreach ($model as $babe)
+ foreach ($model as $class)
{
- $this->model($babe);
+ $this->model($class);
}
return;
}
@@ -1091,7 +1091,7 @@ class CI_Loader {
if ( ! class_exists($name))
{
log_message('error', 'Non-existent class: '.$name);
- show_error('Non-existent class: '.$class);
+ show_error('Non-existent class: '.$name);
}
// Set the variable name we will assign the class to
diff --git a/system/core/Output.php b/system/core/Output.php
index 5ec8c4bc0..9842f834d 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -552,13 +552,13 @@ class CI_Output {
fclose($fp);
// Strip out the embedded timestamp
- if ( ! preg_match('/(\d+TS--->)/', $cache, $match))
+ if ( ! preg_match('/\d+TS--->/', $cache, $match))
{
return FALSE;
}
$last_modified = filemtime($cache_path);
- $expire = trim(str_replace('TS--->', '', $match[1]));
+ $expire = str_replace('TS--->', '', $match[0]);
// Has the file expired?
if ($_SERVER['REQUEST_TIME'] >= $expire && is_really_writable($cache_path))
@@ -575,7 +575,7 @@ class CI_Output {
}
// Display the cache
- $this->_display(str_replace($match[0], '', $cache));
+ $this->_display(substr($cache, strlen($match[0])));
log_message('debug', 'Cache file is current. Sending it to browser.');
return TRUE;
}
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index e9efc8914..d63a1d955 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -985,7 +985,7 @@ abstract class CI_DB_driver {
return $item;
}
// Avoid breaking functions and literal values inside queries
- elseif (ctype_digit($item) OR $item[0] === "'" OR strpos($item, '(') !== FALSE)
+ elseif (ctype_digit($item) OR $item[0] === "'" OR ($this->_escape_char !== '"' && $item[0] === '"') OR strpos($item, '(') !== FALSE)
{
return $item;
}
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index b36a3d927..705b16560 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -366,7 +366,7 @@ class CI_DB_pdo_driver extends CI_DB {
protected function _update_batch($table, $values, $index, $where = NULL)
{
$ids = array();
- $where = ($where !== '' && count($where) >=1) ? implode(" ", $where).' AND ' : '';
+ $where = ($where !== '' && count($where) >=1) ? implode(' ', $where).' AND ' : '';
foreach ($values as $key => $val)
{
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index c24c523de..8c11c477b 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -537,7 +537,7 @@ class CI_DB_postgre_driver extends CI_DB {
$cases = '';
foreach ($final as $k => $v)
{
- $cases .= $k.' = (CASE '.$k."\n"
+ $cases .= $k.' = (CASE '.$index."\n"
.implode("\n", $v)."\n"
.'ELSE '.$k.' END), ';
}
diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php
index 6a76ba929..f9ae5bcce 100644
--- a/system/database/drivers/sqlite3/sqlite3_forge.php
+++ b/system/database/drivers/sqlite3/sqlite3_forge.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
diff --git a/system/database/drivers/sqlite3/sqlite3_result.php b/system/database/drivers/sqlite3/sqlite3_result.php
index 8e9b9c15f..117fb3ce8 100644
--- a/system/database/drivers/sqlite3/sqlite3_result.php
+++ b/system/database/drivers/sqlite3/sqlite3_result.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
diff --git a/system/database/drivers/sqlite3/sqlite3_utility.php b/system/database/drivers/sqlite3/sqlite3_utility.php
index 965c838e5..f58c3d168 100644
--- a/system/database/drivers/sqlite3/sqlite3_utility.php
+++ b/system/database/drivers/sqlite3/sqlite3_utility.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php
index 8bd18bd76..bda450e88 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -225,7 +225,7 @@ class CI_DB_sqlsrv_driver extends CI_DB {
*/
public function affected_rows()
{
- return sqlrv_rows_affected($this->result_id);
+ return sqlsrv_rows_affected($this->result_id);
}
// --------------------------------------------------------------------
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 4676b2a65..a4383c9d3 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -32,7 +32,7 @@
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link http://codeigniter.com/user_guide/helpers/xml_helper.html
+ * @link http://codeigniter.com/user_guide/helpers/captcha_helper.html
*/
// ------------------------------------------------------------------------
@@ -186,7 +186,6 @@ if ( ! function_exists('create_captcha'))
}
}
-
// Create the border
imagerectangle($im, 0, 0, $img_width - 1, $img_height - 1, $border_color);
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index a45b3d7ac..a792f09a2 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -575,22 +575,7 @@ if ( ! function_exists('timezone_menu'))
$menu .= ' class="'.$class.'"';
}
- // Generate a string from the attributes submitted, if any
- if (is_array($attributes))
- {
- $atts = '';
- foreach ($attributes as $key => $val)
- {
- $atts .= ' '.$key.'="'.$val.'"';
- }
- $attributes = $atts;
- }
- elseif (is_string($attributes) && strlen($attributes) > 0)
- {
- $attributes = ' '.$attributes;
- }
-
- $menu .= $attributes.">\n";
+ $menu .= _stringify_attributes($attributes).">\n";
foreach (timezones() as $key => $val)
{
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 7270ee32c..e68bb7f7a 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -32,7 +32,7 @@
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link http://codeigniter.com/user_guide/helpers/file_helpers.html
+ * @link http://codeigniter.com/user_guide/helpers/file_helper.html
*/
// ------------------------------------------------------------------------
@@ -124,7 +124,7 @@ if ( ! function_exists('delete_files'))
{
delete_files($path.DIRECTORY_SEPARATOR.$filename, $del_dir, $level + 1, $htdocs);
}
- elseif ($htdocs === TRUE && ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename))
+ elseif ($htdocs !== TRUE OR ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename))
{
@unlink($path.DIRECTORY_SEPARATOR.$filename);
}
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 0c5d55037..1bccac35c 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -340,8 +340,13 @@ if ( ! function_exists('form_dropdown'))
{
$key = (string) $key;
- if (is_array($val) && ! empty($val))
+ if (is_array($val))
{
+ if (empty($val))
+ {
+ continue;
+ }
+
$form .= '<optgroup label="'.$key."\">\n";
foreach ($val as $optgroup_key => $optgroup_val)
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index 68ce70248..9843e804e 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -51,7 +51,7 @@ if ( ! function_exists('heading'))
*/
function heading($data = '', $h = '1', $attributes = '')
{
- return '<h'.$h.($attributes !== '' ? ' ' : '').$attributes.'>'.$data.'</h'.$h.'>';
+ return '<h'.$h._stringify_attributes($attributes).'>'.$data.'</h'.$h.'>';
}
}
@@ -119,23 +119,8 @@ if ( ! function_exists('_list'))
// Set the indentation based on the depth
$out = str_repeat(' ', $depth);
- // Were any attributes submitted? If so generate a string
- if (is_array($attributes))
- {
- $atts = '';
- foreach ($attributes as $key => $val)
- {
- $atts .= ' '.$key.'="'.$val.'"';
- }
- $attributes = $atts;
- }
- elseif (is_string($attributes) && strlen($attributes) > 0)
- {
- $attributes = ' '.$attributes;
- }
-
// Write the opening list tag
- $out .= '<'.$type.$attributes.">\n";
+ $out .= '<'.$type._stringify_attributes($attributes).">\n";
// Cycle through the list elements. If an array is
// encountered we will recursively call _list()
@@ -191,9 +176,10 @@ if ( ! function_exists('img'))
*
* @param mixed
* @param bool
+ * @param mixed
* @return string
*/
- function img($src = '', $index_page = FALSE)
+ function img($src = '', $index_page = FALSE, $attributes = '')
{
if ( ! is_array($src) )
{
@@ -229,7 +215,7 @@ if ( ! function_exists('img'))
}
}
- return $img.'/>';
+ return $img._stringify_attributes($attributes).'/>';
}
}
@@ -242,9 +228,9 @@ if ( ! function_exists('doctype'))
*
* Generates a page document type declaration
*
- * Valid options are xhtml-11, xhtml-strict, xhtml-trans, xhtml-frame,
- * html4-strict, html4-trans, and html4-frame. Values are saved in the
- * doctypes config file.
+ * Examples of valid options: html5, xhtml-11, xhtml-strict, xhtml-trans,
+ * xhtml-frame, html4-strict, html4-trans, and html4-frame.
+ * All values are saved in the doctypes config file.
*
* @param string type The doctype to be generated
* @return string
diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php
index fec4a1a10..166fef065 100644
--- a/system/helpers/path_helper.php
+++ b/system/helpers/path_helper.php
@@ -32,7 +32,7 @@
* @subpackage Helpers
* @category Helpers
* @author EllisLab Dev Team
- * @link http://codeigniter.com/user_guide/helpers/xml_helper.html
+ * @link http://codeigniter.com/user_guide/helpers/path_helper.html
*/
// ------------------------------------------------------------------------
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index 0e8e9f93d..5ecc960bc 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.php
@@ -125,7 +125,7 @@ if ( ! function_exists('encode_php_tags'))
*/
function encode_php_tags($str)
{
- return str_replace(array('<?', '?>'), array('&lt;?', '?&gt;'), $str);
+ return str_replace(array('<?', '?>'), array('&lt;?', '?&gt;'), $str);
}
}
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index af9d16a89..9dbba0679 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -65,11 +65,11 @@ if ( ! function_exists('auto_typography'))
* @param bool whether to reduce multiple instances of double newlines to two
* @return string
*/
- function auto_typography($str, $strip_js_event_handlers = TRUE, $reduce_linebreaks = FALSE)
+ function auto_typography($str, $reduce_linebreaks = FALSE)
{
$CI =& get_instance();
$CI->load->library('typography');
- return $CI->typography->auto_typography($str, $strip_js_event_handlers, $reduce_linebreaks);
+ return $CI->typography->auto_typography($str, $reduce_linebreaks);
}
}
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 39e6343a6..57208c948 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -165,7 +165,7 @@ if ( ! function_exists('anchor'))
if ($attributes !== '')
{
- $attributes = _parse_attributes($attributes);
+ $attributes = _stringify_attributes($attributes);
}
return '<a href="'.$site_url.'"'.$attributes.'>'.$title.'</a>';
@@ -221,10 +221,10 @@ if ( ! function_exists('anchor_popup'))
unset($attributes[$key]);
}
- $attributes = empty($attributes) ? '' : _parse_attributes($attributes);
+ $attributes = _stringify_attributes($attributes);
return '<a href="'.$site_url
- .'" onclick="window.open(\''.$site_url."', '".$window_name."', '"._parse_attributes($atts, TRUE)."'); return false;\""
+ .'" onclick="window.open(\''.$site_url."', '".$window_name."', '"._stringify_attributes($atts, TRUE)."'); return false;\""
.$attributes.'>'.$title.'</a>';
}
}
@@ -250,7 +250,7 @@ if ( ! function_exists('mailto'))
$title = $email;
}
- return '<a href="mailto:'.$email.'"'._parse_attributes($attributes).'>'.$title.'</a>';
+ return '<a href="mailto:'.$email.'"'._stringify_attributes($attributes).'>'.$title.'</a>';
}
}
@@ -560,47 +560,5 @@ if ( ! function_exists('redirect'))
}
}
-// ------------------------------------------------------------------------
-
-if ( ! function_exists('_parse_attributes'))
-{
- /**
- * Parse out the attributes
- *
- * Some of the functions use this
- *
- * @param array
- * @param bool
- * @return string
- */
- function _parse_attributes($attributes, $javascript = FALSE)
- {
- if (is_string($attributes))
- {
- return ($attributes !== '') ? ' '.$attributes : '';
- }
-
- $att = '';
- foreach ($attributes as $key => $val)
- {
- if ($javascript === TRUE)
- {
- $att .= $key.'='.$val.',';
- }
- else
- {
- $att .= ' '.$key.'="'.$val.'"';
- }
- }
-
- if ($javascript === TRUE && $att !== '')
- {
- return substr($att, 0, -1);
- }
-
- return $att;
- }
-}
-
/* End of file url_helper.php */
/* Location: ./system/helpers/url_helper.php */ \ No newline at end of file
diff --git a/system/language/english/calendar_lang.php b/system/language/english/calendar_lang.php
index 48939d476..a70a564e8 100644
--- a/system/language/english/calendar_lang.php
+++ b/system/language/english/calendar_lang.php
@@ -25,52 +25,51 @@
* @filesource
*/
-$lang['cal_su'] = "Su";
-$lang['cal_mo'] = "Mo";
-$lang['cal_tu'] = "Tu";
-$lang['cal_we'] = "We";
-$lang['cal_th'] = "Th";
-$lang['cal_fr'] = "Fr";
-$lang['cal_sa'] = "Sa";
-$lang['cal_sun'] = "Sun";
-$lang['cal_mon'] = "Mon";
-$lang['cal_tue'] = "Tue";
-$lang['cal_wed'] = "Wed";
-$lang['cal_thu'] = "Thu";
-$lang['cal_fri'] = "Fri";
-$lang['cal_sat'] = "Sat";
-$lang['cal_sunday'] = "Sunday";
-$lang['cal_monday'] = "Monday";
-$lang['cal_tuesday'] = "Tuesday";
-$lang['cal_wednesday'] = "Wednesday";
-$lang['cal_thursday'] = "Thursday";
-$lang['cal_friday'] = "Friday";
-$lang['cal_saturday'] = "Saturday";
-$lang['cal_jan'] = "Jan";
-$lang['cal_feb'] = "Feb";
-$lang['cal_mar'] = "Mar";
-$lang['cal_apr'] = "Apr";
-$lang['cal_may'] = "May";
-$lang['cal_jun'] = "Jun";
-$lang['cal_jul'] = "Jul";
-$lang['cal_aug'] = "Aug";
-$lang['cal_sep'] = "Sep";
-$lang['cal_oct'] = "Oct";
-$lang['cal_nov'] = "Nov";
-$lang['cal_dec'] = "Dec";
-$lang['cal_january'] = "January";
-$lang['cal_february'] = "February";
-$lang['cal_march'] = "March";
-$lang['cal_april'] = "April";
-$lang['cal_mayl'] = "May";
-$lang['cal_june'] = "June";
-$lang['cal_july'] = "July";
-$lang['cal_august'] = "August";
-$lang['cal_september'] = "September";
-$lang['cal_october'] = "October";
-$lang['cal_november'] = "November";
-$lang['cal_december'] = "December";
-
+$lang['cal_su'] = 'Su';
+$lang['cal_mo'] = 'Mo';
+$lang['cal_tu'] = 'Tu';
+$lang['cal_we'] = 'We';
+$lang['cal_th'] = 'Th';
+$lang['cal_fr'] = 'Fr';
+$lang['cal_sa'] = 'Sa';
+$lang['cal_sun'] = 'Sun';
+$lang['cal_mon'] = 'Mon';
+$lang['cal_tue'] = 'Tue';
+$lang['cal_wed'] = 'Wed';
+$lang['cal_thu'] = 'Thu';
+$lang['cal_fri'] = 'Fri';
+$lang['cal_sat'] = 'Sat';
+$lang['cal_sunday'] = 'Sunday';
+$lang['cal_monday'] = 'Monday';
+$lang['cal_tuesday'] = 'Tuesday';
+$lang['cal_wednesday'] = 'Wednesday';
+$lang['cal_thursday'] = 'Thursday';
+$lang['cal_friday'] = 'Friday';
+$lang['cal_saturday'] = 'Saturday';
+$lang['cal_jan'] = 'Jan';
+$lang['cal_feb'] = 'Feb';
+$lang['cal_mar'] = 'Mar';
+$lang['cal_apr'] = 'Apr';
+$lang['cal_may'] = 'May';
+$lang['cal_jun'] = 'Jun';
+$lang['cal_jul'] = 'Jul';
+$lang['cal_aug'] = 'Aug';
+$lang['cal_sep'] = 'Sep';
+$lang['cal_oct'] = 'Oct';
+$lang['cal_nov'] = 'Nov';
+$lang['cal_dec'] = 'Dec';
+$lang['cal_january'] = 'January';
+$lang['cal_february'] = 'February';
+$lang['cal_march'] = 'March';
+$lang['cal_april'] = 'April';
+$lang['cal_mayl'] = 'May';
+$lang['cal_june'] = 'June';
+$lang['cal_july'] = 'July';
+$lang['cal_august'] = 'August';
+$lang['cal_september'] = 'September';
+$lang['cal_october'] = 'October';
+$lang['cal_november'] = 'November';
+$lang['cal_december'] = 'December';
/* End of file calendar_lang.php */
/* Location: ./system/language/english/calendar_lang.php */ \ No newline at end of file
diff --git a/system/language/english/date_lang.php b/system/language/english/date_lang.php
index 38532b76f..229d33d2e 100644
--- a/system/language/english/date_lang.php
+++ b/system/language/english/date_lang.php
@@ -81,6 +81,5 @@ $lang['UP1275'] = '(UTC +12:45) Chatham Islands Standard Time';
$lang['UP13'] = '(UTC +13:00) Samoa Time Zone, Phoenix Islands Time, Tonga';
$lang['UP14'] = '(UTC +14:00) Line Islands';
-
/* End of file date_lang.php */
/* Location: ./system/language/english/date_lang.php */ \ No newline at end of file
diff --git a/system/language/english/email_lang.php b/system/language/english/email_lang.php
index 95a16d12b..0de9aa27e 100644
--- a/system/language/english/email_lang.php
+++ b/system/language/english/email_lang.php
@@ -25,25 +25,24 @@
* @filesource
*/
-$lang['email_must_be_array'] = "The email validation method must be passed an array.";
-$lang['email_invalid_address'] = "Invalid email address: %s";
-$lang['email_attachment_missing'] = "Unable to locate the following email attachment: %s";
-$lang['email_attachment_unreadable'] = "Unable to open this attachment: %s";
-$lang['email_no_recipients'] = "You must include recipients: To, Cc, or Bcc";
-$lang['email_send_failure_phpmail'] = "Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.";
-$lang['email_send_failure_sendmail'] = "Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.";
-$lang['email_send_failure_smtp'] = "Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.";
-$lang['email_sent'] = "Your message has been successfully sent using the following protocol: %s";
-$lang['email_no_socket'] = "Unable to open a socket to Sendmail. Please check settings.";
-$lang['email_no_hostname'] = "You did not specify a SMTP hostname.";
-$lang['email_smtp_error'] = "The following SMTP error was encountered: %s";
-$lang['email_no_smtp_unpw'] = "Error: You must assign a SMTP username and password.";
-$lang['email_failed_smtp_login'] = "Failed to send AUTH LOGIN command. Error: %s";
-$lang['email_smtp_auth_un'] = "Failed to authenticate username. Error: %s";
-$lang['email_smtp_auth_pw'] = "Failed to authenticate password. Error: %s";
-$lang['email_smtp_data_failure'] = "Unable to send data: %s";
-$lang['email_exit_status'] = "Exit status code: %s";
-
+$lang['email_must_be_array'] = 'The email validation method must be passed an array.';
+$lang['email_invalid_address'] = 'Invalid email address: %s';
+$lang['email_attachment_missing'] = 'Unable to locate the following email attachment: %s';
+$lang['email_attachment_unreadable'] = 'Unable to open this attachment: %s';
+$lang['email_no_recipients'] = 'You must include recipients: To, Cc, or Bcc';
+$lang['email_send_failure_phpmail'] = 'Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.';
+$lang['email_send_failure_sendmail'] = 'Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.';
+$lang['email_send_failure_smtp'] = 'Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.';
+$lang['email_sent'] = 'Your message has been successfully sent using the following protocol: %s';
+$lang['email_no_socket'] = 'Unable to open a socket to Sendmail. Please check settings.';
+$lang['email_no_hostname'] = 'You did not specify a SMTP hostname.';
+$lang['email_smtp_error'] = 'The following SMTP error was encountered: %s';
+$lang['email_no_smtp_unpw'] = 'Error: You must assign a SMTP username and password.';
+$lang['email_failed_smtp_login'] = 'Failed to send AUTH LOGIN command. Error: %s';
+$lang['email_smtp_auth_un'] = 'Failed to authenticate username. Error: %s';
+$lang['email_smtp_auth_pw'] = 'Failed to authenticate password. Error: %s';
+$lang['email_smtp_data_failure'] = 'Unable to send data: %s';
+$lang['email_exit_status'] = 'Exit status code: %s';
/* End of file email_lang.php */
/* Location: ./system/language/english/email_lang.php */ \ No newline at end of file
diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php
index eb4624e07..021776161 100644
--- a/system/language/english/form_validation_lang.php
+++ b/system/language/english/form_validation_lang.php
@@ -25,32 +25,31 @@
* @filesource
*/
-$lang['required'] = "The %s field is required.";
-$lang['isset'] = "The %s field must have a value.";
-$lang['valid_email'] = "The %s field must contain a valid email address.";
-$lang['valid_emails'] = "The %s field must contain all valid email addresses.";
-$lang['valid_url'] = "The %s field must contain a valid URL.";
-$lang['valid_ip'] = "The %s field must contain a valid IP.";
-$lang['min_length'] = "The %s field must be at least %s characters in length.";
-$lang['max_length'] = "The %s field cannot exceed %s characters in length.";
-$lang['exact_length'] = "The %s field must be exactly %s characters in length.";
-$lang['alpha'] = "The %s field may only contain alphabetical characters.";
-$lang['alpha_numeric'] = "The %s field may only contain alpha-numeric characters.";
-$lang['alpha_dash'] = "The %s field may only contain alpha-numeric characters, underscores, and dashes.";
-$lang['numeric'] = "The %s field must contain only numbers.";
-$lang['is_numeric'] = "The %s field must contain only numeric characters.";
-$lang['integer'] = "The %s field must contain an integer.";
-$lang['regex_match'] = "The %s field is not in the correct format.";
-$lang['matches'] = "The %s field does not match the %s field.";
-$lang['is_unique'] = "The %s field must contain a unique value.";
-$lang['is_natural'] = "The %s field must contain only positive numbers.";
-$lang['is_natural_no_zero'] = "The %s field must contain a number greater than zero.";
-$lang['decimal'] = "The %s field must contain a decimal number.";
-$lang['less_than'] = "The %s field must contain a number less than %s.";
-$lang['less_than_equal_to'] = "The %s field must contain a number less than or equal to %s.";
-$lang['greater_than'] = "The %s field must contain a number greater than %s.";
-$lang['greater_than_equal_to'] = "The %s field must contain a number greater than or equal to %s.";
-
+$lang['required'] = 'The %s field is required.';
+$lang['isset'] = 'The %s field must have a value.';
+$lang['valid_email'] = 'The %s field must contain a valid email address.';
+$lang['valid_emails'] = 'The %s field must contain all valid email addresses.';
+$lang['valid_url'] = 'The %s field must contain a valid URL.';
+$lang['valid_ip'] = 'The %s field must contain a valid IP.';
+$lang['min_length'] = 'The %s field must be at least %s characters in length.';
+$lang['max_length'] = 'The %s field cannot exceed %s characters in length.';
+$lang['exact_length'] = 'The %s field must be exactly %s characters in length.';
+$lang['alpha'] = 'The %s field may only contain alphabetical characters.';
+$lang['alpha_numeric'] = 'The %s field may only contain alpha-numeric characters.';
+$lang['alpha_dash'] = 'The %s field may only contain alpha-numeric characters, underscores, and dashes.';
+$lang['numeric'] = 'The %s field must contain only numbers.';
+$lang['is_numeric'] = 'The %s field must contain only numeric characters.';
+$lang['integer'] = 'The %s field must contain an integer.';
+$lang['regex_match'] = 'The %s field is not in the correct format.';
+$lang['matches'] = 'The %s field does not match the %s field.';
+$lang['is_unique'] = 'The %s field must contain a unique value.';
+$lang['is_natural'] = 'The %s field must contain only positive numbers.';
+$lang['is_natural_no_zero'] = 'The %s field must contain a number greater than zero.';
+$lang['decimal'] = 'The %s field must contain a decimal number.';
+$lang['less_than'] = 'The %s field must contain a number less than %s.';
+$lang['less_than_equal_to'] = 'The %s field must contain a number less than or equal to %s.';
+$lang['greater_than'] = 'The %s field must contain a number greater than %s.';
+$lang['greater_than_equal_to'] = 'The %s field must contain a number greater than or equal to %s.';
/* End of file form_validation_lang.php */
-/* Location: ./system/language/english/form_validation_lang.php */
+/* Location: ./system/language/english/form_validation_lang.php */ \ No newline at end of file
diff --git a/system/language/english/ftp_lang.php b/system/language/english/ftp_lang.php
index d00126b53..24923c8d8 100644
--- a/system/language/english/ftp_lang.php
+++ b/system/language/english/ftp_lang.php
@@ -25,19 +25,18 @@
* @filesource
*/
-$lang['ftp_no_connection'] = "Unable to locate a valid connection ID. Please make sure you are connected before peforming any file routines.";
-$lang['ftp_unable_to_connect'] = "Unable to connect to your FTP server using the supplied hostname.";
-$lang['ftp_unable_to_login'] = "Unable to login to your FTP server. Please check your username and password.";
-$lang['ftp_unable_to_makdir'] = "Unable to create the directory you have specified.";
-$lang['ftp_unable_to_changedir'] = "Unable to change directories.";
-$lang['ftp_unable_to_chmod'] = "Unable to set file permissions. Please check your path. Note: This feature is only available in PHP 5 or higher.";
-$lang['ftp_unable_to_upload'] = "Unable to upload the specified file. Please check your path.";
-$lang['ftp_unable_to_download'] = "Unable to download the specified file. Please check your path.";
-$lang['ftp_no_source_file'] = "Unable to locate the source file. Please check your path.";
-$lang['ftp_unable_to_rename'] = "Unable to rename the file.";
-$lang['ftp_unable_to_delete'] = "Unable to delete the file.";
-$lang['ftp_unable_to_move'] = "Unable to move the file. Please make sure the destination directory exists.";
-
+$lang['ftp_no_connection'] = 'Unable to locate a valid connection ID. Please make sure you are connected before peforming any file routines.';
+$lang['ftp_unable_to_connect'] = 'Unable to connect to your FTP server using the supplied hostname.';
+$lang['ftp_unable_to_login'] = 'Unable to login to your FTP server. Please check your username and password.';
+$lang['ftp_unable_to_makdir'] = 'Unable to create the directory you have specified.';
+$lang['ftp_unable_to_changedir'] = 'Unable to change directories.';
+$lang['ftp_unable_to_chmod'] = 'Unable to set file permissions. Please check your path. Note: This feature is only available in PHP 5 or higher.';
+$lang['ftp_unable_to_upload'] = 'Unable to upload the specified file. Please check your path.';
+$lang['ftp_unable_to_download'] = 'Unable to download the specified file. Please check your path.';
+$lang['ftp_no_source_file'] = 'Unable to locate the source file. Please check your path.';
+$lang['ftp_unable_to_rename'] = 'Unable to rename the file.';
+$lang['ftp_unable_to_delete'] = 'Unable to delete the file.';
+$lang['ftp_unable_to_move'] = 'Unable to move the file. Please make sure the destination directory exists.';
/* End of file ftp_lang.php */
/* Location: ./system/language/english/ftp_lang.php */ \ No newline at end of file
diff --git a/system/language/english/imglib_lang.php b/system/language/english/imglib_lang.php
index 67a36e120..d755437f2 100644
--- a/system/language/english/imglib_lang.php
+++ b/system/language/english/imglib_lang.php
@@ -25,25 +25,24 @@
* @filesource
*/
-$lang['imglib_source_image_required'] = "You must specify a source image in your preferences.";
-$lang['imglib_gd_required'] = "The GD image library is required for this feature.";
-$lang['imglib_gd_required_for_props'] = "Your server must support the GD image library in order to determine the image properties.";
-$lang['imglib_unsupported_imagecreate'] = "Your server does not support the GD function required to process this type of image.";
-$lang['imglib_gif_not_supported'] = "GIF images are often not supported due to licensing restrictions. You may have to use JPG or PNG images instead.";
-$lang['imglib_jpg_not_supported'] = "JPG images are not supported.";
-$lang['imglib_png_not_supported'] = "PNG images are not supported.";
-$lang['imglib_jpg_or_png_required'] = "The image resize protocol specified in your preferences only works with JPEG or PNG image types.";
-$lang['imglib_copy_error'] = "An error was encountered while attempting to replace the file. Please make sure your file directory is writable.";
-$lang['imglib_rotate_unsupported'] = "Image rotation does not appear to be supported by your server.";
-$lang['imglib_libpath_invalid'] = "The path to your image library is not correct. Please set the correct path in your image preferences.";
-$lang['imglib_image_process_failed'] = "Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.";
-$lang['imglib_rotation_angle_required'] = "An angle of rotation is required to rotate the image.";
-$lang['imglib_writing_failed_gif'] = "GIF image.";
-$lang['imglib_invalid_path'] = "The path to the image is not correct.";
-$lang['imglib_copy_failed'] = "The image copy routine failed.";
-$lang['imglib_missing_font'] = "Unable to find a font to use.";
-$lang['imglib_save_failed'] = "Unable to save the image. Please make sure the image and file directory are writable.";
-
+$lang['imglib_source_image_required'] = 'You must specify a source image in your preferences.';
+$lang['imglib_gd_required'] = 'The GD image library is required for this feature.';
+$lang['imglib_gd_required_for_props'] = 'Your server must support the GD image library in order to determine the image properties.';
+$lang['imglib_unsupported_imagecreate'] = 'Your server does not support the GD function required to process this type of image.';
+$lang['imglib_gif_not_supported'] = 'GIF images are often not supported due to licensing restrictions. You may have to use JPG or PNG images instead.';
+$lang['imglib_jpg_not_supported'] = 'JPG images are not supported.';
+$lang['imglib_png_not_supported'] = 'PNG images are not supported.';
+$lang['imglib_jpg_or_png_required'] = 'The image resize protocol specified in your preferences only works with JPEG or PNG image types.';
+$lang['imglib_copy_error'] = 'An error was encountered while attempting to replace the file. Please make sure your file directory is writable.';
+$lang['imglib_rotate_unsupported'] = 'Image rotation does not appear to be supported by your server.';
+$lang['imglib_libpath_invalid'] = 'The path to your image library is not correct. Please set the correct path in your image preferences.';
+$lang['imglib_image_process_failed'] = 'Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.';
+$lang['imglib_rotation_angle_required'] = 'An angle of rotation is required to rotate the image.';
+$lang['imglib_writing_failed_gif'] = 'GIF image.';
+$lang['imglib_invalid_path'] = 'The path to the image is not correct.';
+$lang['imglib_copy_failed'] = 'The image copy routine failed.';
+$lang['imglib_missing_font'] = 'Unable to find a font to use.';
+$lang['imglib_save_failed'] = 'Unable to save the image. Please make sure the image and file directory are writable.';
/* End of file imglib_lang.php */
/* Location: ./system/language/english/imglib_lang.php */ \ No newline at end of file
diff --git a/system/language/english/migration_lang.php b/system/language/english/migration_lang.php
index af920660c..5753c00bf 100644
--- a/system/language/english/migration_lang.php
+++ b/system/language/english/migration_lang.php
@@ -25,13 +25,13 @@
* @filesource
*/
-$lang['migration_none_found'] = "No migrations were found.";
-$lang['migration_not_found'] = "No migration could be found with the version number: %d.";
-$lang['migration_multiple_version'] = "This are multiple migrations with the same version number: %d.";
-$lang['migration_class_doesnt_exist'] = "The migration class \"%s\" could not be found.";
-$lang['migration_missing_up_method'] = "The migration class \"%s\" is missing an 'up' method.";
-$lang['migration_missing_down_method'] = "The migration class \"%s\" is missing a 'down' method.";
-$lang['migration_invalid_filename'] = "Migration \"%s\" has an invalid filename.";
+$lang['migration_none_found'] = 'No migrations were found.';
+$lang['migration_not_found'] = 'No migration could be found with the version number: %d.';
+$lang['migration_multiple_version'] = 'There are multiple migrations with the same version number: %d.';
+$lang['migration_class_doesnt_exist'] = 'The migration class "%s" could not be found.';
+$lang['migration_missing_up_method'] = 'The migration class "%s" is missing an "up" method.';
+$lang['migration_missing_down_method'] = 'The migration class "%s" is missing a "down" method.';
+$lang['migration_invalid_filename'] = 'Migration "%s" has an invalid filename.';
/* End of file migration_lang.php */
diff --git a/system/language/english/unit_test_lang.php b/system/language/english/unit_test_lang.php
index 36e9aca30..146ec25b4 100644
--- a/system/language/english/unit_test_lang.php
+++ b/system/language/english/unit_test_lang.php
@@ -45,6 +45,5 @@ $lang['ut_resource'] = 'Resource';
$lang['ut_null'] = 'Null';
$lang['ut_notes'] = 'Notes';
-
/* End of file unit_test_lang.php */
/* Location: ./system/language/english/unit_test_lang.php */ \ No newline at end of file
diff --git a/system/language/english/upload_lang.php b/system/language/english/upload_lang.php
index c3cb9c3e8..d70e7f20f 100644
--- a/system/language/english/upload_lang.php
+++ b/system/language/english/upload_lang.php
@@ -25,23 +25,22 @@
* @filesource
*/
-$lang['upload_userfile_not_set'] = "Unable to find a post variable called userfile.";
-$lang['upload_file_exceeds_limit'] = "The uploaded file exceeds the maximum allowed size in your PHP configuration file.";
-$lang['upload_file_exceeds_form_limit'] = "The uploaded file exceeds the maximum size allowed by the submission form.";
-$lang['upload_file_partial'] = "The file was only partially uploaded.";
-$lang['upload_no_temp_directory'] = "The temporary folder is missing.";
-$lang['upload_unable_to_write_file'] = "The file could not be written to disk.";
-$lang['upload_stopped_by_extension'] = "The file upload was stopped by extension.";
-$lang['upload_no_file_selected'] = "You did not select a file to upload.";
-$lang['upload_invalid_filetype'] = "The filetype you are attempting to upload is not allowed.";
-$lang['upload_invalid_filesize'] = "The file you are attempting to upload is larger than the permitted size.";
-$lang['upload_invalid_dimensions'] = "The image you are attempting to upload exceeds the maximum height or width.";
-$lang['upload_destination_error'] = "A problem was encountered while attempting to move the uploaded file to the final destination.";
-$lang['upload_no_filepath'] = "The upload path does not appear to be valid.";
-$lang['upload_no_file_types'] = "You have not specified any allowed file types.";
-$lang['upload_bad_filename'] = "The file name you submitted already exists on the server.";
-$lang['upload_not_writable'] = "The upload destination folder does not appear to be writable.";
-
+$lang['upload_userfile_not_set'] = 'Unable to find a post variable called userfile.';
+$lang['upload_file_exceeds_limit'] = 'The uploaded file exceeds the maximum allowed size in your PHP configuration file.';
+$lang['upload_file_exceeds_form_limit'] = 'The uploaded file exceeds the maximum size allowed by the submission form.';
+$lang['upload_file_partial'] = 'The file was only partially uploaded.';
+$lang['upload_no_temp_directory'] = 'The temporary folder is missing.';
+$lang['upload_unable_to_write_file'] = 'The file could not be written to disk.';
+$lang['upload_stopped_by_extension'] = 'The file upload was stopped by extension.';
+$lang['upload_no_file_selected'] = 'You did not select a file to upload.';
+$lang['upload_invalid_filetype'] = 'The filetype you are attempting to upload is not allowed.';
+$lang['upload_invalid_filesize'] = 'The file you are attempting to upload is larger than the permitted size.';
+$lang['upload_invalid_dimensions'] = 'The image you are attempting to upload exceeds the maximum height or width.';
+$lang['upload_destination_error'] = 'A problem was encountered while attempting to move the uploaded file to the final destination.';
+$lang['upload_no_filepath'] = 'The upload path does not appear to be valid.';
+$lang['upload_no_file_types'] = 'You have not specified any allowed file types.';
+$lang['upload_bad_filename'] = 'The file name you submitted already exists on the server.';
+$lang['upload_not_writable'] = 'The upload destination folder does not appear to be writable.';
/* End of file upload_lang.php */
/* Location: ./system/language/english/upload_lang.php */ \ No newline at end of file
diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php
index 74048d564..89e9f77c8 100644
--- a/system/libraries/Cache/drivers/Cache_wincache.php
+++ b/system/libraries/Cache/drivers/Cache_wincache.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index fdb9be4da..8fd7a79e7 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1238,7 +1238,7 @@ class CI_Email {
*
* @return bool
*/
- public function send()
+ public function send($auto_clear = TRUE)
{
if ($this->_replyto_flag === FALSE)
{
@@ -1257,11 +1257,25 @@ class CI_Email {
if ($this->bcc_batch_mode && count($this->_bcc_array) > $this->bcc_batch_size)
{
- return $this->batch_bcc_send();
+ $result = $this->batch_bcc_send();
+
+ if ($result && $auto_clear)
+ {
+ $this->clear();
+ }
+
+ return $result;
}
$this->_build_message();
- return $this->_spool_email();
+ $result = $this->_spool_email();
+
+ if ($result && $auto_clear)
+ {
+ $this->clear();
+ }
+
+ return $result;
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index c786703ca..5d637d44a 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -285,7 +285,7 @@ class CI_Migration {
if ( ! $migrations = $this->find_migrations())
{
$this->_error_string = $this->lang->line('migration_none_found');
- return false;
+ return FALSE;
}
$last_migration = basename(end($migrations));
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 75745dd48..5573f6407 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -70,6 +70,7 @@ class CI_Pagination {
protected $_attributes = '';
protected $_link_types = array();
protected $reuse_query_string = FALSE;
+ protected $data_page_attr = 'data-ci-pagination-page';
/**
* Constructor
@@ -202,7 +203,7 @@ class CI_Pagination {
if ( ! $this->use_page_numbers)
{
- $this->cur_page = floor(($this->cur_page/$this->per_page) + 1);
+ $this->cur_page = (int) floor(($this->cur_page/$this->per_page) + 1);
}
// Calculate the start and end numbers. These determine
@@ -230,10 +231,12 @@ class CI_Pagination {
if ($this->reuse_query_string === TRUE)
{
$get = $CI->input->get();
-
+
// Unset the controll, method, old-school routing options
unset($get['c'], $get['m'], $get[$this->query_string_segment]);
+ if ( ! $get) $get = array();
+
// Put everything else onto the end
$query_string = (strpos($this->base_url, '&amp;') !== FALSE ? '&amp;' : '?') . http_build_query($get, '', '&amp;');
@@ -245,7 +248,11 @@ class CI_Pagination {
if ($this->first_link !== FALSE && $this->cur_page > ($this->num_links + 1))
{
$first_url = ($this->first_url === '') ? $this->base_url : $this->first_url;
- $output .= $this->first_tag_open.'<a href="'.$first_url.'"'.$this->_attributes.$this->_attr_rel('start').'>'
+
+ // Take the general parameters, and squeeze this pagination-page attr in there for JS fw's
+ $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, 1);
+
+ $output .= $this->first_tag_open.'<a href="'.$first_url.'"'.$attributes.$this->_attr_rel('start').'>'
.$this->first_link.'</a>'.$this->first_tag_close;
}
@@ -254,15 +261,18 @@ class CI_Pagination {
{
$i = ($this->use_page_numbers) ? $uri_page_number - 1 : $uri_page_number - $this->per_page;
+ // Take the general parameters, and squeeze this pagination-page attr in there for JS fw's
+ $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, (int) $i);
+
if ($i === $base_page && $this->first_url !== '')
{
- $output .= $this->prev_tag_open.'<a href="'.$this->first_url.$query_string.'"'.$this->_attributes.$this->_attr_rel('prev').'>'
+ $output .= $this->prev_tag_open.'<a href="'.$this->first_url.$query_string.'"'.$attributes.$this->_attr_rel('prev').'>'
.$this->prev_link.'</a>'.$this->prev_tag_close;
}
else
{
$append = ($i === $base_page) ? $query_string : $this->prefix.$i.$this->suffix;
- $output .= $this->prev_tag_open.'<a href="'.$this->base_url.$append.'"'.$this->_attributes.$this->_attr_rel('prev').'>'
+ $output .= $this->prev_tag_open.'<a href="'.$this->base_url.$append.'"'.$attributes.$this->_attr_rel('prev').'>'
.$this->prev_link.'</a>'.$this->prev_tag_close;
}
@@ -275,6 +285,10 @@ class CI_Pagination {
for ($loop = $start -1; $loop <= $end; $loop++)
{
$i = ($this->use_page_numbers) ? $loop : ($loop * $this->per_page) - $this->per_page;
+
+ // Take the general parameters, and squeeze this pagination-page attr in there for JS fw's
+ $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, (int) $i);
+
if ($i >= $base_page)
{
if ($this->cur_page === $loop)
@@ -286,13 +300,13 @@ class CI_Pagination {
$n = ($i === $base_page) ? '' : $i;
if ($n === '' && ! empty($this->first_url))
{
- $output .= $this->num_tag_open.'<a href="'.$this->first_url.$query_string.'"'.$this->_attributes.$this->_attr_rel('start').'>'
+ $output .= $this->num_tag_open.'<a href="'.$this->first_url.$query_string.'"'.$attributes.$this->_attr_rel('start').'>'
.$loop.'</a>'.$this->num_tag_close;
}
else
{
$append = ($n === '') ? $query_string : $this->prefix.$n.$this->suffix;
- $output .= $this->num_tag_open.'<a href="'.$this->base_url.$append.'"'.$this->_attributes.$this->_attr_rel('start').'>'
+ $output .= $this->num_tag_open.'<a href="'.$this->base_url.$append.'"'.$attributes.$this->_attr_rel('start').'>'
.$loop.'</a>'.$this->num_tag_close;
}
}
@@ -305,7 +319,10 @@ class CI_Pagination {
{
$i = ($this->use_page_numbers) ? $this->cur_page + 1 : $this->cur_page * $this->per_page;
- $output .= $this->next_tag_open.'<a href="'.$this->base_url.$this->prefix.$i.$this->suffix.'"'.$this->_attributes
+ // Take the general parameters, and squeeze this pagination-page attr in there for JS fw's
+ $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, (int) $i);
+
+ $output .= $this->next_tag_open.'<a href="'.$this->base_url.$this->prefix.$i.$this->suffix.'"'.$attributes
.$this->_attr_rel('next').'>'.$this->next_link.'</a>'.$this->next_tag_close;
}
@@ -314,7 +331,10 @@ class CI_Pagination {
{
$i = ($this->use_page_numbers) ? $num_pages : ($num_pages * $this->per_page) - $this->per_page;
- $output .= $this->last_tag_open.'<a href="'.$this->base_url.$this->prefix.$i.$this->suffix.'"'.$this->_attributes.'>'
+ // Take the general parameters, and squeeze this pagination-page attr in there for JS fw's
+ $attributes = sprintf('%s %s="%d"', $this->_attributes, $this->data_page_attr, (int) $i);
+
+ $output .= $this->last_tag_open.'<a href="'.$this->base_url.$this->prefix.$i.$this->suffix.'"'.$attributes.'>'
.$this->last_link.'</a>'.$this->last_tag_close;
}
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index e81f2ca9a..5d01d374d 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -230,7 +230,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc
);
xml_set_object($parser, $parser_object);
- xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true);
+ xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, TRUE);
xml_set_element_handler($parser, 'open_tag', 'closing_tag');
xml_set_character_data_handler($parser, 'character_data');
//xml_set_default_handler($parser, 'default_handler');