Files
luos/workflow/engine/methods/setup/clearCompiledAjax.php
norahmollo 351432e92f BUG-12021 Audit Log
Improvements Audit Log
2014-10-07 15:58:46 -04:00

37 lines
1023 B
PHP

<?php
try {
$response = new stdClass;
if (isset( $_POST['javascriptCache'] ) || isset( $_POST['metadataCache'] ) || isset( $_POST['htmlCache'] )) {
$msgLog = '';
if (isset( $_POST['javascriptCache'] )) {
G::rm_dir( PATH_C . 'ExtJs' );
$response->javascript = true;
$msgLog .= 'Javascript cache ';
}
if (isset( $_POST['metadataCache'] )) {
G::rm_dir( PATH_C . 'xmlform' );
$response->xmlform = true;
$msgLog .= 'Forms Metadata cache ';
}
if (isset( $_POST['htmlCache'] )) {
G::rm_dir( PATH_C . 'smarty' );
$response->smarty = true;
$msgLog .= 'Forms Html Templates cache ';
}
$response->success = true;
G::auditLog("ClearCache", $msgLog);
} else {
$response->success = false;
}
} catch (Exception $e) {
$response->success = false;
$response->message = $e->getMessage();
}
echo G::json_encode( $response );