/** * Display upgrade form. */ function upgrade() { InstallHandler::validate(); if (($setLocale = Request::getUserVar('setLocale')) != null && Locale::isLocaleValid($setLocale)) { Request::setCookieVar('currentLocale', $setLocale); } $installForm =& new UpgradeForm(); $installForm->initData(); $installForm->display(); }
/** * If no context is selected, list all. * Otherwise, display the index page for the selected context. */ function index() { // Make sure errors are displayed to the browser during install. @ini_set('display_errors', true); $this->validate(); $this->setupTemplate(); if (($setLocale = PKPRequest::getUserVar('setLocale')) != null && AppLocale::isLocaleValid($setLocale)) { Request::setCookieVar('currentLocale', $setLocale); } if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor $installForm = new InstallForm(); } else { $installForm =& new InstallForm(); } $installForm->initData(); $installForm->display(); }
function _compileHelp($file) { preg_match('|help/([\\w]+)/(.+)\\.xml|', $file, $matches); Request::setCookieVar('currentLocale', $matches[1]); // FIXME kludge if (strstr($matches[2], '/topic/')) { $this->helpTopicDao->getTopic($matches[2]); } else { $this->helpTocDao->getToc($matches[2]); } }