change auto clean up option to config

This commit is contained in:
xiaomlove
2021-01-29 19:44:50 +08:00
parent 9d5341d6cc
commit 328e8ef953
6 changed files with 5 additions and 13 deletions
+1 -1
View File
@@ -401,7 +401,7 @@ $SUBSPATH = "subs";
//Make sure you have wget installed on your OS
//replace "http://www.nexusphp.com/" with your own site address
$useCronTriggerCleanUp = $MAIN['use_cron_trigger_cleanup'];
$useCronTriggerCleanUp = config('use_cron_trigger_clean_up', false);
//some promotion rules
//$promotionrules_torrent = array(0 => array("mediumid" => array(1), "promotion" => 5), 1 => array("mediumid" => array(3), "promotion" => 5), 2 => array("catid" => array(402), "standardid" => array(3), "promotion" => 4), 3 => array("catid" => array(403), "standardid" => array(3), "promotion" => 4));
$promotionrules_torrent = array();
+4 -5
View File
@@ -1752,15 +1752,14 @@ function getExportedValue($input,$t = null) {
function dbconn($autoclean = false, $doLogin = true)
{
global $useCronTriggerCleanUp;
\Nexus\Database\DB::getInstance()->autoConnect();
if ($doLogin) {
userlogin();
}
// if (!$useCronTriggerCleanUp && $autoclean) {
// register_shutdown_function("autoclean");
// }
if (!$useCronTriggerCleanUp && $autoclean) {
register_shutdown_function("autoclean");
}
}
function get_user_row($id)
{
-2
View File
@@ -680,8 +680,6 @@ $lang_settings = array
'text_email_notification_note' => "是否允许用户在收取新短讯、评论等时候收到邮件提示。",
'text_users_get' => "首次升级至此等级的用户将获得",
'text_invitations_default' => "个邀请名额。默认",
'row_use_cron_trigger_cleanup' => '使用定时器进行清理',
'text_use_cron_trigger_cleanup_note' => '确保已经配置好定时任务',
'row_logging' => '运行日志路径',
'text_logging_note' => '请填写你的运行时日志路径',
);
-2
View File
@@ -680,8 +680,6 @@ $lang_settings = array
'text_email_notification_note' => "是否允許用戶在收取新短訊、評論等時候收到郵件輔助說明。",
'text_users_get' => "首次升級至此等級的用戶將獲得",
'text_invitations_default' => "個邀請名額。預設",
'row_use_cron_trigger_cleanup' => '使用定時器進行清理',
'text_use_cron_trigger_cleanup_note' => '確保已經配置好定時任務',
'row_logging' => '運行日誌路徑',
'text_logging_note' => '請填寫妳的運行時日誌路徑',
);
-2
View File
@@ -680,8 +680,6 @@ $lang_settings = array
'text_email_notification_note' => "Allow users to receive email notification when he gets new pm, comment, etc.",
'text_users_get' => "Users would get ",
'text_invitations_default' => " invitations the first time he is promoted to this class. Default ",
'row_use_cron_trigger_cleanup' => 'Use cron trigger cleanup',
'text_use_cron_trigger_cleanup_note' => 'Make sure have configure crontab job',
'row_logging' => 'Runtime log path',
'text_logging_note' => 'Please enter your runtime log path',
);
-1
View File
@@ -625,7 +625,6 @@ elseif ($action == 'mainsettings') // main settings
tr($lang_settings['row_torrent_directory'], "<input type='text' style=\"width: 100px\" name=torrent_dir value='".($MAIN["torrent_dir"] ? $MAIN["torrent_dir"] : "torrents")."'> ".$lang_settings['text_torrent_directory'], 1);
tr($lang_settings['row_bitbucket_directory'],"<input type='text' style=\"width: 100px\" name=bitbucket value='".($MAIN["bitbucket"] ? $MAIN["bitbucket"] : "bitbucket")."'> ".$lang_settings['text_bitbucket_directory_note'], 1);
tr($lang_settings['row_torrent_name_prefix'], "<input type='text' style=\"width: 100px\" name=torrentnameprefix value='".($MAIN["torrentnameprefix"] ? $MAIN["torrentnameprefix"] : "[Nexus]")."'> ".$lang_settings['text_torrent_name_prefix_note'], 1);
yesorno($lang_settings['row_use_cron_trigger_cleanup'],'use_cron_trigger_cleanup', $MAIN['use_cron_trigger_cleanup'], $lang_settings['text_use_cron_trigger_cleanup_note']);
tr($lang_settings['row_save_settings'],"<input type='submit' name='save' value='".$lang_settings['submit_save_settings']."'>", 1);
print ("</form>");