CC-5814: 'Down for maintenance' page during upgrades

This commit is contained in:
drigato 2014-04-24 16:19:55 -04:00
parent 069ebd3991
commit f536a7b1b4
5 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,15 @@
<?php
class Zend_Controller_Plugin_Maintenance extends Zend_Controller_Plugin_Abstract
{
protected $maintenanceFile = '/tmp/maintenance.txt';
public function preDispatch(Zend_Controller_Request_Abstract $request) {
if (file_exists($this->maintenanceFile)) {
$request->setModuleName('default')
->setControllerName('index')
->setActionName('maintenance')
->setDispatched(true);
}
}
}