From d9c2c3bcf735af8d0df9561cbd24ddbaddedd4b6 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 25 Nov 2002 22:32:57 +0000 Subject: [PATCH] Fixing inconsistencies. --- docs/gotcha.txt | 16 ++++++++++++++++ docs/upgrades/upgrade_4.8.0-4.9.0.sql | 6 ++++++ lib/WebGUI/Wobject/Article.pm | 7 ++++--- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 3240e70ec..178e3e5c1 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,22 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. +4.9.0 +-------------------------------------------------------------------- + * If you created any templates using the previous two beta versions + (4.7.0 or 4.8.0) then you'll need to tweak your templates as + the template language has changed slightly for greater + flexibility. + + +4.8.0 +-------------------------------------------------------------------- + * If you are an administrator, but your userId is not 3 you will + notice that all the forms in WebGUI are shortened + considerably. This is due to the new UI Levels. If you wish + see all the form elements then use the user manager to edit + your user profile and set your UI Level to 9. + 4.7.0 -------------------------------------------------------------------- * WebGUI::HTMLForm->radioList has been changed to correct an API diff --git a/docs/upgrades/upgrade_4.8.0-4.9.0.sql b/docs/upgrades/upgrade_4.8.0-4.9.0.sql index 35aca1b7b..1e395e91c 100644 --- a/docs/upgrades/upgrade_4.8.0-4.9.0.sql +++ b/docs/upgrades/upgrade_4.8.0-4.9.0.sql @@ -930,6 +930,12 @@ update FileManager set templateId=2 where displayThumbnails=1; alter table FileManager drop column displayThumbnails; INSERT INTO template VALUES (1,'Default File Manager','\r\n

\r\n
\r\n\r\n\r\n

\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n
\r\n \">\r\n \r\n · \">\r\n \r\n
\">\">\">
\r\n \r\n \r\n \r\n \">\r\n  · \r\n \">\" border=\"0\" width=\"16\" height=\"16\" align=\"middle\" />/\r\n \r\n  · \r\n \">\" border=0 width=\"16\" height=\"16\" align=\"middle\" />/\r\n \r\n \r\n  · \r\n \">\" border=\"0\" width=\"16\" height=\"16\" align=\"middle\" />/\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n

\r\n · · \r\n
\r\n
','FileManager'); INSERT INTO template VALUES (2,'List with Thumbnails','\r\n

\r\n
\r\n\r\n\r\n

\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n
\r\n \">\r\n \r\n · \">\r\n \r\n
\">\">\">
\r\n \r\n \r\n \r\n \">\r\n  · \r\n \">\" border=\"0\" width=\"16\" height=\"16\" align=\"middle\" />/\r\n \r\n  · \r\n \">\" border=0 width=\"16\" height=\"16\" align=\"middle\" />/\r\n \r\n \r\n  · \r\n \">\" border=\"0\" width=\"16\" height=\"16\" align=\"middle\" />/\r\n \r\n \r\n \r\n \" border=0 align=\"middle\" hspace=\"3\">\r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n

\r\n · · \r\n
\r\n
','FileManager'); +delete from template where templateId<5 and namespace='Article'; +INSERT INTO template VALUES (1,'Default Article','\r\n

\r\n
\r\n\r\n\r\n
\r\n \" align=\"right\" border=\"0\">\r\n\r\n\r\n\r\n

\r\n\r\n\r\n\r\n \r\n

\">\r\n \r\n\r\n\r\n\r\n\r\n\r\n

\r\n
\r\n\r\n\r\n

\r\n \r\n \r\n
\"> ()\">
\r\n\r\n','Article'); +INSERT INTO template VALUES (2,'Center Image','\r\n

\r\n
\r\n\r\n\r\n
\" border=\"0\">
\r\n
\r\n\r\n\r\n

\r\n\r\n\r\n\r\n \r\n

\">\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n

\r\n \r\n \r\n
\"> ()\">
\r\n\r\n','Article'); +INSERT INTO template VALUES (3,'Left Align Image','\r\n

\r\n
\r\n\r\n\r\n
\r\n \" align=\"left\" border=\"0\">\r\n\r\n\r\n\r\n

\r\n\r\n\r\n\r\n \r\n

\">\r\n \r\n\r\n\r\n\r\n\r\n\r\n

\r\n
\r\n\r\n\r\n

\r\n \r\n \r\n
\"> ()\">
\r\n\r\n','Article'); +INSERT INTO template VALUES (4,'Linked Image with Caption','\r\n

\r\n
\r\n\r\n\r\n
\r\n
\r\n \r\n \">\r\n \" border=\"0\">\r\n
\r\n \r\n \" border=\"0\">\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n

\r\n\r\n\r\n\r\n\r\n\r\n\r\n

\r\n
\r\n\r\n\r\n

\r\n \r\n \r\n
\"> ()\">
\r\n\r\n','Article'); + diff --git a/lib/WebGUI/Wobject/Article.pm b/lib/WebGUI/Wobject/Article.pm index 05aa74e8a..ed470f1de 100644 --- a/lib/WebGUI/Wobject/Article.pm +++ b/lib/WebGUI/Wobject/Article.pm @@ -144,8 +144,8 @@ sub www_view { my ($file, %var); if ($_[0]->get("image") ne "") { $file = WebGUI::Attachment->new($_[0]->get("image"),$_[0]->get("wobjectId")); - $var{image} = $file->getURL; - $var{thumbnail} = $file->getThumbnail; + $var{"image.url"} = $file->getURL; + $var{"image.thumbnail"} = $file->getThumbnail; } $var{description} = $_[0]->description; if ($_[0]->get("convertCarriageReturns")) { @@ -156,13 +156,14 @@ sub www_view { $var{"attachment.box"} = $file->box; $var{"attachment.icon"} = $file->getIcon; $var{"attachment.url"} = $file->getURL; + $var{"attachment.name"} = $file->getFilename; } ($var{"replies.count"}) = WebGUI::SQL->quickArray("select count(*) from discussion where wobjectId=".$_[0]->get("wobjectId")); $var{"replies.URL"} = WebGUI::URL::page('func=showMessage&wid='.$_[0]->get("wobjectId")); $var{"replies.label"} = WebGUI::International::get(28,$namespace); $var{"post.URL"} = WebGUI::URL::page('func=post&mid=new&wid='.$_[0]->get("wobjectId")); $var{"post.label"} = WebGUI::International::get(24,$namespace); - return $_[0]->processMacros($_[0]->displayTitle.$_[0]->processTemplate($_[0]->get("templateId"),\%var)); + return $_[0]->processMacros($_[0]->processTemplate($_[0]->get("templateId"),\%var)); } 1;