From 822496eed6a0b1b7e53f5b4104bfa47369f3aaf7 Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 25 Apr 2011 14:46:28 +0000 Subject: 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 --- engine/classes/ElggPlugin.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/classes/ElggPlugin.php') 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); } /** -- cgit v1.2.3