diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-02 22:55:25 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-02 22:55:25 +0000 |
commit | a826bea54e8934c19b2ada619d966cc7d9628b42 (patch) | |
tree | d243d0e3856d15eaebf20b40a6c4d876d02d987e /engine/lib | |
parent | 4200625c681b343c30a83627b70c3104e40b2211 (diff) | |
download | elgg-a826bea54e8934c19b2ada619d966cc7d9628b42.tar.gz elgg-a826bea54e8934c19b2ada619d966cc7d9628b42.tar.bz2 |
Refs #7552, #2547. Autoloading functions return bool.
git-svn-id: http://code.elgg.org/elgg/trunk@7816 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/elgglib.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index e16068c05..497f25953 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -33,15 +33,21 @@ function _elgg_autoload($class) { * * @param string $dir The dir to look in * - * @return void + * @return true * @since 1.8.0 */ function elgg_register_classes($dir) { $classes = elgg_get_file_list($dir, array(), array(), array('.php')); + if (!$classes) { + return false; + } + foreach ($classes as $class) { elgg_register_class(basename($class, '.php'), $class); } + + return true; } /** @@ -50,7 +56,7 @@ function elgg_register_classes($dir) { * @param string $class The name of the class * @param string $location The location of the file * - * @return void + * @return true * @since 1.8.0 */ function elgg_register_class($class, $location) { @@ -61,6 +67,8 @@ function elgg_register_class($class, $location) { } $CONFIG->classes[$class] = $location; + + return true; } /** |