more guid stuff
This commit is contained in:
parent
c60613ac2c
commit
22994e8373
20 changed files with 126 additions and 125 deletions
|
|
@ -87,7 +87,7 @@ sub process {
|
|||
$query = "select bufferDate,pageId,title from page where parentId=2 order by bufferDate";
|
||||
} else {
|
||||
$query = "select bufferDate,pageId,title from page where parentId=2 "
|
||||
." and bufferUserId=$session{user}{userId} "
|
||||
." and bufferUserId=".quote($session{user}{userId})
|
||||
." order by bufferDate";
|
||||
}
|
||||
$r = WebGUI::SQL->read($query);
|
||||
|
|
@ -105,7 +105,7 @@ sub process {
|
|||
." order by bufferDate";
|
||||
} else {
|
||||
$query = "select bufferDate,wobjectId,title,namespace from wobject where pageId=2 "
|
||||
." and bufferUserId=$session{user}{userId} "
|
||||
." and bufferUserId=".quote($session{user}{userId})
|
||||
." order by bufferDate";
|
||||
}
|
||||
$r = WebGUI::SQL->read($query);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ sub process {
|
|||
if ($session{setting}{defaultPage} == $session{page}{pageId}) {
|
||||
$temp = $session{page}{urlizedTitle};
|
||||
} else {
|
||||
($temp) = WebGUI::SQL->quickArray("select urlizedTitle from page where pageId=$session{setting}{defaultPage}",WebGUI::SQL->getSlave);
|
||||
($temp) = WebGUI::SQL->quickArray("select urlizedTitle from page where pageId=".quote($session{setting}{defaultPage}),WebGUI::SQL->getSlave);
|
||||
}
|
||||
$temp = WebGUI::URL::gateway($temp);
|
||||
if ($param[0] ne "linkonly") {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ sub process {
|
|||
$format = '%z' if ($format eq "");
|
||||
$output = "";
|
||||
|
||||
($time) = WebGUI::SQL->quickArray("SELECT max(lastEdited) FROM wobject where pageId=$session{page}{pageId}",WebGUI::SQL->getSlave);
|
||||
($time) = WebGUI::SQL->quickArray("SELECT max(lastEdited) FROM wobject where pageId=".quote($session{page}{pageId}),WebGUI::SQL->getSlave);
|
||||
if ($time) {
|
||||
$output = $label.epochToHuman($time,$format);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ sub process {
|
|||
$collateralFolderId = 0 unless ($collateralFolderId);
|
||||
}
|
||||
my @images = WebGUI::SQL->buildArray("select collateralId from collateral
|
||||
where collateralType='image' and collateralFolderId=".$collateralFolderId,WebGUI::SQL->getSlave);
|
||||
where collateralType='image' and collateralFolderId=".quote($collateralFolderId),WebGUI::SQL->getSlave);
|
||||
if (my $collateral = WebGUI::Collateral->new($images[rand($#images+1)])) {
|
||||
return '<img src="'.$collateral->getURL.'" '.$collateral->get("parameters").' />';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ sub process {
|
|||
$collateralFolderId = 0 unless ($collateralFolderId);
|
||||
}
|
||||
my @snippets = WebGUI::SQL->buildArray("select collateralId from collateral
|
||||
where collateralType='snippet' and collateralFolderId=".$collateralFolderId,WebGUI::SQL->getSlave);
|
||||
where collateralType='snippet' and collateralFolderId=".quote($collateralFolderId),WebGUI::SQL->getSlave);
|
||||
if (my $collateral = WebGUI::Collateral->new($snippets[rand($#snippets+1)])) {
|
||||
return $collateral->get("parameters");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ use WebGUI::URL;
|
|||
sub process {
|
||||
my ($sth, %data, $output);
|
||||
tie %data, 'Tie::CPHash';
|
||||
%data = WebGUI::SQL->quickHash("select pageId,parentId,title,urlizedTitle from page where pageId=".($_[0] || $session{page}{parentId}),WebGUI::SQL->getSlave);
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ use strict;
|
|||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Template;
|
||||
use WebGUI::URL;
|
||||
use WebGUI::Utility;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue