mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Replaced some file exists to is file (#1276)
* Replaced some file_exists to is_file * Update functions_thumbs.php * Updated * Update CronHelper.php * Updated * Update IPHelper.php * Updated * Update update_forums_atom.php * Update functions.php * Update Validate.php
This commit is contained in:
parent
e8a90b025c
commit
3626143879
24 changed files with 107 additions and 89 deletions
|
@ -23,7 +23,7 @@ $html = '';
|
|||
switch ($mode) {
|
||||
case 'create':
|
||||
$map->createSitemap();
|
||||
if (file_exists(SITEMAP_DIR . '/sitemap.xml')) {
|
||||
if (is_file(SITEMAP_DIR . '/sitemap.xml')) {
|
||||
$html .= $lang['SITEMAP_CREATED'] . ': <b>' . bb_date(TIMENOW, $bb_cfg['post_date_format']) . '</b> ' . $lang['SITEMAP_AVAILABLE'] . ': <a href="' . make_url('sitemap/sitemap.xml') . '" target="_blank">' . make_url('sitemap/sitemap.xml') . '</a>';
|
||||
} else {
|
||||
$html .= $lang['SITEMAP_NOT_CREATED'];
|
||||
|
@ -31,7 +31,7 @@ switch ($mode) {
|
|||
break;
|
||||
|
||||
case 'search_update':
|
||||
if (!file_exists(SITEMAP_DIR . '/sitemap.xml')) {
|
||||
if (!is_file(SITEMAP_DIR . '/sitemap.xml')) {
|
||||
$map->createSitemap();
|
||||
}
|
||||
|
||||
|
|
|
@ -23,8 +23,9 @@ if (!$torrent) {
|
|||
$this->ajax_die($lang['ERROR_BUILD']);
|
||||
}
|
||||
|
||||
$file_contents = null;
|
||||
$filename = get_attachments_dir() . '/' . $torrent['physical_filename'];
|
||||
if (!file_exists($filename) || !$file_contents = file_get_contents($filename)) {
|
||||
if (!is_file($filename) || !$file_contents = file_get_contents($filename)) {
|
||||
$this->ajax_die($lang['ERROR_NO_ATTACHMENT'] . "\n\n" . htmlCHR($filename));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue