CC-5802: Upgrade application.ini file
This commit is contained in:
parent
8d9b9c1fb7
commit
42806b1cbf
|
@ -24,7 +24,7 @@ class UpgradeController extends Zend_Controller_Action
|
||||||
//create a temporary maintenance notification file
|
//create a temporary maintenance notification file
|
||||||
//when this file is on the server, zend framework redirects all
|
//when this file is on the server, zend framework redirects all
|
||||||
//requests to the maintenance page and sets a 503 response code
|
//requests to the maintenance page and sets a 503 response code
|
||||||
$maintenanceFile = '/tmp/maintenance.txt';
|
$maintenanceFile = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."maintenance.txt" : "/tmp/maintenance.txt";
|
||||||
$file = fopen($maintenanceFile, 'w');
|
$file = fopen($maintenanceFile, 'w');
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
class Zend_Controller_Plugin_Maintenance extends Zend_Controller_Plugin_Abstract
|
class Zend_Controller_Plugin_Maintenance extends Zend_Controller_Plugin_Abstract
|
||||||
{
|
{
|
||||||
protected $maintenanceFile = '/tmp/maintenance.txt';
|
|
||||||
|
|
||||||
public function preDispatch(Zend_Controller_Request_Abstract $request) {
|
public function preDispatch(Zend_Controller_Request_Abstract $request) {
|
||||||
if (file_exists($this->maintenanceFile)) {
|
$maintenanceFile = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."maintenance.txt" : "/tmp/maintenance.txt";
|
||||||
|
|
||||||
|
if (file_exists($maintenanceFile)) {
|
||||||
$request->setModuleName('default')
|
$request->setModuleName('default')
|
||||||
->setControllerName('index')
|
->setControllerName('index')
|
||||||
->setActionName('maintenance')
|
->setActionName('maintenance')
|
||||||
|
|
Loading…
Reference in New Issue