示例#1
0
文件: misc.php 项目: 0hyeah/yurivn
    vB_Cache::instance()->clean(false);
    print_cp_message($vbphrase['cache_cleared']);
} else {
    print_cp_header($vbphrase['maintenance']);
}
// ###################### Clear Autosave option #######################
if ($_REQUEST['do'] == 'clearauto') {
    print_form_header('misc', 'doclearauto');
    print_table_header($vbphrase['clear_autosave_title']);
    print_description_row($vbphrase['clear_autosave_desc']);
    print_input_row($vbphrase['clear_autosave_limit'], 'cleandays', 21);
    print_submit_row($vbphrase['clear_autosave_run']);
}
if ($_POST['do'] == 'rebuildactivity') {
    vB_ActivityStream_Manage::rebuild();
    vB_ActivityStream_Manage::updateScores();
    print_stop_message('rebuild_activity_stream_done');
}
if ($_POST['do'] == 'doclearauto') {
    $vbulletin->input->clean_array_gpc('p', array('cleandays' => TYPE_UINT));
    if ($vbulletin->GPC['cleandays'] < 7) {
        print_stop_message('clear_autosave_toolow');
    }
    // Clear out the actual autosave entries
    $cleandate = TIMENOW - $vbulletin->GPC['cleandays'] * 86400;
    $vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "autosave WHERE dateline < {$cleandate}");
    print_stop_message('clear_autosave_done');
}
// ###################### Rebuild all style info #######################
if ($_POST['do'] == 'rebuildstyles') {
    require_once DIR . '/includes/adminfunctions_template.php';