diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php
index 9c22a8468..cb0725dce 100644
--- a/cake/console/libs/shell.php
+++ b/cake/console/libs/shell.php
@@ -436,7 +436,7 @@ class Shell extends Object {
}
}
if (!class_exists('File')) {
- uses('file');
+ require LIBS . 'file.php';
}
if ($File = new File($path, true)) {
diff --git a/cake/console/libs/tasks/project.php b/cake/console/libs/tasks/project.php
index fda6a7cf7..af65dea87 100644
--- a/cake/console/libs/tasks/project.php
+++ b/cake/console/libs/tasks/project.php
@@ -194,7 +194,7 @@ class ProjectTask extends Shell {
$contents = $File->read();
if (preg_match('/([\\t\\x20]*Configure::write\\(\\\'Security.salt\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) {
if (!class_exists('Security')) {
- uses('Security');
+ require LIBS . 'security.php';
}
$string = Security::generateAuthKey();
$result = str_replace($match[0], "\t" . 'Configure::write(\'Security.salt\', \''.$string.'\');', $contents);
diff --git a/cake/console/libs/templates/default/views/home.ctp b/cake/console/libs/templates/default/views/home.ctp
index 39020d488..edc233853 100644
--- a/cake/console/libs/templates/default/views/home.ctp
+++ b/cake/console/libs/templates/default/views/home.ctp
@@ -52,7 +52,9 @@ endif;
getDataSource('default');
?>
@@ -79,4 +81,4 @@ $output .= "\t\tYou can also add some CSS styles for your pages at: %s', true),\
$output .= "\t\tAPP . 'views' . DS . 'pages' . DS . 'home.ctp.
', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.
', APP . 'webroot' . DS . 'css');\n";
$output .= "?>\n";
$output .= "\n";
-?>
+?>
\ No newline at end of file
diff --git a/cake/console/libs/templates/skel/webroot/css.php b/cake/console/libs/templates/skel/webroot/css.php
index 52b57fee7..f87842179 100644
--- a/cake/console/libs/templates/skel/webroot/css.php
+++ b/cake/console/libs/templates/skel/webroot/css.php
@@ -32,7 +32,7 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
* Enter description here...
*/
if (!class_exists('File')) {
- uses('file');
+ require LIBS . 'file.php';
}
/**
* Enter description here...
diff --git a/cake/libs/controller/components/acl.php b/cake/libs/controller/components/acl.php
index d68c61f03..9650786de 100644
--- a/cake/libs/controller/components/acl.php
+++ b/cake/libs/controller/components/acl.php
@@ -201,7 +201,7 @@ class DbAcl extends AclBase {
function __construct() {
parent::__construct();
if (!class_exists('AclNode')) {
- uses('model' . DS . 'db_acl');
+ require LIBS . 'model' . DS . 'db_acl.php';
}
$this->Aro =& ClassRegistry::init(array('class' => 'Aro', 'alias' => 'Aro'));
$this->Aco =& ClassRegistry::init(array('class' => 'Aco', 'alias' => 'Aco'));
diff --git a/cake/libs/file.php b/cake/libs/file.php
index b57cb4c72..0971d83a5 100644
--- a/cake/libs/file.php
+++ b/cake/libs/file.php
@@ -27,7 +27,7 @@
*
*/
if (!class_exists('Object')) {
- uses('object');
+ require LIBS . 'object.php';
}
if (!class_exists('Folder')) {
require LIBS . 'folder.php';
diff --git a/cake/libs/folder.php b/cake/libs/folder.php
index 28f32672a..7deb0fa32 100644
--- a/cake/libs/folder.php
+++ b/cake/libs/folder.php
@@ -27,7 +27,7 @@
*
*/
if (!class_exists('Object')) {
- uses('object');
+ require LIBS . 'object.php';
}
/**
* Folder structure browser, lists folders and files.
diff --git a/cake/libs/magic_db.php b/cake/libs/magic_db.php
index 73b16017c..08d50fe0c 100644
--- a/cake/libs/magic_db.php
+++ b/cake/libs/magic_db.php
@@ -22,8 +22,11 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
+if (!class_exists('Object')) {
+ require LIBS . 'object.php';
+}
if (!class_exists('File')) {
- uses('object', 'file');
+ require LIBS . 'file.php';
}
/**
* A class to parse and use the MagicDb for file type analysis
diff --git a/cake/libs/model/behaviors/acl.php b/cake/libs/model/behaviors/acl.php
index 0b867a2ca..91ed1c655 100644
--- a/cake/libs/model/behaviors/acl.php
+++ b/cake/libs/model/behaviors/acl.php
@@ -55,7 +55,7 @@ class AclBehavior extends ModelBehavior {
$type = $this->__typeMaps[$this->settings[$model->name]['type']];
if (!class_exists('AclNode')) {
- uses('model' . DS . 'db_acl');
+ require LIBS . 'model' . DS . 'db_acl.php';
}
$model->{$type} =& ClassRegistry::init($type);
if (!method_exists($model, 'parentNode')) {
diff --git a/cake/libs/object.php b/cake/libs/object.php
index 358fd759f..4276a49f1 100644
--- a/cake/libs/object.php
+++ b/cake/libs/object.php
@@ -148,7 +148,7 @@ class Object {
*/
function log($msg, $type = LOG_ERROR) {
if (!class_exists('CakeLog')) {
- uses('cake_log');
+ require LIBS . 'cake_log.php';
}
if (is_null($this->_log)) {
$this->_log = new CakeLog();
diff --git a/cake/libs/view/pages/home.ctp b/cake/libs/view/pages/home.ctp
index f0e3d9c63..8b0fe2cda 100644
--- a/cake/libs/view/pages/home.ctp
+++ b/cake/libs/view/pages/home.ctp
@@ -78,7 +78,9 @@ endif;
getDataSource('default');
?>
diff --git a/cake/tests/cases/basics.test.php b/cake/tests/cases/basics.test.php
index eaa0d4313..2b27d7b6d 100644
--- a/cake/tests/cases/basics.test.php
+++ b/cake/tests/cases/basics.test.php
@@ -147,6 +147,7 @@ class BasicsTest extends CakeTestCase {
*
* @access public
* @return void
+ * @deprecated
*/
function testUses() {
$this->skipIf(class_exists('Security') || class_exists('Sanitize'), '%s Security and/or Sanitize class already loaded');
diff --git a/cake/tests/cases/libs/magic_db.test.php b/cake/tests/cases/libs/magic_db.test.php
index 3eba7eb46..076859d4a 100644
--- a/cake/tests/cases/libs/magic_db.test.php
+++ b/cake/tests/cases/libs/magic_db.test.php
@@ -22,7 +22,9 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
-uses('magic_db', 'object');
+if (!class_exists('MagicDb')) {
+ require LIBS . 'magic_db.php';
+}
/**
* The test class for the MagicDb class
*
diff --git a/cake/tests/cases/libs/set.test.php b/cake/tests/cases/libs/set.test.php
index d0b7c10f9..2e657e5fb 100644
--- a/cake/tests/cases/libs/set.test.php
+++ b/cake/tests/cases/libs/set.test.php
@@ -1755,7 +1755,6 @@ class SetTest extends CakeTestCase {
$result = Set::reverse($class);
$this->assertIdentical($result, $expected);
- uses('model'.DS.'model');
$model = new Model(array('id' => false, 'name' => 'Model', 'table' => false));
$expected = array(
'Behaviors' => array('modelName' => 'Model', '_attached' => array(), '_disabled' => array(), '__methods' => array(), '__mappedMethods' => array(), '_log' => null),
diff --git a/cake/tests/cases/libs/view/helpers/ajax.test.php b/cake/tests/cases/libs/view/helpers/ajax.test.php
index 439846e0d..233d1fa00 100644
--- a/cake/tests/cases/libs/view/helpers/ajax.test.php
+++ b/cake/tests/cases/libs/view/helpers/ajax.test.php
@@ -27,16 +27,7 @@
if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) {
define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
}
-uses(
- 'view' . DS . 'helpers' . DS . 'app_helper',
- 'controller' . DS . 'controller',
- 'model' . DS . 'model',
- 'view' . DS . 'helper',
- 'view' . DS . 'helpers'.DS.'ajax',
- 'view' . DS . 'helpers' . DS . 'html',
- 'view' . DS . 'helpers' . DS . 'form',
- 'view' . DS . 'helpers' . DS . 'javascript'
- );
+App::import('Helper', array('Html', 'Form', 'Javascript', 'Ajax'));
/**
* AjaxTestController class
*
diff --git a/cake/tests/cases/libs/view/helpers/js.test.php b/cake/tests/cases/libs/view/helpers/js.test.php
index d0307089b..d227b02a7 100644
--- a/cake/tests/cases/libs/view/helpers/js.test.php
+++ b/cake/tests/cases/libs/view/helpers/js.test.php
@@ -27,13 +27,6 @@
if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) {
define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
}
-uses(
- 'view' . DS . 'helpers' . DS . 'app_helper',
- 'controller' . DS . 'controller',
- 'model' . DS . 'model',
- 'view' . DS . 'helper',
- 'view' . DS . 'helpers' . DS . 'js'
- );
/**
* JsHelperTest class
*
diff --git a/cake/tests/test_app/views/pages/home.ctp b/cake/tests/test_app/views/pages/home.ctp
index 3812f0f93..b9b6f00ed 100644
--- a/cake/tests/test_app/views/pages/home.ctp
+++ b/cake/tests/test_app/views/pages/home.ctp
@@ -51,7 +51,9 @@ endif;
getDataSource('default');
?>
@@ -77,4 +79,4 @@ if (!empty($filePresent)):
You can also add some CSS styles for your pages at: %s', true),
APP . 'views' . DS . 'pages' . DS . 'home.ctp.
', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.
', APP . 'webroot' . DS . 'css');
?>
-
+
\ No newline at end of file
diff --git a/cake/tests/test_app/views/posts/test_nocache_tags.ctp b/cake/tests/test_app/views/posts/test_nocache_tags.ctp
index db0e7397c..7e4ff8e89 100644
--- a/cake/tests/test_app/views/posts/test_nocache_tags.ctp
+++ b/cake/tests/test_app/views/posts/test_nocache_tags.ctp
@@ -81,7 +81,9 @@
getDataSource('default');
?>