Fixing loader loops

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3388 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-08-08 21:17:20 +00:00
parent d78ef4d1fe
commit 381ccff146

View file

@ -456,9 +456,10 @@
*/
function uses() {
$args = array_reverse(func_get_args());
$i = func_num_args() - 1;
while ($i >= 0) {
require_once(LIBS . strtolower($args[$i--]) . '.php');
$c = func_num_args();
for ($i = 0; $i < $c; $i++) {
require_once(LIBS . strtolower($args[$i]) . '.php');
}
}
/**
@ -469,9 +470,10 @@
*/
function vendor($name) {
$args = array_reverse(func_get_args());
$i = func_num_args() - 1;
while ($i >= 0) {
$arg = $args[--$i];
$c = func_num_args();
for ($i = 0; $i < $c; $i++) {
$arg = $args[$i];
if (file_exists(APP . 'vendors' . DS . $arg . '.php')) {
require_once(APP . 'vendors' . DS . $arg . '.php');
} else {