<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
$this->addElement(
'submit', $this->getButtonName('next', 'cleanup'), 'Cleanup Caches',
- array('class' => 'form-submit', 'id' => 'cleanup-cache')
+ array('class' => 'crm-form-submit', 'id' => 'cleanup-cache')
);
$this->add('text', 'newBaseURL', ts('New Base URL'), NULL, TRUE);
return $this->_defaults;
}
+ /**
+ * @param $fields
+ *
+ * @return array
+ */
static function formRule($fields) {
$tmpDir = trim($fields['newBaseDir']);
}
function postProcess() {
- if (CRM_Utils_Array::value('_qf_UpdateConfigBackend_next_cleanup', $_POST)) {
+ if (!empty($_POST['_qf_UpdateConfigBackend_next_cleanup'])) {
$config = CRM_Core_Config::singleton();
CRM_Core_Config::clearDBCache();
parent::rebuildMenu();
+ CRM_Core_BAO_WordReplacement::rebuild();
+
CRM_Core_Session::setStatus(ts('Cache has been cleared and menu has been rebuilt successfully.'), ts("Success"), "success");
return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/setting/updateConfigBackend', 'reset=1'));
}