diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-25 14:46:28 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-25 14:46:28 +0000 |
commit | 822496eed6a0b1b7e53f5b4104bfa47369f3aaf7 (patch) | |
tree | f4b8ae7fb7164fabf9b96f02731ff67cbf0ea846 /engine/classes/ElggPlugin.php | |
parent | 3ea050f635d02c2e86fd7f89bf9987eb24f25215 (diff) | |
download | elgg-822496eed6a0b1b7e53f5b4104bfa47369f3aaf7.tar.gz elgg-822496eed6a0b1b7e53f5b4104bfa47369f3aaf7.tar.bz2 |
Renamed ElggPlugin->canIncludeFile() to ->canReadFile() and am using is_readable() instead of file_exists().
git-svn-id: http://code.elgg.org/elgg/trunk@9021 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggPlugin.php')
-rw-r--r-- | engine/classes/ElggPlugin.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php index 34e8e6732..f8a6d9b5c 100644 --- a/engine/classes/ElggPlugin.php +++ b/engine/classes/ElggPlugin.php @@ -640,7 +640,7 @@ class ElggPlugin extends ElggObject { // if there are any on_enable functions, start the plugin now and run them // Note: this will not run re-run the init hooks! if ($return) { - if ($this->canIncludeFile('activate.php')) { + if ($this->canReadFile('activate.php')) { $flags = ELGG_PLUGIN_INCLUDE_START | ELGG_PLUGIN_REGISTER_CLASSES | ELGG_PLUGIN_REGISTER_LANGUAGES | ELGG_PLUGIN_REGISTER_VIEWS; @@ -682,7 +682,7 @@ class ElggPlugin extends ElggObject { // run any deactivate code if ($return) { - if ($this->canIncludeFile('deactivate.php')) { + if ($this->canReadFile('deactivate.php')) { $return = $this->includeFile('deactivate.php'); } } @@ -750,7 +750,7 @@ class ElggPlugin extends ElggObject { $filepath = "$this->path/$filename"; - if (!$this->canIncludeFile($filename)) { + if (!$this->canReadFile($filename)) { $msg = elgg_echo('ElggPlugin:Exception:CannotIncludeFile', array($filename, $this->getID(), $this->guid, $this->path)); throw new PluginException($msg); @@ -765,8 +765,8 @@ class ElggPlugin extends ElggObject { * @param string $filename The name of the file * @return bool */ - protected function canIncludeFile($filename) { - return file_exists($this->path.'/'.$filename); + protected function canReadFile($filename) { + return is_readable($this->path . '/' . $filename); } /** |