Skip to content

Commit

Permalink
site settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed Apr 11, 2012
1 parent 03ec469 commit 4aaf1f2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion classes/admin/form/PKPSiteSettingsForm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ function display() {
$publicFileManager = new PublicFileManager();
$siteStyleFilename = $publicFileManager->getSiteFilesPath() . '/' . $site->getSiteStyleFilename();
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('showThumbnail', $site->getSetting('showThumbnail'));
$templateMgr->assign('showTitle', $site->getSetting('showTitle'));
$templateMgr->assign('showDescription', $site->getSetting('showDescription'));
$templateMgr->assign('originalStyleFilename', $site->getOriginalStyleFilename());
$templateMgr->assign('pageHeaderTitleImage', $site->getSetting('pageHeaderTitleImage'));
$templateMgr->assign('styleFilename', $site->getSiteStyleFilename());
Expand All @@ -67,6 +70,9 @@ function initData() {
'title' => $site->getSetting('title'), // Localized
'intro' => $site->getSetting('intro'), // Localized
'redirect' => $site->getRedirect(),
'showThumbnail' => $site->getSetting('showThumbnail'),
'showTitle' => $site->getSetting('showTitle'),
'showDescription' => $site->getSetting('showDescription'),
'about' => $site->getSetting('about'), // Localized
'contactName' => $site->getSetting('contactName'), // Localized
'contactEmail' => $site->getSetting('contactEmail'), // Localized
Expand All @@ -89,7 +95,7 @@ function getLocaleFieldNames() {
*/
function readInputData() {
$this->readUserVars(
array('pageHeaderTitleType', 'title', 'intro', 'about', 'redirect', 'contactName', 'contactEmail', 'minPasswordLength', 'pageHeaderTitleImageAltText', 'siteTheme')
array('pageHeaderTitleType', 'title', 'intro', 'about', 'redirect', 'contactName', 'contactEmail', 'minPasswordLength', 'pageHeaderTitleImageAltText', 'showThumbnail', 'showTitle', 'showDescription', 'siteTheme')
);
}

Expand Down Expand Up @@ -118,6 +124,10 @@ function execute() {
$site->updateSetting('pageHeaderTitleImage', $setting, 'object', true);
}

$site->updateSetting('showThumbnail', $this->getData('showThumbnail'), bool);
$site->updateSetting('showTitle', $this->getData('showTitle'), bool);
$site->updateSetting('showDescription', $this->getData('showDescription'), bool);

$siteDao->updateObject($site);
return true;
}
Expand Down

0 comments on commit 4aaf1f2

Please sign in to comment.