Added a setting for selecting the default page.
This commit is contained in:
parent
81650ef29c
commit
199bb625e9
4 changed files with 28 additions and 9 deletions
|
|
@ -14,12 +14,14 @@ use strict;
|
|||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my (@param, $temp);
|
||||
@param = WebGUI::Macro::getParams($1);
|
||||
$temp = WebGUI::URL::gateway('home');
|
||||
($temp) = WebGUI::SQL->quickArray("select urlizedTitle from page where pageId=$session{setting}{defaultPage}");
|
||||
$temp = WebGUI::URL::gateway($temp);
|
||||
if ($param[0] ne "linkonly") {
|
||||
$temp = '<a class="homeLink" href="'.$temp.'">';
|
||||
if ($param[0] ne "") {
|
||||
|
|
|
|||
|
|
@ -103,17 +103,18 @@ sub www_editCompanyInformationSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editContentSettings {
|
||||
my ($output, %notFoundPage, %htmlFilter, %editor, $f);
|
||||
my ($output, %htmlFilter, %editor, $f, $pages);
|
||||
$pages = WebGUI::SQL->buildHashRef("select pageId,menuTitle from page order by menuTitle");
|
||||
%htmlFilter = ('none'=>WebGUI::International::get(420), 'most'=>WebGUI::International::get(421),
|
||||
'javascript'=>WebGUI::International::get(526), 'all'=>WebGUI::International::get(419));
|
||||
%notFoundPage = (1=>WebGUI::International::get(136), 4=>WebGUI::International::get(137));
|
||||
%editor = ('built-in'=>WebGUI::International::get(495), 'edit-on-pro'=>WebGUI::International::get(494));
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
$output .= helpIcon(29);
|
||||
$output .= '<h1>'.WebGUI::International::get(525).'</h1>';
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
$f->hidden("op","editContentSettingsSave");
|
||||
$f->select("notFoundPage",\%notFoundPage,WebGUI::International::get(141),[$session{setting}{notFoundPage}]);
|
||||
$f->select("defaultPage",$pages,WebGUI::International::get(527),[$session{setting}{defaultPage}]);
|
||||
$f->select("notFoundPage",$pages,WebGUI::International::get(141),[$session{setting}{notFoundPage}]);
|
||||
$f->text("docTypeDec",WebGUI::International::get(398),$session{setting}{docTypeDec});
|
||||
$f->yesNo("addEditStampToPosts",WebGUI::International::get(524),$session{setting}{addEditStampToPosts});
|
||||
$f->select("filterContributedHTML",\%htmlFilter,WebGUI::International::get(418),[$session{setting}{filterContributedHTML}]);
|
||||
|
|
@ -133,6 +134,7 @@ sub www_editContentSettings {
|
|||
sub www_editContentSettingsSave {
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
_saveSetting("addEditStampToPosts");
|
||||
_saveSetting("defaultPage");
|
||||
_saveSetting("notFoundPage");
|
||||
_saveSetting("docTypeDec");
|
||||
_saveSetting("filterContributedHTML");
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ sub _getPageInfo {
|
|||
$session{header}{status} = '404';
|
||||
}
|
||||
} else {
|
||||
$pageId = 1;
|
||||
$pageId = $session{setting}{defaultPage};
|
||||
}
|
||||
}
|
||||
%page = WebGUI::SQL->quickHash("select * from page where pageId='".$pageId."'",$_[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue