aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-19 11:21:53 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-19 11:21:53 +0000
commit81d6884ecad771f4b4f2d8be7572d1a89deaab10 (patch)
tree69b715b06444da383359567f21c3dfc7a1bb3f42
parent52ad7afda5a1f4001155227d2d96ddf04f8a28d1 (diff)
downloadelgg-81d6884ecad771f4b4f2d8be7572d1a89deaab10.tar.gz
elgg-81d6884ecad771f4b4f2d8be7572d1a89deaab10.tar.bz2
Fixes #3462 empty classes directory is no longer treated as an error
git-svn-id: http://code.elgg.org/elgg/trunk@9100 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/classes/ElggPlugin.php7
-rw-r--r--engine/lib/elgglib.php8
-rw-r--r--languages/en.php1
3 files changed, 2 insertions, 14 deletions
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php
index eb911455a..95a7362e2 100644
--- a/engine/classes/ElggPlugin.php
+++ b/engine/classes/ElggPlugin.php
@@ -839,12 +839,7 @@ class ElggPlugin extends ElggObject {
return true;
}
- // but need to have working ones.
- if (!elgg_register_classes($classes_path)) {
- $msg = elgg_echo('ElggPlugin:Exception:CannotRegisterClasses',
- array($this->getID(), $this->guid, $classes_path));
- throw new PluginException($msg);
- }
+ elgg_register_classes($classes_path);
return true;
}
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index e67f8b627..170750849 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -33,21 +33,15 @@ function _elgg_autoload($class) {
*
* @param string $dir The dir to look in
*
- * @return true
+ * @return void
* @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;
}
/**
diff --git a/languages/en.php b/languages/en.php
index ec39f64a9..768658c99 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -81,7 +81,6 @@ $english = array(
'ElggPlugin:Exception:CannotIncludeFile' => 'Cannot include %s for plugin %s (guid: %s) at %s. Check permissions!',
'ElggPlugin:Exception:CannotRegisterViews' => 'Cannot open views dir for plugin %s (guid: %s) at %s. Check permissions!',
'ElggPlugin:Exception:CannotRegisterLanguages' => 'Cannot register languages for plugin %s (guid: %s) at %s. Check permissions!',
- 'ElggPlugin:Exception:CannotRegisterClasses' => 'Cannot register classes for plugin %s (guid: %s) at %s. Check permissions!',
'ElggPlugin:Exception:NoID' => 'No ID for plugin guid %s!',
'PluginException:ParserError' => 'Error parsing manifest with API version %s in plugin %s.',