Author: sevein
Date: Wed Aug 3 13:59:43 2011
New Revision: 9436
Log:
Clear cache after configureSite action to make sure that users reinstalling
have no problems with cached data
Added:
trunk/plugins/sfInstallPlugin/modules/sfInstallPlugin/actions/clearCacheAction.class.php
Modified:
trunk/plugins/sfInstallPlugin/modules/sfInstallPlugin/actions/configureSiteAction.class.php
Added:
trunk/plugins/sfInstallPlugin/modules/sfInstallPlugin/actions/clearCacheAction.class.php
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++
trunk/plugins/sfInstallPlugin/modules/sfInstallPlugin/actions/clearCacheAction.class.php
Wed Aug 3 13:59:43 2011 (r9436)
@@ -0,0 +1,35 @@
+<?php
+
+/*
+ * This file is part of Qubit Toolkit.
+ *
+ * Qubit Toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Qubit Toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Qubit Toolkit. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+class sfInstallPluginClearCacheAction extends sfAction
+{
+ public function execute($request)
+ {
+ // Use existing symfony task
+ $task = new
sfCacheClearTask(sfContext::getInstance()->getEventDispatcher(), new
sfFormatter());
+
+ $arguments = $options = array();
+
+ // Clear cache twice (see issue 1188)
+ $task->run($arguments, $options);
+ $task->run($arguments, $options);
+
+ $this->redirect(array('module' => 'sfInstallPlugin', 'action' =>
'finishInstall'));
+ }
+}
Modified:
trunk/plugins/sfInstallPlugin/modules/sfInstallPlugin/actions/configureSiteAction.class.php
==============================================================================
---
trunk/plugins/sfInstallPlugin/modules/sfInstallPlugin/actions/configureSiteAction.class.php
Wed Aug 3 12:08:26 2011 (r9435)
+++
trunk/plugins/sfInstallPlugin/modules/sfInstallPlugin/actions/configureSiteAction.class.php
Wed Aug 3 13:59:43 2011 (r9436)
@@ -70,7 +70,11 @@
$aclUserGroup->groupId = QubitAclGroup::ADMINISTRATOR_ID;
$aclUserGroup->save();
- $this->redirect(array('module' => 'sfInstallPlugin', 'action' =>
'finishInstall'));
+ $task = new
sfCacheClearTask(sfContext::getInstance()->getEventDispatcher(), new
sfFormatter());
+ $task->run($arguments, $options);
+ $task->run($arguments, $options);
+
+ $this->redirect(array('module' => 'sfInstallPlugin', 'action' =>
'clearCache'));
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.