Example #1
0
 /**
  * Do some checks in the begin.
  *
  * @return void
  */
 public function init()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->view->clearVars();
     $front = Zend_Controller_Front::getInstance();
     $response = $front->getRequest();
     $webPath = $response->getScheme() . '://' . $response->getHttpHost() . $response->getBasePath() . '/';
     $this->view->webPath = $webPath;
     $this->view->message = array();
     $this->view->success = array();
     $this->view->error = array();
     $this->view->exportModules = Setup_Models_Migration::getModulesToMigrate();
     $this->_helper->viewRenderer->setNoRender();
     try {
         $this->_setup = new Setup_Models_Setup();
         $message = $this->_setup->getMessage();
         if (!empty($message)) {
             $this->view->message = $message;
         } else {
             $this->view->success = "Server OK";
         }
     } catch (Exception $error) {
         $this->view->error = explode("\n", $error->getMessage());
     }
 }
 /**
  * Default action.
  *
  * @return void
  */
 public function indexAction()
 {
     try {
         $this->_setup->checkServer();
         $message = $this->_setup->getMessage();
         if (!empty($message)) {
             $this->view->message = $message;
         } else {
             $this->view->success = "Server OK";
         }
     } catch (Exception $error) {
         $this->view->error = explode("\n", $error->getMessage());
     }
     $this->view->template = $this->view->render('server.phtml');
     $this->render('index');
 }