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");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ sub www_htmlArealistCollateral {
|
|||
my $parent = $folderId;
|
||||
# push parent folders in array so it can be reversed
|
||||
unshift(@parents, $parent);
|
||||
until($parent == 0) {
|
||||
until($parent eq '0') {
|
||||
($parent) = WebGUI::SQL->quickArray("select parentId from collateralFolder where collateralFolderId=".quote($parent));
|
||||
unshift(@parents, $parent);
|
||||
}
|
||||
|
|
@ -544,7 +544,7 @@ sub www_htmlArealistCollateral {
|
|||
}
|
||||
# Extend tree with closed folders in current folder
|
||||
$sth = WebGUI::SQL->read("select collateralFolderId, name, description from collateralFolder
|
||||
where parentId=".quote($folderId)." and collateralFolderId<>0 order by name");
|
||||
where parentId=".quote($folderId)." and collateralFolderId <> '0' order by name");
|
||||
while ($data = $sth->hashRef) {
|
||||
my ($itemsInFolder) = WebGUI::SQL->quickArray("select count(*) from collateral where
|
||||
collateralFolderId = ".quote($data->{collateralFolderId}));
|
||||
|
|
|
|||
|
|
@ -543,17 +543,17 @@ sub www_editPageSave {
|
|||
if ($session{form}{pageId} eq "new") {
|
||||
$pageId = $session{form}{parentId};
|
||||
} else {
|
||||
$page = WebGUI::Page->getPage($session{form}{pageId});
|
||||
$pageId = $session{form}{pageId};
|
||||
}
|
||||
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Page::canEdit($pageId));
|
||||
|
||||
if ($session{form}{pageId} eq "new") {
|
||||
$currentPage = WebGUI::Page->getPage($pageId);
|
||||
$currentPage = WebGUI::Page->getPage($session{form}{parentId});
|
||||
$page = $currentPage->add;
|
||||
$page->set({parentId=>$session{form}{parentId}});
|
||||
} else {
|
||||
$page = WebGUI::Page->getPage($session{form}{pageId});
|
||||
}
|
||||
|
||||
$session{form}{title} = "no title" if ($session{form}{title} eq "");
|
||||
$session{form}{menuTitle} = $session{form}{title} if ($session{form}{menuTitle} eq "");
|
||||
my $url = $session{form}{urlizedTitle};
|
||||
|
|
|
|||
|
|
@ -212,7 +212,6 @@ sub www_view {
|
|||
$input_name =~ s/^HttpProxy_//;
|
||||
|
||||
my $uploadFile = $session{cgi}->tmpFileName($session{form}{'HttpProxy_'.$input_name});
|
||||
|
||||
if(-r $uploadFile) { # Found uploaded file
|
||||
@formUpload=($uploadFile, qq/$session{form}{'HttpProxy_'.$input_name}/);
|
||||
$formdata{$input_name}=\@formUpload;
|
||||
|
|
|
|||
|
|
@ -431,10 +431,17 @@ sub uiLevel {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteAnswer {
|
||||
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
|
||||
return $_[0]->confirm(WebGUI::International::get(45,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteAnswerConfirm&wid='.$_[0]->get("wobjectId").'&aid='
|
||||
.$session{form}{aid}.'&qid='.$session{form}{qid}));
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->canEdit);
|
||||
my ($answerCount) = WebGUI::SQL->quickArray("select count(*) from Survey_answer where Survey_questionId=".quote($session{form}{qid}));
|
||||
if ($answerCount > 1) {
|
||||
return $self->confirm(
|
||||
$self->i18n(45),
|
||||
WebGUI::URL::page('func=deleteAnswerConfirm&wid='.$self->wid.'&aid='.$session{form}{aid}.'&qid='.$session{form}{qid})
|
||||
);
|
||||
} else {
|
||||
return $self->i18n("cannot delete the last answer");
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -130,8 +130,12 @@ Checking this box will enable responses to your article much like Articles on Sl
|
|||
Articles have the special ability to change their template so that you can allow users to see different views of the article. You do this by creating a link with a URL like this (replace 999 with the template Id you wish to use):<p>
|
||||
<a href="<tmpl_var new.template>999">Read more...</a>
|
||||
<p>
|
||||
<b>description</b><br>
|
||||
The paginated description.
|
||||
<p>
|
||||
|
||||
<b>description.full</b><br>
|
||||
The full description without any pagination. (For the paginated description use "description" instead.)
|
||||
The full description without any pagination.
|
||||
<p>
|
||||
|
||||
<b>description.first.100words</b><br>
|
||||
|
|
@ -204,11 +208,18 @@ The URL to the thumbnail for the attached image.
|
|||
The URL to the attached image.
|
||||
<p/>
|
||||
|
||||
<b>linkTitle</b><br/>
|
||||
The title of the link to display to the user.
|
||||
<p/>
|
||||
|
||||
<b>linkURL</b><br/>
|
||||
The URL for the link to display to the user.
|
||||
<p/>
|
||||
|
||||
<b>post.label</b><br/>
|
||||
The translated label to add a comment to this article.
|
||||
<p/>
|
||||
|
||||
|
||||
<b>post.URL</b><br/>
|
||||
The URL to add a comment to this article.
|
||||
<p/>
|
||||
|
|
@ -226,7 +237,7 @@ The URL to view the replies to this article.
|
|||
<p/>
|
||||
|
||||
|,
|
||||
lastUpdated => 1082370724
|
||||
lastUpdated => 1095829149
|
||||
},
|
||||
|
||||
'24' => {
|
||||
|
|
|
|||
|
|
@ -705,6 +705,12 @@ If you leave this set at its default, then you will add a question directly afte
|
|||
lastUpdated => 1033944535
|
||||
},
|
||||
|
||||
'cannot delete the last answer' => {
|
||||
message=>q|You cannot delete the last answer from a question. Every question must have at least one answer.|,
|
||||
lastUpdated=>1083944535,
|
||||
context=>q|This message is displayed when a user is trying to delete the last answer from a survey question.|
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -3412,9 +3412,10 @@ be http://www.mysite.com/thisPage#94
|
|||
|
||||
'826' => {
|
||||
message => q|WebGUI has a powerful templating language built to give you maximum control over the layout of your content. The following is a list of the template language syntax.
|
||||
|
||||
<p/><b>NOTES:</b><br/>
|
||||
Both the template language and template variables are case-insensitive.
|
||||
<p/>
|
||||
<b>NOTE:</b> Please note that the words <i>foo</i> and <i>bar</i> are used below as placeholders for the actual variable names that you'll use. They are not part of the template language.
|
||||
Please note that the words <i>foo</i> and <i>bar</i> are used below as placeholders for the actual variable names that you'll use. They are not part of the template language.
|
||||
|
||||
<p/>
|
||||
<b>Variables</b><br/>
|
||||
|
|
@ -3481,9 +3482,8 @@ Loops come with special condition variables of their own. They are __FIRST__, __
|
|||
</TMPL_LOOP>
|
||||
</pre>
|
||||
|
||||
<p/>
|
||||
<b>NOTE:</b>Both the template language and template variables are case-insensitive.|,
|
||||
lastUpdated => 1038865669
|
||||
<p/>|,
|
||||
lastUpdated =>1095829149
|
||||
},
|
||||
|
||||
'354' => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue