Example #1
0
 protected function _initRequest()
 {
     Core_Model_Language::prepare();
     $frontController = $this->_front_controller;
     $this->_request = new Siberian_Controller_Request_Http();
     $this->_request->isInstalling(!Installer_Model_Installer::isInstalled());
     $this->_request->setPathInfo();
     $baseUrl = $this->_request->getScheme() . '://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl();
     $this->_request->setBaseUrl($baseUrl);
     $frontController->setRequest($this->_request);
     Siberian_View::setRequest($this->_request);
     Core_Model_Default::setBaseUrl($this->_request->getBaseUrl());
 }
 public function endAction()
 {
     try {
         if (Installer_Model_Installer::isInstalled() or Installer_Model_Installer::setIsInstalled()) {
             $html = array('success' => 1);
         } else {
             throw new Exception("An error occured while finalizing the installation.");
         }
     } catch (Exception $e) {
         $html = array('message' => $e->getMessage());
         $this->getResponse()->setHttpResponseCode(400);
     }
     $this->getLayout()->setHtml(Zend_Json::encode($html));
 }