Upgrade to KH 3.1.3.1

This commit is contained in:
Deon George
2011-05-13 16:00:25 +10:00
parent 8013aadc4c
commit 6d256839fc
675 changed files with 22771 additions and 24111 deletions

View File

@@ -4,7 +4,7 @@
*
* @package Kohana
* @author Kohana Team
* @copyright (c) 2007-2008 Kohana Team
* @copyright (c) 2007-2011 Kohana Team
* @copyright (c) 2005 Harry Fuecks
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
*/
@@ -36,8 +36,8 @@ function _substr($str, $offset, $length = NULL)
// PCRE repeating quantifiers must be less than 65536, so repeat when necessary
$x = (int) ($offset / 65535);
$y = (int) ($offset % 65535);
$regex .= ($x == 0) ? '' : '(?:.{65535}){'.$x.'}';
$regex .= ($y == 0) ? '' : '.{'.$y.'}';
$regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}');
$regex .= ($y == 0) ? '' : ('.{'.$y.'}');
}
// Create a length expression
@@ -54,7 +54,7 @@ function _substr($str, $offset, $length = NULL)
$x = (int) ($length / 65535);
$y = (int) ($length % 65535);
$regex .= '(';
$regex .= ($x == 0) ? '' : '(?:.{65535}){'.$x.'}';
$regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}');
$regex .= '.{'.$y.'})';
}
// Find length from the right (negative length)
@@ -63,7 +63,7 @@ function _substr($str, $offset, $length = NULL)
$x = (int) (-$length / 65535);
$y = (int) (-$length % 65535);
$regex .= '(.*)';
$regex .= ($x == 0) ? '' : '(?:.{65535}){'.$x.'}';
$regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}');
$regex .= '.{'.$y.'}';
}