Files
luos/workflow/engine/methods/setup/clearCompiledAjax.php
Hector Cortez 9cd2aa97a0 BUG 8856 Migrate the Clear cache Interface from master branch SOLVED.
- Migrate the Clear cache Interface from master branch.
- Clear cache Interface ExtJS migrated from the master branch.
2012-03-28 09:41:50 -04:00

27 lines
778 B
PHP

<?php
try {
if ( (isset($_POST['javascriptCache'])) || (isset($_POST['metadataCache'])) || (isset($_POST['htmlCache']))) {
if ((isset($_POST['javascriptCache'])) && (@chdir(PATH_C.'/ExtJs/'))) {
G::rm_dir(PATH_C.'/ExtJs/');
$response->javascript = true;
}
if ((isset($_POST['metadataCache'])) && (@chdir(PATH_C.'/xmlform/'))) {
G::rm_dir(PATH_C.'/xmlform/');
$response->xmlform = true;
}
if((isset($_POST['htmlCache'])) && (@chdir(PATH_C.'/smarty/'))) {
G::rm_dir(PATH_C.'/smarty/');
$response->smarty = true;
}
$response->success = true;
//$response->path = $path;
}else{
$response->success = false;
}
}
catch ( Exception $e ) {
$response->success = false;
}
echo G::json_encode($response);