bugs fixed

This commit is contained in:
JT Smith 2004-09-24 22:31:45 +00:00
parent e6818b58fc
commit 5f33a4a15d
11 changed files with 55 additions and 34 deletions

View file

@ -13,6 +13,13 @@
- Fixed a problem with the new export mechanism where it would just stop and
not report an error if it ran into a problem with creating folders and
files.
- bugfix [ 1033998 ] ^RootTitle does not work
- bugfix [ 1031987 ] no upgrade script in 6.2.4
- bugfix [ 1030998 ] HTML Collateral Manager Issues (Harlan Barnes)
- Updated some of the template help. (Colin Kuskie)
- bugfix [ 1023800 ] USS - Read more
- bugfix [ 1033204 ] parentId empty when creating new root
- bugfix [ 998252 ] No Answers in Survey Causes Endless Loop
6.2.4

View file

@ -1,5 +1,6 @@
insert into webguiVersion values ('6.2.5','upgrade',unix_timestamp());
-- Fix HTMLArea 3 template bug / Len Kranendonk 20040924
update template set template='^JavaScript(\"<tmpl_var session.config.extrasURL>/textFix.js\");\r\n<tmpl_if htmlArea3.supported> \r\n\r\n^RawHeadTags(\r\n <script type=\'text/javascript\'> \r\n _editor_url = \'<tmpl_var session.config.extrasURL>/htmlArea3/\'; \r\n _editor_lang = \'en\'; \r\n </script>\r\n\r\n <script type=\'text/javascript\' src=\'<tmpl_var session.config.extrasURL>/htmlArea3/htmlarea.js\'> \r\n </script>\r\n\r\n <script language=\'JavaScript\'> \r\n HTMLArea.loadPlugin(\'TableOperations\'); \r\n </script>\r\n);\r\n\r\n<script language=\"JavaScript\"> \r\nfunction initEditor() { \r\n editor = new HTMLArea(\"<tmpl_var form.name>\"); \r\n editor.registerPlugin(TableOperations); \r\n\r\n setTimeout(function() { \r\n editor.generate(); \r\n }, 500); \r\n return false; \r\n} \r\nwindow.setTimeout(\"initEditor()\", 250); \r\n</script> \r\n\r\n</tmpl_if> \r\n\r\n<tmpl_var textarea> ' where templateId=6 and namespace='richEditor';
update page set parentId=0 where parentId is null;
update page set parentId=0 where parentId='';

View file

@ -37,7 +37,7 @@ sub _generatePage {
pageId, pageTitle, wobjectId, wobjectFunction) values (".time().",".$session{user}{userId}
.",".quote($session{user}{username}).",
".quote($session{env}{REMOTE_ADDR}).", ".quote($session{env}{HTTP_USER_AGENT}).",
".quote($session{env}{HTTP_REFERER}).", ".$session{page}{pageId}.",
".quote($session{env}{HTTP_REFERER}).", ".quote($session{page}{pageId}).",
".quote($session{page}{title}).", ".quote($session{form}{wid}).", ".quote($session{form}{func}).")");
}
my $output = WebGUI::Style::process($content);

View file

@ -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");
}

View file

@ -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}));

View file

@ -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};

View file

@ -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;

View file

@ -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");
}
}
#-------------------------------------------------------------------

View file

@ -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>
&lt;a href="&lt;tmpl_var new.template&gt;999"&gt;Read more...&lt;/a&gt;
<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' => {

View file

@ -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;

View file

@ -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__, __
&lt;/TMPL_LOOP&gt;
</pre>
<p/>
<b>NOTE:</b>Both the template language and template variables are case-insensitive.|,
lastUpdated => 1038865669
<p/>|,
lastUpdated =>1095829149
},
'354' => {