Ejemplo n.º 1
0
        break;
    case 'c13y':
        include_once PHPWG_ROOT_PATH . 'admin/include/check_integrity.class.php';
        $c13y = new check_integrity();
        $c13y->maintenance();
        break;
    case 'search':
        $query = '
DELETE
  FROM ' . SEARCH_TABLE . '
;';
        pwg_query($query);
        break;
    case 'compiled-templates':
        $template->delete_compiled_templates();
        FileCombiner::clear_combined_files();
        $persistent_cache->purge(true);
        break;
    case 'derivatives':
        clear_derivative_cache($_GET['type']);
        break;
    default:
        break;
}
// +-----------------------------------------------------------------------+
// |                             template init                             |
// +-----------------------------------------------------------------------+
$template->set_filenames(array('maintenance' => 'maintenance.tpl'));
$url_format = get_root_url() . 'admin.php?page=maintenance&action=%s&pwg_token=' . get_pwg_token();
$purge_urls[l10n('All')] = sprintf($url_format, 'derivatives') . '&type=all';
foreach (ImageStdParams::get_defined_type_map() as $params) {
Ejemplo n.º 2
0
 /**
  * @param Script[] $scripts
  * @param int $load_mode
  * @return Combinable[]
  */
 private static function do_combine($scripts, $load_mode)
 {
     $combiner = new FileCombiner('js', $scripts);
     return $combiner->combine();
 }
 /**
  * Triggered on "init", in order to clean template files (not initialized on "user_init")
  */
 public function init()
 {
     if ($this->is_admin) {
         if (isset($_GET['ato_purge_template'])) {
             global $template;
             $template->delete_compiled_templates();
             FileCombiner::clear_combined_files();
         }
     }
 }