Пример #1
0
            $allData = minifyJs($allData);
        }
        if (!$noCache) {
            file_put_contents($cacheDir . $filesKey, $allData);
        }
    }
    echo $allData;
}
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../../app/code/community/PSystem/OptimizationHead/lib');
$type = empty($_GET['type']) ? '' : $_GET['type'];
$files = empty($_GET['file']) ? array() : explode(',', $_GET['file']);
switch ($type) {
    case 'css':
        setCssHeader();
        combineFiles($files, 'js', 'css');
        exit;
    case 'cssskin':
        setCssHeader();
        combineFiles($files, 'skin', 'css');
        exit;
    case 'js':
        setJsHeader();
        combineFiles($files, 'js', 'js');
        exit;
    case 'jsskin':
        setJsHeader();
        combineFiles($files, 'skin', 'js');
        exit;
}
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
Пример #2
0
 static function getEditorRules()
 {
     global $application;
     return trim(preg_replace('/\\s+/', ' ', combineFiles($application->getAppIni('PATH_THEME') . 'css/*editable.txt')));
 }