diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/detail.php | 2 | ||||
-rw-r--r-- | lib/exe/indexer.php | 12 | ||||
-rw-r--r-- | lib/plugins/config/settings/config.class.php | 2 | ||||
-rw-r--r-- | lib/plugins/importoldchangelog/action.php | 6 | ||||
-rw-r--r-- | lib/plugins/plugin/admin.php | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/lib/exe/detail.php b/lib/exe/detail.php index 3a7e61597..a9fe72b91 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -35,7 +35,7 @@ if($AUTH >= AUTH_READ){ // check if image exists $SRC = mediaFN($IMG); - if(!file_exists($SRC)){ + if(!@file_exists($SRC)){ //doesn't exist! } diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index d65707911..ad2ad8010 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -47,8 +47,8 @@ function runTrimRecentChanges() { // Uses the imporoldchangelog plugin to upgrade the changelog automaticaly. // FIXME: Remove this from runTrimRecentChanges when it is no longer needed. if (isset($conf['changelog_old']) && - file_exists($conf['changelog_old']) && !file_exists($conf['changelog']) && - !file_exists($conf['changelog'].'_importing') && !file_exists($conf['changelog'].'_tmp')) { + @file_exists($conf['changelog_old']) && !@file_exists($conf['changelog']) && + !@file_exists($conf['changelog'].'_importing') && !@file_exists($conf['changelog'].'_tmp')) { $tmp = array(); // no event data trigger_event('TEMPORARY_CHANGELOG_UPGRADE_EVENT', $tmp); return true; @@ -58,9 +58,9 @@ function runTrimRecentChanges() { // Trims the recent changes cache to the last $conf['changes_days'] recent // changes or $conf['recent'] items, which ever is larger. // The trimming is only done once a day. - if (file_exists($conf['changelog']) && + if (@file_exists($conf['changelog']) && (filectime($conf['changelog'])+86400)<time() && - !file_exists($conf['changelog'].'_tmp')) { + !@file_exists($conf['changelog'].'_tmp')) { io_lock($conf['changelog']); $lines = file($conf['changelog']); if (count($lines)<$conf['recent']) { @@ -86,12 +86,12 @@ function runTrimRecentChanges() { } } io_saveFile($conf['changelog'].'_tmp', implode('', $out_lines)); - unlink($conf['changelog']); + @unlink($conf['changelog']); if (!rename($conf['changelog'].'_tmp', $conf['changelog'])) { // rename failed so try another way... io_unlock($conf['changelog']); io_saveFile($conf['changelog'], implode('', $out_lines)); - unlink($conf['changelog'].'_tmp'); + @unlink($conf['changelog'].'_tmp'); } else { io_unlock($conf['changelog']); } diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 57d27e7eb..4981c795c 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -190,7 +190,7 @@ if (!class_exists('configuration')) { $local = eval('return '.$this->_local_file.';'); if (!is_writable(dirname($local))) return true; - if (file_exists($local) && !is_writable($local)) return true; + if (@file_exists($local) && !is_writable($local)) return true; return false; } diff --git a/lib/plugins/importoldchangelog/action.php b/lib/plugins/importoldchangelog/action.php index 400ff6a18..e927b3e26 100644 --- a/lib/plugins/importoldchangelog/action.php +++ b/lib/plugins/importoldchangelog/action.php @@ -117,7 +117,7 @@ class action_plugin_importoldchangelog extends DokuWiki_Action_Plugin { function resetTimer() { // Add 5 minutes to the script execution timer... // This should be much more than needed. - set_time_limit(5*60); + @set_time_limit(5*60); // Note: Has no effect in safe-mode! } @@ -150,7 +150,7 @@ class action_plugin_importoldchangelog extends DokuWiki_Action_Plugin { ksort($recent); // ensure correct order of recent changes io_unlock($conf['changelog']); // hand off the lock to io_saveFile io_saveFile($conf['changelog'], implode('', $recent)); - unlink($conf['changelog'].'_importing'); // changelog importing unlock + @unlink($conf['changelog'].'_importing'); // changelog importing unlock } } @@ -163,7 +163,7 @@ function importoldchangelog_plugin_shutdown() { $path['failed'] = $conf['changelog'].'_failed'; $path['import_ok'] = $conf['changelog'].'_import_ok'; io_unlock($path['changelog']); // guarantee unlocking - if (file_exists($path['importing'])) { + if (@file_exists($path['importing'])) { // import did not finish rename($path['importing'], $path['failed']) or trigger_error('Importing changelog failed.', E_USER_WARNING); @unlink($path['import_ok']); diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php index 03efae3bf..643754771 100644 --- a/lib/plugins/plugin/admin.php +++ b/lib/plugins/plugin/admin.php @@ -723,7 +723,7 @@ class ap_manage { $path = DOKU_PLUGIN.$plugin.'/'; foreach ($plugin_types as $type) { - if (file_exists($path.$type.'.php')) { $components[] = array('name'=>$plugin, 'type'=>$type); continue; } + if (@file_exists($path.$type.'.php')) { $components[] = array('name'=>$plugin, 'type'=>$type); continue; } if ($dh = @opendir($path.$type.'/')) { while (false !== ($cp = readdir($dh))) { |