summaryrefslogtreecommitdiff
path: root/lib/plugins/extension
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2015-01-07 10:47:45 +0100
committerAndreas Gohr <gohr@cosmocode.de>2015-01-07 10:47:45 +0100
commit79e79377626799a77c11aa7849cb9c64305590c8 (patch)
tree0d359f6b0985fd29f2c854d232578881e636b8c1 /lib/plugins/extension
parentcb339ea7ee2b684b0fd0fb948681c66b76a0b4e1 (diff)
downloadrpg-79e79377626799a77c11aa7849cb9c64305590c8.tar.gz
rpg-79e79377626799a77c11aa7849cb9c64305590c8.tar.bz2
Remove error supression for file_exists()
In an older version of PHP a file_exists() call would issue a warning when the file did not exist. This was fixed in later PHP releases. Since we require PHP 5.3 now, there's no need to supress any error here anymore. This might even give a minor performance boost.
Diffstat (limited to 'lib/plugins/extension')
-rw-r--r--lib/plugins/extension/helper/extension.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php
index dfa624907..6c0946b09 100644
--- a/lib/plugins/extension/helper/extension.php
+++ b/lib/plugins/extension/helper/extension.php
@@ -707,7 +707,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
$plugin = null;
foreach($plugin_types as $type) {
- if(@file_exists($path.$type.'.php')) {
+ if(file_exists($path.$type.'.php')) {
$plugin = plugin_load($type, $this->base);
if ($plugin) break;
}
@@ -907,12 +907,12 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
// check to make sure we aren't overwriting anything
$target = $target_base_dir.$item['base'];
- if(!$overwrite && @file_exists($target)) {
+ if(!$overwrite && file_exists($target)) {
// TODO remember our settings, ask the user to confirm overwrite
continue;
}
- $action = @file_exists($target) ? 'update' : 'install';
+ $action = file_exists($target) ? 'update' : 'install';
// copy action
if($this->dircopy($item['tmp'], $target)) {
@@ -1117,7 +1117,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
return $ok;
} else {
- $exists = @file_exists($dst);
+ $exists = file_exists($dst);
if(!@copy($src, $dst)) return false;
if(!$exists && !empty($conf['fperm'])) chmod($dst, $conf['fperm']);