/** * Save changes to a press' settings. */ function updatePress() { $this->validate(); $this->setupTemplate(true); import('classes.admin.form.PressSiteSettingsForm'); if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor $settingsForm = new PressSiteSettingsForm(Request::getUserVar('pressId')); } else { $settingsForm =& new PressSiteSettingsForm(Request::getUserVar('pressId')); } $settingsForm->readInputData(); if ($settingsForm->validate()) { PluginRegistry::loadCategory('blocks'); $settingsForm->execute(); import('lib.pkp.classes.notification.NotificationManager'); $notificationManager =& new NotificationManager(); $notificationManager->createTrivialNotification('notification.notification', 'common.changesSaved'); Request::redirect(null, null, 'presses'); } else { $settingsForm->display(); } }