Clean also opcache when cleaning archive if opcache_reset available.

- Format code too
pull/2487/head
jmontoyaa 8 years ago
parent 43fe062076
commit 7160e393d0
  1. 14
      main/admin/archive_cleanup.php

@ -18,7 +18,14 @@ api_protect_admin_script(true);
// setting breadcrumbs
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$form = new FormValidator('archive_cleanup_form', 'post', '', '', array(), FormValidator::LAYOUT_BOX);
$form = new FormValidator(
'archive_cleanup_form',
'post',
'',
'',
array(),
FormValidator::LAYOUT_BOX
);
$form->addButtonSend(get_lang('ArchiveDirCleanupProceedButton'));
if ($form->validate()) {
@ -34,6 +41,11 @@ if ($form->validate()) {
if (!empty($htaccess)) {
@file_put_contents($archive_path.'/.htaccess', $htaccess);
}
if (function_exists('opcache_reset')) {
opcache_reset();
}
if ($result) {
Display::addFlash(Display::return_message(get_lang('ArchiveDirCleanupSucceeded')));
} else {

Loading…
Cancel
Save