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)
{