diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2015-01-07 10:47:45 +0100 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2015-01-07 10:47:45 +0100 |
commit | 79e79377626799a77c11aa7849cb9c64305590c8 (patch) | |
tree | 0d359f6b0985fd29f2c854d232578881e636b8c1 /inc/html.php | |
parent | cb339ea7ee2b684b0fd0fb948681c66b76a0b4e1 (diff) | |
download | rpg-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 'inc/html.php')
-rw-r--r-- | inc/html.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/html.php b/inc/html.php index 87affd47b..3a93a6604 100644 --- a/inc/html.php +++ b/inc/html.php @@ -501,7 +501,7 @@ function html_revisions($first=0, $media_id = false){ $form->addElement(form_makeOpenTag('ul')); if (!$media_id) $exists = $INFO['exists']; - else $exists = @file_exists(mediaFN($id)); + else $exists = file_exists(mediaFN($id)); $display_name = (!$media_id && useHeading('navigation')) ? hsc(p_get_first_heading($id)) : $id; if (!$display_name) $display_name = $id; @@ -568,7 +568,7 @@ function html_revisions($first=0, $media_id = false){ $date = dformat($rev); $info = $changelog->getRevisionInfo($rev); if($media_id) { - $exists = @file_exists(mediaFN($id, $rev)); + $exists = file_exists(mediaFN($id, $rev)); } else { $exists = page_exists($id, $rev); } @@ -765,7 +765,7 @@ function html_recent($first=0, $show_changes='both'){ $href = ''; if (!empty($recent['media'])) { - $diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && @file_exists(mediaFN($recent['id']))); + $diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && file_exists(mediaFN($recent['id']))); if ($diff) { $href = media_managerURL(array('tab_details' => 'history', 'mediado' => 'diff', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&'); |