bug fixes
This commit is contained in:
parent
d61701698c
commit
29a5edc3c6
7 changed files with 34 additions and 39 deletions
|
|
@ -94,6 +94,7 @@
|
|||
- upgrade.pl now deletes temporary files and template cache.
|
||||
- Fixed a bug in the HTMLArea image manager that would not allow users to
|
||||
upload files if the gateway script was not at /index.pl
|
||||
- Fixed a bug where trashed pages were still showing up in page tree.
|
||||
|
||||
|
||||
6.1.1
|
||||
|
|
|
|||
|
|
@ -793,7 +793,6 @@ CREATE TABLE USS_submission (
|
|||
|
||||
|
||||
INSERT INTO USS_submission VALUES (1,'Talk to the Experts',1076705448,'Admin',3,'<img src=\"^Extras;styles/webgui6/img_talk_to_experts.gif\" align=\"right\" style=\"padding-left: 15px;\" /> Our website contains all of the different methods for reaching us. Our friendly staff will be happy to assist you in any way possible.\r\n\r\n',NULL,NULL,'Approved',0,1004,1076706084,0,1000,'html','http://www.plainblack.com/contact_us','0',NULL,NULL,NULL);
|
||||
INSERT INTO USS_submission VALUES (2,'Request an Interactive Demonstration CD',1076705448,'Admin',3,'<img src=\"^Extras;styles/webgui6/img_cd.gif\" align=\"right\" style=\"padding-left: 15px;\" />This CD shows all of the excellent features that WebGUI provides and gives you a brief overview of the product. It also provides examples of how the product works and how it can be used in your environment.',NULL,NULL,'Approved',0,1005,1076706084,0,1000,'html','http://www.plainblack.com/presentation_cd','0',NULL,NULL,NULL);
|
||||
INSERT INTO USS_submission VALUES (3,'Get the Manual',1076705448,'Admin',3,'<img src=\"^Extras;styles/webgui6/img_manual.gif\" align=\"right\" style=\"padding-left: 15px;\" />Ruling WebGUI is the definitive guide to everything WebGUI related. It has been compiled by the experts at Plain Black Software and covers almost all aspects of WebGUI. When you purchase Ruling WebGUI, you will receive updates to this great manual for one full year.',NULL,NULL,'Approved',0,1006,1076706084,0,1000,'html','http://www.plainblack.com/ruling_webgui','0',NULL,NULL,NULL);
|
||||
INSERT INTO USS_submission VALUES (4,'Purchase Technical Support',1076705448,'Admin',3,'<img src=\"^Extras;styles/webgui6/img_tech_support.gif\" align=\"right\" style=\"padding-left: 15px;\" />The WebGUI Support Center is there to help you when you get stuck. With a system as large as WebGUI, you\'ll likely have some questions, and our courteous and knowlegable staff is available to answer those questions. And best of all, you get Ruling WebGUI free when you sign up for the Support Center.\r\n\r\n',NULL,NULL,'Approved',0,1007,1076706084,0,1000,'html','http://www.plainblack.com/support_programs','0',NULL,NULL,NULL);
|
||||
INSERT INTO USS_submission VALUES (5,'Sign Up for Hosting',1076705448,'Admin',3,'<img src=\"^Extras;styles/webgui6/img_hosting.gif\" align=\"right\" style=\"padding-left: 15px;\" />We provide professional hosting services for you so you don\'t have to go through the trouble of finding a hoster who likely won\'t know what to do with WebGUI anyway.',NULL,NULL,'Approved',0,1008,1076706084,0,1000,'html','http://www.plainblack.com/hosting','0',NULL,NULL,NULL);
|
||||
|
|
@ -988,7 +987,6 @@ INSERT INTO forum VALUES (1001,1,'javascript',0,7,3600,0,4,0,1,1,0,0,0,0,0,0,1,1
|
|||
INSERT INTO forum VALUES (1002,1,'javascript',0,2,3600,0,4,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,31536000,30,NULL,7);
|
||||
INSERT INTO forum VALUES (1003,1,'javascript',0,7,3600,0,4,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,31536000,30,NULL,7);
|
||||
INSERT INTO forum VALUES (1004,1,'javascript',0,2,3600,0,4,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,31536000,30,NULL,7);
|
||||
INSERT INTO forum VALUES (1005,1,'javascript',0,2,3600,0,4,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,31536000,30,NULL,7);
|
||||
INSERT INTO forum VALUES (1006,1,'javascript',0,2,3600,0,4,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,31536000,30,NULL,7);
|
||||
INSERT INTO forum VALUES (1007,1,'javascript',0,2,3600,0,4,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,31536000,30,NULL,7);
|
||||
INSERT INTO forum VALUES (1008,1,'javascript',0,2,3600,0,4,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,31536000,30,NULL,7);
|
||||
|
|
|
|||
|
|
@ -293,4 +293,5 @@ INSERT INTO template (templateId, name, template, namespace, isEditable, showInF
|
|||
INSERT INTO template (templateId, name, template, namespace, isEditable, showInForms) VALUES ('6','HTMLArea 3 (Mozilla / IE)','^JavaScript(\"<tmpl_var session.config.extrasURL>/textFix.js\");\r\n<tmpl_if htmlArea3.supported> \r\n^RawHeadTags(\"\n<script type=\'text/javascript\'> \n _editor_url = \'<tmpl_var session.config.extrasURL>/htmlArea3/\'; \n _editor_lang = \'en\'; \n</script> \n\");\r\n^JavaScript(\"<tmpl_var session.config.extrasURL>/htmlArea3/htmlarea.js\"); \r\n^RawHeadTags(\"\n<script language=\'JavaScript\'> \r\n HTMLArea.loadPlugin(\'TableOperations\'); \r\n</script>\n\");\n<script language=\"JavaScript\"> \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</tmpl_if> \r\n\r\n<tmpl_var textarea> ','richEditor',1,1);
|
||||
INSERT INTO template (templateId, name, template, namespace, isEditable, showInForms) VALUES ('5','lastResort','^JavaScript(\"<tmpl_var session.config.extrasURL>/textFix.js\");\r\n\r\n<script language=\"JavaScript\">\r\n var formObj;\r\n var extrasDir=\"<tmpl_var session.config.extrasURL>\";\r\n function openEditWindow(obj) {\r\n formObj = obj;\r\n window.open(\"<tmpl_var session.config.extrasURL>/lastResortEdit.html\",\"editWindow\",\"width=500,height=410\");\r\n }\r\n function setContent(content) {\r\n formObj.value = content;\r\n } \r\n</script>\r\n\r\n<tmpl_var button>\r\n\r\n<tmpl_var textarea>','richEditor',1,1);
|
||||
INSERT INTO template (templateId, name, template, namespace, isEditable, showInForms) VALUES ('1','HTMLArea','^JavaScript(\"<tmpl_var session.config.extrasURL>/textFix.js\");\r\n<tmpl_if htmlArea.supported>\r\n <tmpl_if popup>\r\n <script language=\"JavaScript\">\r\n var formObj;\r\n var extrasDir=\"<tmpl_var session.config.extrasURL>\";\r\n function openEditWindow(obj) {\r\n formObj = obj;\r\n window.open(\"<tmpl_var session.config.extrasURL>/htmlArea/editor.html\",\"editWindow\",\"width=490,height=400,resizable=1\");\r\n }\r\n function setContent(content) {\r\n formObj.value = content;\r\n }\r\n </script>\r\n <tmpl_else>\r\n ^JavaScript(\"<tmpl_var session.config.extrasURL>/htmlArea/editor.js\");\r\n <script>\r\n var master = window;\n _editor_url = \"<tmpl_var session.config.extrasURL>/htmlArea/\";\r\n </script> \r\n </tmpl_if>\r\n</tmpl_if>\r\n\r\n<tmpl_var textarea>\r\n\r\n<tmpl_if htmlArea.supported>\r\n <script language=\"Javascript1.2\">\r\n editor_generate(\"<tmpl_var form.name>\");\r\n </script>\r\n</tmpl_if>\r\n','richEditor',1,1);
|
||||
|
||||
alter table page add column isSystem int not null default 0;
|
||||
update page set isSystem=1 where pageId in (4,3,2,5,0);
|
||||
|
|
|
|||
|
|
@ -258,8 +258,7 @@ sub build {
|
|||
$pageData->{"page.relDepth"} = $pageData->{"page.absDepth"} - $startPageDepth;
|
||||
$pageData->{"page.isCurrent"} = ($page->{'pageId'} == $session{page}{pageId});
|
||||
$pageData->{"page.isHidden"} = $page->{'hideFromNavigation'};
|
||||
$pageData->{"page.isSystem"} = ($page->{'pageId'} =~ /^\d+$/ &&
|
||||
($page->{'pageId'} < 1000 && $page->{'pageId'} >= 0));
|
||||
$pageData->{"page.isSystem"} = $page->{isSystem};
|
||||
|
||||
# indent
|
||||
my $indent = 0;
|
||||
|
|
@ -287,7 +286,7 @@ sub build {
|
|||
next if ($pageData->{"page.absDepth"} < $self->{_stopAtLevel});
|
||||
|
||||
# Check showSystemPages
|
||||
next if (! $self->{_showSystemPages} && $pageData->{"page.isSystem"});
|
||||
# next if (! $self->{_showSystemPages} && $pageData->{"page.isSystem"});
|
||||
|
||||
# Deal with hidden pages, don't ever hide pages if admin mode is on
|
||||
next if(($page->{'hideFromNavigation'} && ! $self->{_showHiddenPages}) && (! $session{var}{adminOn}));
|
||||
|
|
@ -347,7 +346,7 @@ sub build {
|
|||
}
|
||||
|
||||
# We had a cache miss, so let's put the data in cache
|
||||
$cache->set(\@page_loop, 3600*24) unless $session{var}{adminOn};
|
||||
# $cache->set(\@page_loop, 3600*24) unless $session{var}{adminOn};
|
||||
} else {
|
||||
# We had a cache hit
|
||||
@page_loop = @{$cacheContent};
|
||||
|
|
|
|||
|
|
@ -193,41 +193,36 @@ The depth the tree should start with. Defaults to zero.
|
|||
|
||||
=cut
|
||||
sub _traversePageTree {
|
||||
my ($top, $initialDepth, %wobject, $output, $spacer, $page, $currentPage, $options, $currentPageId, $currentUrlizedTitle, $wobjects);
|
||||
($top, $initialDepth) = @_;
|
||||
my (%wobject, $output, $spacer, $page, $currentPage, $options, $currentPageId, $currentUrlizedTitle, $wobjects);
|
||||
my ($parentId, $initialDepth) = @_;
|
||||
|
||||
tie %wobject, 'Tie::CPHash';
|
||||
$spacer = '<img src="'.$session{config}{extrasURL}.'/spacer.gif" width=12>';
|
||||
$page = WebGUI::Page->getPage($top);
|
||||
|
||||
$page->traversePreOrder(
|
||||
sub {
|
||||
($currentPage, $options) = @_;
|
||||
$currentPageId = $currentPage->get('pageId');
|
||||
$currentUrlizedTitle = $currentPage->get('urlizedTitle');
|
||||
if ($currentPageId < 2 || $currentPageId > 999) {
|
||||
$output .= $spacer x $options->{_depth}
|
||||
.pageIcon()
|
||||
.deleteIcon('op=deletePage',$currentUrlizedTitle)
|
||||
.moveLeftIcon(sprintf('op=moveTreePageLeft&pageId=%s',$currentPageId), $currentUrlizedTitle)
|
||||
.moveUpIcon(sprintf('op=moveTreePageUp&pageId=%s',$currentPageId), $currentUrlizedTitle)
|
||||
.moveDownIcon(sprintf('op=moveTreePageDown&pageId=%s',$currentPageId), $currentUrlizedTitle)
|
||||
.moveRightIcon(sprintf('op=moveTreePageRight&pageId=%s',$currentPageId), $currentUrlizedTitle)
|
||||
.editIcon('op=editPage', $currentUrlizedTitle)
|
||||
.' <a href="'.WebGUI::URL::gateway($currentUrlizedTitle).'">'.$currentPage->get('title').'</a><br>';
|
||||
$wobjects = WebGUI::SQL->read("select * from wobject where pageId=".quote($currentPageId));
|
||||
while (%wobject = $wobjects->hash) {
|
||||
$output .= $spacer x $options->{_depth} . $spacer
|
||||
.wobjectIcon()
|
||||
.deleteIcon('func=delete&wid='.$wobject{wobjectId},$currentUrlizedTitle)
|
||||
.editIcon('func=edit&wid='.$wobject{wobjectId},$currentUrlizedTitle)
|
||||
.' '. $wobject{title}.'<br>';
|
||||
}
|
||||
$wobjects->finish;
|
||||
my $sth = WebGUI::SQL->read("select pageId,isSystem,urlizedTitle,title from page where parentId=".$parentId);
|
||||
while (my ($pageId,$isSystem,$url,$title) = $sth->array) {
|
||||
unless ($isSystem) {
|
||||
$output .= $spacer x $options->{_depth}
|
||||
.pageIcon()
|
||||
.deleteIcon('op=deletePage',$url)
|
||||
.moveLeftIcon(sprintf('op=moveTreePageLeft&pageId=%s',$pageId), $url)
|
||||
.moveUpIcon(sprintf('op=moveTreePageUp&pageId=%s',$pageId), $url)
|
||||
.moveDownIcon(sprintf('op=moveTreePageDown&pageId=%s',$pageId), $url)
|
||||
.moveRightIcon(sprintf('op=moveTreePageRight&pageId=%s',$pageId), $url)
|
||||
.editIcon('op=editPage', $url)
|
||||
.' <a href="'.WebGUI::URL::gateway($url).'">'.$title.'</a><br>';
|
||||
$wobjects = WebGUI::SQL->read("select wobjectId,title from wobject where pageId=".quote($pageId));
|
||||
while (%wobject = $wobjects->hash) {
|
||||
$output .= $spacer x $options->{_depth} . $spacer
|
||||
.wobjectIcon()
|
||||
.deleteIcon('func=delete&wid='.$wobject{wobjectId},$url)
|
||||
.editIcon('func=edit&wid='.$wobject{wobjectId},$url)
|
||||
.' '. $wobject{title}.'<br>';
|
||||
}
|
||||
$wobjects->finish;
|
||||
$output .= _traversePageTree($pageId,$initialDepth+1);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
$sth->finish;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,12 +90,12 @@ Some OO style methods
|
|||
|
||||
@array = $page->ancestors;
|
||||
@array = $page->daughters;
|
||||
@array = $page->decendants;
|
||||
@array = $page->descendants;
|
||||
@array = $page->generation;
|
||||
@array = $page->leaves_under;
|
||||
@array = $page->pedigree;
|
||||
@array = $page->self_and_ancesters;
|
||||
@array = $page->self_and_decendants;
|
||||
@array = $page->self_and_descendants;
|
||||
@array = $page->self_and_sisters;
|
||||
@array = $page->self_and_sisters_splitted;
|
||||
@array = $page->sisters;
|
||||
|
|
|
|||
|
|
@ -632,6 +632,7 @@ sub www_editSubmissionSave {
|
|||
delete $pageVars{parentId};
|
||||
delete $pageVars{sequenceNumber};
|
||||
$pageVars{hideFromNavigation} = 1;
|
||||
$pageVars{isSystem} = 1;
|
||||
$pageVars{subroutine} = "viewSubmissionAsPage";
|
||||
$pageVars{subroutinePackage} = "WebGUI::Wobject::USS";
|
||||
$pageVars{subroutineParams} = "{wobjectId=>'".$_[0]->wid."',submissionId=>'".$session{form}{sid}."'}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue