setRootDirectory (APPPATH . 'views/'); $this->setDirPrefix ('setup/'); $outertemplate = new View_Smarty ('layout'); $outertemplate->setRootDirectory ($this->getRootDirectory ()); $outertemplate->setDirPrefix ($this->getDirPrefix ()); $this->setOuterTemplate ($outertemplate); } } class Setup_Controller extends Controller { function __construct () { parent::__construct (); $this->defineExceptionHandler (); $this->defineSimpleConstants (); define ('SITE_DOMAIN', rtrim (SITE_DIR, '/')); Zend_Registry::getInstance ()->Environment = new Environment_Runtime (); } function install () { if ($this->isInstallationClosed ()) { url::newurl (url::href ('//')); } else { $walker = new Walker_Install ('stepCheckTemplatesC'); $walker->run (); } } function isInstallationClosed () { if (file_exists (DATADIR . '/config/database.php')) { return Setting_Model::get (Setting_Model::S_IS_INSTALLATION_CLOSED, false); } } }