mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Additional optimization refactoring
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7597 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
cb487bd6e6
commit
2b95df3abf
8 changed files with 10 additions and 11 deletions
|
@ -40,7 +40,6 @@ if (!defined('PHP5')) {
|
|||
require LIBS . 'inflector.php';
|
||||
require LIBS . 'configure.php';
|
||||
}
|
||||
require LIBS . 'file.php';
|
||||
require LIBS . 'cache.php';
|
||||
|
||||
Configure::getInstance();
|
||||
|
|
|
@ -504,7 +504,7 @@ class CacheEngine extends Object {
|
|||
if (empty($key)) {
|
||||
return false;
|
||||
}
|
||||
$key = Inflector::slug(str_replace(array(DS, '/', '.'), '_', strval($key)));
|
||||
$key = Inflector::underscore(str_replace(array(DS, '/', '.'), '_', strval($key)));
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
|
|
2
cake/libs/cache/file.php
vendored
2
cake/libs/cache/file.php
vendored
|
@ -86,7 +86,7 @@ class FileEngine extends CacheEngine {
|
|||
));
|
||||
if(!isset($this->__File)) {
|
||||
if (!class_exists('File')) {
|
||||
uses('file');
|
||||
require LIBS . 'file.php';
|
||||
}
|
||||
$this->__File =& new File($this->settings['path'] . DS . 'cake');
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
*
|
||||
*/
|
||||
if (!class_exists('File')) {
|
||||
uses('file');
|
||||
require LIBS . 'file.php';
|
||||
}
|
||||
/**
|
||||
* Set up error level constants to be used within the framework if they are not defined within the
|
||||
|
|
|
@ -208,7 +208,7 @@ class Configure extends Object {
|
|||
*/
|
||||
function __list($path, $suffix = false, $extension = false) {
|
||||
if (!class_exists('Folder')) {
|
||||
uses('folder');
|
||||
require LIBS . 'folder.php';
|
||||
}
|
||||
$items = array();
|
||||
$Folder =& new Folder($path);
|
||||
|
@ -276,10 +276,10 @@ class Configure extends Object {
|
|||
}
|
||||
|
||||
if (!class_exists('Debugger')) {
|
||||
uses('debugger');
|
||||
require LIBS . 'debugger.php';
|
||||
}
|
||||
if (!class_exists('CakeLog')) {
|
||||
uses('cake_log');
|
||||
require LIBS . 'cake_log.php';
|
||||
}
|
||||
Configure::write('log', LOG_NOTICE);
|
||||
} else {
|
||||
|
@ -521,7 +521,7 @@ class Configure extends Object {
|
|||
|
||||
if ($write === true) {
|
||||
if (!class_exists('File')) {
|
||||
uses('file');
|
||||
require LIBS . 'file.php';
|
||||
}
|
||||
$fileClass = new File($file);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
if (!class_exists('cakesession')) {
|
||||
uses('session');
|
||||
require LIBS . 'session.php';
|
||||
}
|
||||
/**
|
||||
* Session Component.
|
||||
|
|
|
@ -491,7 +491,7 @@ class Inflector extends Object {
|
|||
*/
|
||||
function slug($string, $replacement = '_') {
|
||||
if (!class_exists('String')) {
|
||||
require_once LIBS . 'string.php';
|
||||
require LIBS . 'string.php';
|
||||
}
|
||||
$map = array(
|
||||
'/à|á|å|â/' => 'a',
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
*/
|
||||
if (!class_exists('Set')) {
|
||||
uses('set');
|
||||
require LIBS . 'set.php';
|
||||
}
|
||||
/**
|
||||
* Session class for Cake.
|
||||
|
|
Loading…
Add table
Reference in a new issue