This commit is contained in:
Roman Kelesidis 2023-09-27 23:16:09 +07:00
parent 46375234d7
commit 71b3505dcd
4 changed files with 8 additions and 11 deletions

View File

@ -13,7 +13,7 @@ function cron_get_file_lock ()
{ {
# bb_log(date('H:i:s - ') . getmypid() .' -x-- FILE-LOCK try'. LOG_LF, CRON_LOG_DIR .'cron_check'); # bb_log(date('H:i:s - ') . getmypid() .' -x-- FILE-LOCK try'. LOG_LF, CRON_LOG_DIR .'cron_check');
$lock_obtained = rename(CRON_ALLOWED, CRON_RUNNING); $lock_obtained = @rename(CRON_ALLOWED, CRON_RUNNING);
} }
elseif (file_exists(CRON_RUNNING)) elseif (file_exists(CRON_RUNNING))
{ {
@ -22,7 +22,7 @@ function cron_get_file_lock ()
elseif (!file_exists(CRON_ALLOWED) && !file_exists(CRON_RUNNING)) elseif (!file_exists(CRON_ALLOWED) && !file_exists(CRON_RUNNING))
{ {
file_write('', CRON_ALLOWED); file_write('', CRON_ALLOWED);
$lock_obtained = rename(CRON_ALLOWED, CRON_RUNNING); $lock_obtained = @rename(CRON_ALLOWED, CRON_RUNNING);
} }
return $lock_obtained; return $lock_obtained;
@ -30,10 +30,7 @@ function cron_get_file_lock ()
function cron_track_running ($mode) function cron_track_running ($mode)
{ {
if (!defined('CRON_STARTMARK')) @define('CRON_STARTMARK', TRIGGERS_DIR .'cron_started_at_'. date('Y-m-d_H-i-s') .'_by_pid_'. getmypid());
{
define('CRON_STARTMARK', TRIGGERS_DIR . 'cron_started_at_' . date('Y-m-d_H-i-s') . '_by_pid_' . getmypid());
}
if ($mode == 'start') if ($mode == 'start')
{ {

View File

@ -2597,7 +2597,7 @@ function create_magnet ($infohash, $auth_key, $name)
} }
$passkey_url = $passkey ? "?{$bb_cfg['passkey_key']}=$auth_key" : ''; $passkey_url = $passkey ? "?{$bb_cfg['passkey_key']}=$auth_key" : '';
return '<a href="magnet:?xt=urn:btih:' . bin2hex($infohash) . '&tr=' . urlencode($bb_cfg['bt_announce_url'] . $passkey_url) . '&dn=' . urlencode($name) . '"><img src="' . $images['icon_magnet'] . '" width="12" height="12" border="0" /></a>'; return '<a href="magnet:?xt=urn:btih:'. bin2hex($infohash) .'&tr='. urlencode($bb_cfg['bt_announce_url'] . $passkey_url) .'&dn='. urlencode($name) .'"><img src="'. $images['icon_magnet'] .'" width="12" height="12" border="0" /></a>';
} }
function set_die_append_msg ($forum_id = null, $topic_id = null, $group_id = null) function set_die_append_msg ($forum_id = null, $topic_id = null, $group_id = null)

View File

@ -29,11 +29,11 @@ function get_sql_log ()
if (!empty($datastore->db->dbg)) if (!empty($datastore->db->dbg))
{ {
$log .= get_sql_log_html($datastore->db, "cache: datastore [{$datastore->db->engine}]"); $log .= get_sql_log_html($datastore->db, 'cache: datastore ['.$datastore->db->engine.']');
} }
else if(!empty($datastore->dbg)) else if(!empty($datastore->dbg))
{ {
$log .= get_sql_log_html($datastore, "cache: datastore [{$datastore->engine}]"); $log .= get_sql_log_html($datastore, 'cache: datastore ['.$datastore->engine.']');
} }
return $log; return $log;

View File

@ -565,8 +565,8 @@ switch ($mode)
sync('forum', array($forum_id, $new_forum_id)); sync('forum', array($forum_id, $new_forum_id));
//bot //bot
$message = $lang['TOPIC_SPLIT'] . '<br /><br /><a href="' . TOPIC_URL . "$topic_id&amp;sid=" . $userdata['session_id'] . '">' . $lang['TOPIC_SPLIT_OLD'] . '</a>'; $message = $lang['TOPIC_SPLIT'] .'<br /><br /><a href="'. TOPIC_URL ."$topic_id&amp;sid=". $userdata['session_id'] .'">'. $lang['TOPIC_SPLIT_OLD'] .'</a>';
$message .= ' &nbsp;::&nbsp; <a href="' . TOPIC_URL . "$new_topic_id&amp;sid=" . $userdata['session_id'] . '">' . $lang['TOPIC_SPLIT_NEW'] . '</a>'; $message .= ' &nbsp;::&nbsp; <a href="'. TOPIC_URL ."$new_topic_id&amp;sid=". $userdata['session_id'] .'">'. $lang['TOPIC_SPLIT_NEW'] .'</a>';
// Log action // Log action
$log_action->mod('mod_topic_split', array( $log_action->mod('mod_topic_split', array(