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
|
@ -43,7 +43,7 @@ DB()->add_shutdown_query("
|
|||
foreach ($cron_jobs as $job) {
|
||||
$job_script = CRON_JOB_DIR . basename($job['cron_script']);
|
||||
|
||||
if (file_exists($job_script)) {
|
||||
if (is_file($job_script)) {
|
||||
$cron_start_time = utime();
|
||||
$cron_runtime_log = '';
|
||||
$cron_write_log = (CRON_LOG_ENABLED && (CRON_FORCE_LOG || $job['log_enabled'] >= 1));
|
||||
|
|
|
@ -14,7 +14,7 @@ if (!defined('BB_ROOT')) {
|
|||
$map = new TorrentPier\Sitemap();
|
||||
$map->createSitemap();
|
||||
|
||||
if (file_exists(SITEMAP_DIR . '/sitemap.xml')) {
|
||||
if (is_file(SITEMAP_DIR . '/sitemap.xml')) {
|
||||
$map_link = make_url(hide_bb_path(SITEMAP_DIR . '/sitemap.xml'));
|
||||
|
||||
foreach ($bb_cfg['sitemap_sending'] as $source_name => $source_link) {
|
||||
|
|
|
@ -16,7 +16,7 @@ global $bb_cfg;
|
|||
$timecheck = TIMENOW - 600;
|
||||
$forums_data = DB()->fetch_rowset("SELECT forum_id, allow_reg_tracker, forum_name FROM " . BB_FORUMS);
|
||||
|
||||
if (file_exists($bb_cfg['atom']['path'] . '/f/0.atom')) {
|
||||
if (is_file($bb_cfg['atom']['path'] . '/f/0.atom')) {
|
||||
if (filemtime($bb_cfg['atom']['path'] . '/f/0.atom') <= $timecheck) {
|
||||
\TorrentPier\Legacy\Atom::update_forum_feed(0, $forums_data);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ if (file_exists($bb_cfg['atom']['path'] . '/f/0.atom')) {
|
|||
}
|
||||
|
||||
foreach ($forums_data as $forum_data) {
|
||||
if (file_exists($bb_cfg['atom']['path'] . '/f/' . $forum_data['forum_id'] . '.atom')) {
|
||||
if (is_file($bb_cfg['atom']['path'] . '/f/' . $forum_data['forum_id'] . '.atom')) {
|
||||
if (filemtime($bb_cfg['atom']['path'] . '/f/' . $forum_data['forum_id'] . '.atom') <= $timecheck) {
|
||||
\TorrentPier\Legacy\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue