aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggPlugin.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-25 14:46:28 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-25 14:46:28 +0000
commit822496eed6a0b1b7e53f5b4104bfa47369f3aaf7 (patch)
treef4b8ae7fb7164fabf9b96f02731ff67cbf0ea846 /engine/classes/ElggPlugin.php
parent3ea050f635d02c2e86fd7f89bf9987eb24f25215 (diff)
downloadelgg-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.php10
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);
}
/**