|| # This file may not be redistributed in whole or significant part. # || || # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ###################################################################### || \*========================================================================*/ // ######################## SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // if (!is_object($vbulletin->db)) // { // exit; // } // ######################################################################## // ######################### START MAIN SCRIPT ############################ // ######################################################################## $timenow = vB::getRequest()->getTimeNow(); vB::getDbAssertor()->delete('session', array(array('field' => 'lastactivity', 'value' => $timenow - vB::getDatastore()->getOption('cookietimeout'), vB_Db_Query::OPERATOR_KEY => vB_Db_Query::OPERATOR_LT))); vB::getDbAssertor()->delete('cpsession', array(array('field' => 'dateline', 'value' => vB::getDatastore()->getOption('timeoutcontrolpanel') ? $timenow - vB::getDatastore()->getOption('cookietimeout') : $timenow - 3600, vB_Db_Query::OPERATOR_KEY => vB_Db_Query::OPERATOR_LT))); vB_Api::instanceInternal('search')->clean(); // expired lost passwords and email confirmations after 4 days vB::getDbAssertor()->assertQuery('cleanupUA', array('time' => $timenow - 345600)); vB::getDbAssertor()->delete('noderead', array(array('field' => 'readtime', 'value' => $timenow - vB::getDatastore()->getOption('markinglimit') * 86400, vB_Db_Query::OPERATOR_KEY => vB_Db_Query::OPERATOR_LT))); vB_Api_Wol::buildSpiderList(); // Remove expired cache items vB_Cache::resetCache(true); log_cron_action('', $nextitem, 1); /*=========================================================================*\ || ####################################################################### || # Downloaded: 15:45, Tue Sep 8th 2015 || # CVS: $RCSfile$ - $Revision: 83432 $ || ####################################################################### \*=========================================================================*/
if (!can_administer('canadminmaintain') and !vB::getUserContext()->hasAdminPermission('canadmintemplates') and !$maintainAll) { print_cp_no_permission(); } // ############################# LOG ACTION ############################### log_admin_action(); // ######################################################################## // ######################### START MAIN SCRIPT ############################ // ######################################################################## if (empty($_REQUEST['do'])) { $_REQUEST['do'] = 'chooser'; } $vbulletin->input->clean_array_gpc('r', array('perpage' => vB_Cleaner::TYPE_UINT, 'startat' => vB_Cleaner::TYPE_UINT)); // ###################### Start clear cache ######################## if ($_REQUEST['do'] == 'clear_cache') { print_cp_header($vbphrase['clear_system_cache']); vB_Cache::resetCache(); vB::getDatastore()->resetCache(); print_cp_message($vbphrase['cache_cleared']); } else { print_cp_header($vbphrase['maintenance']); } // ###################### Rebuild all style info ####################### if ($_POST['do'] == 'rebuildstyles') { if (!vB::getUserContext()->hasAdminPermission('canadmintemplates')) { print_cp_no_permission(); } require_once DIR . '/includes/adminfunctions_template.php'; $vbulletin->input->clean_array_gpc('p', array('renumber' => vB_Cleaner::TYPE_BOOL, 'install' => vB_Cleaner::TYPE_BOOL)); build_all_styles($vbulletin->GPC['renumber'], $vbulletin->GPC['install'], 'misc.php?' . vB::getCurrentSession()->get('sessionurl') . 'do=chooser#style'); print_stop_message2('updated_styles_successfully'); }