bugs fixed
This commit is contained in:
parent
e6818b58fc
commit
5f33a4a15d
11 changed files with 55 additions and 34 deletions
|
|
@ -12,23 +12,13 @@ package WebGUI::Macro::RootTitle;
|
|||
|
||||
use strict;
|
||||
use Tie::CPHash;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Page;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::URL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($sth, %data, $output);
|
||||
tie %data, 'Tie::CPHash';
|
||||
my $pageid = $_[0] || $session{page}{parentId};
|
||||
%data = WebGUI::SQL->quickHash("select pageId,parentId,title,urlizedTitle from page where pageId=".quote($pageId),WebGUI::SQL->getSlave);
|
||||
if ($data{parentId} == 0) {
|
||||
$output = $data{title} || $session{page}{title};
|
||||
} else {
|
||||
$output = &process($data{parentId},$_[1]);
|
||||
}
|
||||
return $output;
|
||||
my $root = WebGUI::Page->getWebGUIRoot;
|
||||
return $root->get("title");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue