$this->import('BackendUser', 'User'); parent::__construct(); $this->User->authenticate(); $this->loadLanguageFile('default'); } /** * Run the controller and parse the template */ public function run() { $this->Template = new BackendTemplate('be_preview'); $this->Template->base = Environment::get('base'); $this->Template->language = $GLOBALS['TL_LANGUAGE']; $this->Template->title = specialchars($GLOBALS['TL_LANG']['MSC']['fePreview']); $this->Template->charset = $GLOBALS['TL_CONFIG']['characterSet']; $this->Template->site = Input::get('site', true); if (Input::get('page')) { $this->Template->url = $this->redirectToFrontendPage(Input::get('page'), Input::get('article'), true); } else { $this->Template->url = Environment::get('base'); } $GLOBALS['TL_CONFIG']['debugMode'] = false; $this->Template->output(); } } /** * Instantiate the controller */ $objPreview = new Preview(); $objPreview->run();