|
|
@ -761,12 +761,18 @@ |
|
|
|
|
|
|
|
|
|
|
|
function showCacheSize () |
|
|
|
function showCacheSize () |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
global $AVE_Template; |
|
|
|
|
|
|
|
|
|
|
|
switch ($_REQUEST['source']) |
|
|
|
switch ($_REQUEST['source']) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case 'smarty': |
|
|
|
case 'smarty': |
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/cache/smarty')); |
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/cache/smarty')); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 'block': |
|
|
|
|
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/cache/sql/block')); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 'documents': |
|
|
|
case 'documents': |
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/cache/sql/documents')); |
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/cache/sql/documents')); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -799,6 +805,10 @@ |
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/session')); |
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/session')); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 'sysblocks': |
|
|
|
|
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/cache/sql/sysblocks')); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 'settings': |
|
|
|
case 'settings': |
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/cache/sql/settings')); |
|
|
|
$size = format_size(get_dir_size(BASE_DIR . '/tmp/cache/sql/settings')); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -806,7 +816,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
$return = [ |
|
|
|
$return = [ |
|
|
|
'size' => $size, |
|
|
|
'size' => $size, |
|
|
|
'message' => 'Успешно выполнено', |
|
|
|
'message' => $AVE_Template->get_config_vars('SETTINGS_SUCCESS'), |
|
|
|
'theme' => 'accept' |
|
|
|
'theme' => 'accept' |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
@ -824,8 +834,8 @@ |
|
|
|
$cache_dir = BASE_DIR . '/tmp/cache/smarty'; |
|
|
|
$cache_dir = BASE_DIR . '/tmp/cache/smarty'; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 'blocks': |
|
|
|
case 'block': |
|
|
|
$cache_dir = BASE_DIR . '/tmp/blocks'; |
|
|
|
$cache_dir = BASE_DIR . '/tmp/cache/sql/block'; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 'documents': |
|
|
|
case 'documents': |
|
|
@ -857,7 +867,7 @@ |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 'sysblocks': |
|
|
|
case 'sysblocks': |
|
|
|
$cache_dir = BASE_DIR . '/tmp/sysblocks'; |
|
|
|
$cache_dir = BASE_DIR . '/tmp/cache/sql/sysblocks'; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 'sessions': |
|
|
|
case 'sessions': |
|
|
@ -873,8 +883,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
$return = [ |
|
|
|
$return = [ |
|
|
|
'size' => format_size(get_dir_size($cache_dir)), |
|
|
|
'size' => format_size(get_dir_size($cache_dir)), |
|
|
|
'header' => $remove ? $AVE_Template->get_config_vars('SETTINGS_CACHE_SUCCES') : $AVE_Template->get_config_vars('SETTINGS_CACHE_ERROR'), |
|
|
|
'header' => $remove ? $AVE_Template->get_config_vars('SETTINGS_CACHE_SUCCESS') : $AVE_Template->get_config_vars('SETTINGS_CACHE_ERROR'), |
|
|
|
'message' => $remove ? $AVE_Template->get_config_vars('SETTINGS_CACHE_SUCCES_T') : $AVE_Template->get_config_vars('SETTINGS_CACHE_ERROR_T'), |
|
|
|
'message' => $remove ? $AVE_Template->get_config_vars('SETTINGS_CACHE_SUCCESS_T') : $AVE_Template->get_config_vars('SETTINGS_CACHE_ERROR_T'), |
|
|
|
'theme' => $remove ? 'accept' : 'error' |
|
|
|
'theme' => $remove ? 'accept' : 'error' |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|