diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 1a6db209f..498ba677f 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -13,6 +13,67 @@ - WebGUI Operations are now dynamically loaded (Len Kranendonk) - Added button to Form.pm / HTMLForm.pm (Len Kranendonk) - Added a "Cancel" button to each tab form (Len Kranendonk) + - bugfix [ 1040341 ] Opera balks on HTMLArea TypeError + - bugfix [ 1037364 ] HTMLArea3 breaks ^i macro + - bugfix [ 889424 ] htmlArea td background image in expanded mode + - bugfix [ 991070 ] 5.5.4 Editor(s) replacing ^ symbol + - bugfix [ 1022287 ] WYSIWYG-Editor Add new web link + - bugfix [ 1055153 ] Turn Admin ON with SSL and IE. + + +6.2.8 + - bugfix [ 1056335 ] Cool Menus navigation template seems broken + - bugfix [ 1041937 ] List Roots broken + - bugfix [ 1053187 ] eq/ne suggestions 6.2.7 + - bugfix [ 1053003 ] theWg e-egg has a bug + - bugfix [ 1044316 ] 6.2.7 (and earlier?) Navigation change-suggestion + - bugfix [ 1052133 ] Databaselinks are not recognized (dapperdodo) + - bugfix [ 1046683 ] SQLReport doesn't query selected Data Source + - bugfix [ 1050133 ] broken link in 6.2.7 create.sql + - bugfix [ 1048421 ] TestEnvironment.pl - OS check + - bugfix [ 1044174 ] Site map wobject (Vadim Platonov) + - bugfix [ 1042680 ] collateralImport.pl --folderId + - bugfix [ 1050472 ] A CAUSE OF MANY BUGS (numeric comparisons against Ids) + - bugfix [ 1047947 ] collateralimport.pl + - bugfix [ 1040025 ] More HashId crashes (Paul Malabad) + - bugfix [ 1050282 ] no documentation for "wobject privileges" under add/edit + page + - bugfix [ 1055396 ] Template switching issue + - bugfix [ 1056122 ] 'bthis' is undefined + - bugfix [ 1044151 ] Adding new layout template causes JS error + - bugfix [ 1039765 ] Edit Page > Layout > Page Template + - bugfix [ 1053736 ] USS FAQ questions not updating + - bugfix [ 1043679 ] USS summary not updated on edit + - bugfix [ 1048484 ] USS ignores "URL Extension" content setting + - bugfix [ 1054364 ] Deleted event still visible + - bugfix [ 1052863 ] Empty Trash + - bugfix [ 1042682 ] op=emptyCollateralFolder + - bugfix [ 1056118 ] 2 File Managers on a page produces confusing results. + - Added missing POD in WebGUI::HTTP synopsis. + - The page URLs are back to being generated as relative (from the document + root) URLs once again. This means that you no longer have to specify all + your potential site URLs in your WebGUI config file. + - bugfix [ 1052613 ] sitename only first works + - bugfix [ 1041068 ] Wrong side menu after deleting a template + - bugfix [ 1043283 ] Prevent Proxy Caching breaks query string in URLs + (6.2.7) + - bugfix [ 1048167 ] grouping expiration notifications may not be working + - Fixed a bug in the search properties where pages that weren't roots were + showing up as roots to be searched. + - bugfix [ 1055589 ] "Default search" results show "Nameless root" in bread + crumb + - bugfix [ 1047157 ] Search wobject returns Profile content excerpts to + Visitor + - bugfix [ 1048166 ] privileged forums displayed in search + - bugfix [ 1040350 ] Calendar with Start and End Month = Current doesn't show + cal (Gerald Young) + - bugfix [ 1048955 ] all events in calendar moved ahead 1 day + - bugfix [ 1043234 ] EventCalendar Current Day Incorrect 6.2.7 + - Added error handling to USS purge to deal with submissions without pages. + - bugfix [ 1037138 ] empty trash not working, Trash.pm + - bugfix [ 1053498 ] 6.2.7 gamma + - The forum post archive function is now 2700% faster. + 6.2.7 - Expanded upon the help for URL extensions. @@ -44,8 +105,8 @@ - Added a performance cache to the USS. Our testing indicates most USS' will see more than 900% increase in performance. - Added a performance cache to the Events Calendar. Our testing indicates - that most Events Calendars will see more than 33000% increase in - performance. No that's not a typo. + that most Events Calendars will see more than 3300% increase in + performance. - bugfix [ 1035901 ] Comparision logic based on int ids - bugfix [ 1035891 ] DBMS reserved keyword in webgui wsclient table - bugfix [ 1035055 ] Forum Karma diff --git a/docs/create.sql b/docs/create.sql index 4fcccd48b..4ba3e99d7 100644 --- a/docs/create.sql +++ b/docs/create.sql @@ -1923,9 +1923,9 @@ CREATE TABLE USS_submission ( INSERT INTO USS_submission VALUES ('1','Talk to the Experts',1076705448,'Admin','3',' 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,946710000,2114406000,'NOHx0iiGFZq8GBx8pCoPkw'); -INSERT INTO USS_submission VALUES ('3','Get the Manual',1076705448,'Admin','3','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,946710000,2114406000,'cFlWrGVwXV7eJ0Zvcd8p3w'); -INSERT INTO USS_submission VALUES ('4','Purchase Technical Support',1076705448,'Admin','3','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,946710000,2114406000,'0r2GNyJ5HImgY8xx_tQBZQ'); -INSERT INTO USS_submission VALUES ('5','Sign Up for Hosting',1076705448,'Admin','3','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,946710000,2114406000,'uGRHud5vVtKFT1ciQ2OGIg'); +INSERT INTO USS_submission VALUES ('3','Get the Manual',1076705448,'Admin','3','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/store/rwg','0',NULL,NULL,NULL,946710000,2114406000,'cFlWrGVwXV7eJ0Zvcd8p3w'); +INSERT INTO USS_submission VALUES ('4','Purchase Technical Support',1076705448,'Admin','3','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/store/support','0',NULL,NULL,NULL,946710000,2114406000,'0r2GNyJ5HImgY8xx_tQBZQ'); +INSERT INTO USS_submission VALUES ('5','Sign Up for Hosting',1076705448,'Admin','3','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/store/hosting','0',NULL,NULL,NULL,946710000,2114406000,'uGRHud5vVtKFT1ciQ2OGIg'); INSERT INTO USS_submission VALUES ('6','Look Great',1076705448,'Admin','3','Let Plain Black\'s design team build you a professional looking design. Our award-winning designers can get you the look you need on time and on budget, every time.',NULL,NULL,'Approved',0,'1009',1076706084,0,'1000','html','http://www.plainblack.com/design','0',NULL,NULL,NULL,946710000,2114406000,'gvLbaIffuze4HhKFtiCmsw'); -- @@ -3093,7 +3093,7 @@ CREATE TABLE webguiVersion ( -- -INSERT INTO webguiVersion VALUES ('6.2.7','initial install',unix_timestamp()); +INSERT INTO webguiVersion VALUES ('6.2.8','initial install',unix_timestamp()); -- -- Table structure for table `wobject` @@ -3137,11 +3137,22 @@ CREATE TABLE wobject ( INSERT INTO wobject VALUES ('-1','4','SiteMap',0,'Page Not Found',1,'The page you were looking for could not be found on this system. Perhaps it has been deleted or renamed. The following list is a site map of this site. If you don\'t find what you\'re looking for on the site map, you can always start from the Home Page.',1001744792,'3',1016077239,'3',1,1001744792,1336444487,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'2','3','3','7','1003'); -INSERT INTO wobject VALUES ('1','1','Article',1,'Welcome',1,'Welcome to WebGUI. This is web done right.\n

\nWebGUI is a user-friendly web site management system made by Plain Black. It is designed to be easy to use for the average business user, but powerful enough to satisfy the needs of a large enterprise.\n

\nThere are thousands of small and large businesses, schools, universities, governments, clubs, projects, communities, and individuals using WebGUI all over the world today. A brief list of some of them can be found here. There\'s no reason your site shouldn\'t be on that list.

',1076701903,'3',1076707751,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1005'); +INSERT INTO wobject VALUES ('1','1','Article',1,'Welcome',1,'Welcome to WebGUI. This is web done right.\n

\nWebGUI is a user-friendly web site management system made by Plain Black. It is designed to be easy to use for the average business user, but powerful enough to satisfy the needs of a large enterprise.\n

\nThere are thousands of small and large businesses, schools, universities, governments, clubs, projects, communities, and individuals using WebGUI all over the world today. A brief list of some of them can be found here. There\'s no reason your site shouldn\'t be on that list.

',1076701903,'3',1076707751,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1005'); INSERT INTO wobject VALUES ('2','1','Article',2,'Key Benefits',1,'\n\n\n
\n\n
Easy to Use
\n
If you can use a web browser, then you can manage a web site with WebGUI. WebGUI\'s unique WYSIWYG inline content editing interface ensures that you know where you are and what your content will look like while you\'re editing. In addition, you don\'t need to install and learn any complicated programs, you can edit everything with your trusty web browser.
\n
\n\n
Flexible Designs
\n
WebGUI\'s powerful templating system ensures that no two WebGUI sites ever need to look the same. You\'re not restricted in how your content is laid out or how your navigation functions.
\n
\n\n
Work Faster
\n
Though there is some pretty cool technology behind the scenes that makes WebGUI work, our first concern has always been usability and not technology. After all if it\'s not useful, why use it? With that in mind WebGUI has all kinds of wizards, short cuts, online help, and other aids to help you work faster.
\n
\n\n
Localized Content
\n
With WebGUI there\'s no need to limit yourself to one language or timezone. It\'s a snap to build a multi-lingual site with WebGUI. In fact, even WebGUI\'s built in functions and online help have been translated to more than 15 languages. User\'s can also adjust their local settings for dates, times, and other localized oddities.
\n
\n\n
Pluggable By Design
\n
When Plain Black created WebGUI we knew we wouldn\'t be able to think of everything you want to use WebGUI for, so we made most of WebGUI\'s functions pluggable. This allows you to add new features to WebGUI and still be able to upgrade the core system without a fuss.
\n\n
',1076702850,'3',1076707868,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1007'); -INSERT INTO wobject VALUES ('3','1000','Article',1,'Getting Started',0,'If you\'re reading this message it means that you\'ve got WebGUI up and running. Good job! The installation is not trivial.\n\n

\n \nIn order to do anything useful with your new installation you\'ll need to log in as the default administrator account. Follow these steps to get started:\n\n

\n\n

    \n
  1. Click here to log in. (username: Admin password: 123qwe)\n
  2. Click here to turn the administrative interface on.\n
\n
\nNOTE: You could have also done these steps using the block at the top of this page.\n
\n\n

\n\nNow that you\'re in as the administrator, you should change your password so no one else can log in and mess with your site. You might also want to create another account for yourself with Administrative privileges in case you can\'t log in with the Admin account for some reason.\n\n

\n \nYou\'ll now notice little buttons and menus on all the pages in your site. These controls help you administer your site. The \"Add content\" menu lets you add new content to your pages as well as paste content from the clipboard. The \"Administrative functions\" menu let\'s you control users and groups as well as many other admin settings. The little toolbars help you manipulate the content in your pages.\n\n\n

\n\nFor more information about how to administer WebGUI consider getting a copy of Ruling WebGUI. Plain Black Software also provides several Support Programs for WebGUI if you run into trouble.\n\n

\n \nEnjoy your new WebGUI site!',1076704456,'3',1076704456,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1009'); +INSERT INTO wobject VALUES ('3','1000','Article',1,'Getting Started',0,'If you\'re reading this message it means that you\'ve got WebGUI up and running. Good job! The installation is not trivial.\n\n

\n \nIn order to do anything useful with your new installation you\'ll need to log in as the default administrator account. Follow these steps to get started:\n\n

\n\n

    \n
  1. Click here to log in. (username: Admin password: 123qwe)\n
  2. Click here to turn the administrative interface on.\n
\n
\nNOTE: You could have also done these steps using the block at the top of this page.\n
\n\n

\n\nNow that you\'re in as the administrator, you should change your password so no one else can log in and mess with your site. You might also want to create another account for yourself with Administrative privileges in case you can\'t log in with the Admin account for some reason.\n\n

\n \nYou\'ll now notice little buttons and menus on all the pages in your site. These controls help you administer your site. The \"Add content\" menu lets you add new content to your pages as well as paste content from the clipboard. The \"Administrative functions\" menu let\'s you control users and groups as well as many other admin settings. The little toolbars help you manipulate the content in your pages.\n\n\n

\n\nFor more information about how to administer WebGUI consider getting a copy of Ruling WebGUI. Plain Black Software also provides several Support Programs for WebGUI if you run into trouble.\n\n

\n \nEnjoy your new WebGUI site!',1076704456,'3',1076704456,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1009'); INSERT INTO wobject VALUES ('5','1001','USS',2,'Your Next Step',0,' To learn more about WebGUI and how you can best implement WebGUI in your organization, please see the choices below.\n\n',1076705448,'3',1076706084,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1000','3','3','7',''); INSERT INTO wobject VALUES ('6','1002','SyndicatedContent',1,'The Latest News',0,'This is the latest news from Plain Black and WebGUI pulled directly from the site every hour.',1076708567,'3',1076709040,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1000','3','3','7',''); INSERT INTO wobject VALUES ('7','1003','DataForm',1,'Tell A Friend',0,'Tell a friend about WebGUI.',1076709292,'3',1076709522,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7',''); INSERT INTO wobject VALUES ('8','1004','SiteMap',0,'Site Map',0,'',1001744792,'3',1016077239,'3',1,1001744792,1336444487,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'2','3','3','7',''); +delete from template where templateId='7' and namespace='Navigation'; +INSERT INTO template VALUES ('7','Cool Menus','\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n^JavaScript(\"/coolmenus/coolmenus4.js\");\r\n','Navigation',1,1); +alter table SiteMap change startAtThisLevel startAtThisLevel varchar(22); +delete from template where templateId in (1,2) and namespace='Macro/L_loginBox'; +INSERT INTO template VALUES ('1','Default Login Box','

\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','Macro/L_loginBox',1,1); +INSERT INTO template VALUES ('2','Horizontal Login Box','
\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','Macro/L_loginBox',1,1); +alter table themeComponent change themeComponentId themeComponentId varchar(22); +alter table forumPost add index status_forumThreadId (status,forumThreadId); +alter table forumThread add index forumId_lastPostDate (forumId,lastPostDate); +alter table forumThread add index status_forumThreadId (status,forumThreadId); + diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 6361a8a5a..2740c237a 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,13 @@ 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. +6.2.8 +-------------------------------------------------------------------- + * Due to a bug in the theme system, if you created any themes in any + 6.2.x version prior to 6.2.8 they will need to be deleted and + recreated. Otherwise they will export a corrupt theme file. + + 6.2.2 -------------------------------------------------------------------- * If you used 6.1.1 for a while, and feel like there's something diff --git a/docs/previousVersion.sql b/docs/previousVersion.sql index 516b51d53..4ba3e99d7 100644 --- a/docs/previousVersion.sql +++ b/docs/previousVersion.sql @@ -1923,9 +1923,9 @@ CREATE TABLE USS_submission ( INSERT INTO USS_submission VALUES ('1','Talk to the Experts',1076705448,'Admin','3',' 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,946710000,2114406000,'NOHx0iiGFZq8GBx8pCoPkw'); -INSERT INTO USS_submission VALUES ('3','Get the Manual',1076705448,'Admin','3','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,946710000,2114406000,'cFlWrGVwXV7eJ0Zvcd8p3w'); -INSERT INTO USS_submission VALUES ('4','Purchase Technical Support',1076705448,'Admin','3','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,946710000,2114406000,'0r2GNyJ5HImgY8xx_tQBZQ'); -INSERT INTO USS_submission VALUES ('5','Sign Up for Hosting',1076705448,'Admin','3','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,946710000,2114406000,'uGRHud5vVtKFT1ciQ2OGIg'); +INSERT INTO USS_submission VALUES ('3','Get the Manual',1076705448,'Admin','3','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/store/rwg','0',NULL,NULL,NULL,946710000,2114406000,'cFlWrGVwXV7eJ0Zvcd8p3w'); +INSERT INTO USS_submission VALUES ('4','Purchase Technical Support',1076705448,'Admin','3','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/store/support','0',NULL,NULL,NULL,946710000,2114406000,'0r2GNyJ5HImgY8xx_tQBZQ'); +INSERT INTO USS_submission VALUES ('5','Sign Up for Hosting',1076705448,'Admin','3','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/store/hosting','0',NULL,NULL,NULL,946710000,2114406000,'uGRHud5vVtKFT1ciQ2OGIg'); INSERT INTO USS_submission VALUES ('6','Look Great',1076705448,'Admin','3','Let Plain Black\'s design team build you a professional looking design. Our award-winning designers can get you the look you need on time and on budget, every time.',NULL,NULL,'Approved',0,'1009',1076706084,0,'1000','html','http://www.plainblack.com/design','0',NULL,NULL,NULL,946710000,2114406000,'gvLbaIffuze4HhKFtiCmsw'); -- @@ -3093,7 +3093,7 @@ CREATE TABLE webguiVersion ( -- -INSERT INTO webguiVersion VALUES ('6.2.6','initial install',unix_timestamp()); +INSERT INTO webguiVersion VALUES ('6.2.8','initial install',unix_timestamp()); -- -- Table structure for table `wobject` @@ -3137,11 +3137,22 @@ CREATE TABLE wobject ( INSERT INTO wobject VALUES ('-1','4','SiteMap',0,'Page Not Found',1,'The page you were looking for could not be found on this system. Perhaps it has been deleted or renamed. The following list is a site map of this site. If you don\'t find what you\'re looking for on the site map, you can always start from the Home Page.',1001744792,'3',1016077239,'3',1,1001744792,1336444487,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'2','3','3','7','1003'); -INSERT INTO wobject VALUES ('1','1','Article',1,'Welcome',1,'Welcome to WebGUI. This is web done right.\n

\nWebGUI is a user-friendly web site management system made by Plain Black. It is designed to be easy to use for the average business user, but powerful enough to satisfy the needs of a large enterprise.\n

\nThere are thousands of small and large businesses, schools, universities, governments, clubs, projects, communities, and individuals using WebGUI all over the world today. A brief list of some of them can be found here. There\'s no reason your site shouldn\'t be on that list.

',1076701903,'3',1076707751,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1005'); +INSERT INTO wobject VALUES ('1','1','Article',1,'Welcome',1,'Welcome to WebGUI. This is web done right.\n

\nWebGUI is a user-friendly web site management system made by Plain Black. It is designed to be easy to use for the average business user, but powerful enough to satisfy the needs of a large enterprise.\n

\nThere are thousands of small and large businesses, schools, universities, governments, clubs, projects, communities, and individuals using WebGUI all over the world today. A brief list of some of them can be found here. There\'s no reason your site shouldn\'t be on that list.

',1076701903,'3',1076707751,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1005'); INSERT INTO wobject VALUES ('2','1','Article',2,'Key Benefits',1,'\n\n\n
\n\n
Easy to Use
\n
If you can use a web browser, then you can manage a web site with WebGUI. WebGUI\'s unique WYSIWYG inline content editing interface ensures that you know where you are and what your content will look like while you\'re editing. In addition, you don\'t need to install and learn any complicated programs, you can edit everything with your trusty web browser.
\n
\n\n
Flexible Designs
\n
WebGUI\'s powerful templating system ensures that no two WebGUI sites ever need to look the same. You\'re not restricted in how your content is laid out or how your navigation functions.
\n
\n\n
Work Faster
\n
Though there is some pretty cool technology behind the scenes that makes WebGUI work, our first concern has always been usability and not technology. After all if it\'s not useful, why use it? With that in mind WebGUI has all kinds of wizards, short cuts, online help, and other aids to help you work faster.
\n
\n\n
Localized Content
\n
With WebGUI there\'s no need to limit yourself to one language or timezone. It\'s a snap to build a multi-lingual site with WebGUI. In fact, even WebGUI\'s built in functions and online help have been translated to more than 15 languages. User\'s can also adjust their local settings for dates, times, and other localized oddities.
\n
\n\n
Pluggable By Design
\n
When Plain Black created WebGUI we knew we wouldn\'t be able to think of everything you want to use WebGUI for, so we made most of WebGUI\'s functions pluggable. This allows you to add new features to WebGUI and still be able to upgrade the core system without a fuss.
\n\n
',1076702850,'3',1076707868,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1007'); -INSERT INTO wobject VALUES ('3','1000','Article',1,'Getting Started',0,'If you\'re reading this message it means that you\'ve got WebGUI up and running. Good job! The installation is not trivial.\n\n

\n \nIn order to do anything useful with your new installation you\'ll need to log in as the default administrator account. Follow these steps to get started:\n\n

\n\n

    \n
  1. Click here to log in. (username: Admin password: 123qwe)\n
  2. Click here to turn the administrative interface on.\n
\n
\nNOTE: You could have also done these steps using the block at the top of this page.\n
\n\n

\n\nNow that you\'re in as the administrator, you should change your password so no one else can log in and mess with your site. You might also want to create another account for yourself with Administrative privileges in case you can\'t log in with the Admin account for some reason.\n\n

\n \nYou\'ll now notice little buttons and menus on all the pages in your site. These controls help you administer your site. The \"Add content\" menu lets you add new content to your pages as well as paste content from the clipboard. The \"Administrative functions\" menu let\'s you control users and groups as well as many other admin settings. The little toolbars help you manipulate the content in your pages.\n\n\n

\n\nFor more information about how to administer WebGUI consider getting a copy of Ruling WebGUI. Plain Black Software also provides several Support Programs for WebGUI if you run into trouble.\n\n

\n \nEnjoy your new WebGUI site!',1076704456,'3',1076704456,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1009'); +INSERT INTO wobject VALUES ('3','1000','Article',1,'Getting Started',0,'If you\'re reading this message it means that you\'ve got WebGUI up and running. Good job! The installation is not trivial.\n\n

\n \nIn order to do anything useful with your new installation you\'ll need to log in as the default administrator account. Follow these steps to get started:\n\n

\n\n

    \n
  1. Click here to log in. (username: Admin password: 123qwe)\n
  2. Click here to turn the administrative interface on.\n
\n
\nNOTE: You could have also done these steps using the block at the top of this page.\n
\n\n

\n\nNow that you\'re in as the administrator, you should change your password so no one else can log in and mess with your site. You might also want to create another account for yourself with Administrative privileges in case you can\'t log in with the Admin account for some reason.\n\n

\n \nYou\'ll now notice little buttons and menus on all the pages in your site. These controls help you administer your site. The \"Add content\" menu lets you add new content to your pages as well as paste content from the clipboard. The \"Administrative functions\" menu let\'s you control users and groups as well as many other admin settings. The little toolbars help you manipulate the content in your pages.\n\n\n

\n\nFor more information about how to administer WebGUI consider getting a copy of Ruling WebGUI. Plain Black Software also provides several Support Programs for WebGUI if you run into trouble.\n\n

\n \nEnjoy your new WebGUI site!',1076704456,'3',1076704456,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7','1009'); INSERT INTO wobject VALUES ('5','1001','USS',2,'Your Next Step',0,' To learn more about WebGUI and how you can best implement WebGUI in your organization, please see the choices below.\n\n',1076705448,'3',1076706084,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1000','3','3','7',''); INSERT INTO wobject VALUES ('6','1002','SyndicatedContent',1,'The Latest News',0,'This is the latest news from Plain Black and WebGUI pulled directly from the site every hour.',1076708567,'3',1076709040,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1000','3','3','7',''); INSERT INTO wobject VALUES ('7','1003','DataForm',1,'Tell A Friend',0,'Tell a friend about WebGUI.',1076709292,'3',1076709522,'3',1,946710000,2082783600,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'1','3','3','7',''); INSERT INTO wobject VALUES ('8','1004','SiteMap',0,'Site Map',0,'',1001744792,'3',1016077239,'3',1,1001744792,1336444487,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'2','3','3','7',''); +delete from template where templateId='7' and namespace='Navigation'; +INSERT INTO template VALUES ('7','Cool Menus','\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n^JavaScript(\"/coolmenus/coolmenus4.js\");\r\n','Navigation',1,1); +alter table SiteMap change startAtThisLevel startAtThisLevel varchar(22); +delete from template where templateId in (1,2) and namespace='Macro/L_loginBox'; +INSERT INTO template VALUES ('1','Default Login Box','

\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','Macro/L_loginBox',1,1); +INSERT INTO template VALUES ('2','Horizontal Login Box','
\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','Macro/L_loginBox',1,1); +alter table themeComponent change themeComponentId themeComponentId varchar(22); +alter table forumPost add index status_forumThreadId (status,forumThreadId); +alter table forumThread add index forumId_lastPostDate (forumId,lastPostDate); +alter table forumThread add index status_forumThreadId (status,forumThreadId); + diff --git a/docs/upgrades/upgrade_6.2.7-6.2.8.sql b/docs/upgrades/upgrade_6.2.7-6.2.8.sql new file mode 100644 index 000000000..23aa6188c --- /dev/null +++ b/docs/upgrades/upgrade_6.2.7-6.2.8.sql @@ -0,0 +1,12 @@ +insert into webguiVersion values ('6.2.8','upgrade',unix_timestamp()); +delete from template where templateId='7' and namespace='Navigation'; +INSERT INTO template VALUES ('7','Cool Menus','\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n^JavaScript(\"/coolmenus/coolmenus4.js\");\r\n','Navigation',1,1); +alter table SiteMap change startAtThisLevel startAtThisLevel varchar(22); +delete from template where templateId in (1,2) and namespace='Macro/L_loginBox'; +INSERT INTO template VALUES ('1','Default Login Box','
\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','Macro/L_loginBox',1,1); +INSERT INTO template VALUES ('2','Horizontal Login Box','
\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','Macro/L_loginBox',1,1); +alter table themeComponent change themeComponentId themeComponentId varchar(22); +alter table forumPost add index status_forumThreadId (status,forumThreadId); +alter table forumThread add index forumId_lastPostDate (forumId,lastPostDate); +alter table forumThread add index status_forumThreadId (status,forumThreadId); + diff --git a/docs/upgrades/upgrade_6.2.8-6.3.0.sql b/docs/upgrades/upgrade_6.2.8-6.3.0.sql new file mode 100644 index 000000000..a5d7d78d5 --- /dev/null +++ b/docs/upgrades/upgrade_6.2.8-6.3.0.sql @@ -0,0 +1,12 @@ +insert into webguiVersion values ('6.3.0','upgrade',unix_timestamp()); + +delete from template where templateId='tinymce' and namespace='richEditor'; +INSERT INTO template VALUES ('tinymce','TinyMCE','^JavaScript(\"/tinymce/jscripts/tiny_mce/tiny_mce.js\");\r\n\r\n\r\n','richEditor',1,1); +delete from template where templateId='1' and namespace='richEditor/pagetree'; +INSERT INTO template VALUES ('1','Rich Editor Page Tree','\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\nInsert/Edit Link\r\n\r\n
\r\n Link Settings\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
Link URL:
Link Target:\r\n
 
\r\n
\r\n \r\n\r\n
\r\n
\r\n\r\n\r\n
\r\n Available Page Tree\r\n\r\n\r\n \')\">
\r\n
\r\n\r\n
\r\n \r\n
\r\n\r\n','richEditor/pagetree',1,1); +UPDATE template set template = '\r\n \r\n \r\n <tmpl_var session.page.title> - <tmpl_var session.setting.companyName>\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 ' where templateId = '10' and namespace='style'; + +delete from userProfileField where fieldName='richEditor'; +INSERT INTO userProfileField VALUES ('richEditor','WebGUI::International::get(496)',1,0,'selectList','{5=>WebGUI::International::get(880),\r\nnone=>WebGUI::International::get(881),\r\n\'tinymce\'=>WebGUI::International::get(\"tinymce\")\n}','[\'tinymce\']',11,'4',0,1); +update userProfileData set fieldData='tinyMCE' where fieldName='richEditor'; + diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index ca357a7e5..7f710b67f 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -151,7 +151,11 @@ sub page { } } WebGUI::Affiliate::grabReferral(); # process affilliate tracking request - $output = WebGUI::HTTP::getHeader().$output; + if (WebGUI::HTTP::isRedirect() && !$useExistingSession) { + $output = WebGUI::HTTP::getHeader(); + } else { + $output = WebGUI::HTTP::getHeader().$output; + } # This allows an operation or wobject to write directly to the browser. $output = undef if ($session{page}{empty}); WebGUI::Session::close() unless ($useExistingSession); diff --git a/lib/WebGUI/DatabaseLink.pm b/lib/WebGUI/DatabaseLink.pm index a1947a365..eac666683 100644 --- a/lib/WebGUI/DatabaseLink.pm +++ b/lib/WebGUI/DatabaseLink.pm @@ -122,7 +122,7 @@ sub disconnect { $class = shift; $value = shift; if (defined $class->{_dbh}) { - $class->{_dbh}->disconnect() unless ($class->{_databaseLink}{databaseLinkId} == 0); + $class->{_dbh}->disconnect() unless ($class->{_databaseLink}{databaseLinkId} eq "0"); } } @@ -146,7 +146,7 @@ sub dbh { $dsn = $class->{_databaseLink}{DSN}; $username = $class->{_databaseLink}{username}; $identifier = $class->{_databaseLink}{identifier}; - if ($class->{_databaseLinkId} == 0) { + if ($class->{_databaseLinkId} eq "0") { $class->{_dbh} = $session{dbh}; return $session{dbh}; } elsif ($dsn =~ /\DBI\:\w+\:\w+/i) { @@ -182,9 +182,9 @@ sub new { $class = shift; $databaseLinkId = shift; unless ($databaseLinkId eq "") { - if ($databaseLinkId == 0) { + if ($databaseLinkId eq "0") { %databaseLink = ( - databaseLinkId=>0, + databaseLinkId=>"0", DSN=>$session{config}{dsn}, username=>$session{config}{dbuser}, identifier=>$session{config}{dpass}, diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index 0ef777d8c..3f6d0d5d5 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -982,7 +982,7 @@ sub HTMLArea { $var{"classic.supported"} = ($browser->ie && $browser->version >= 5); # Textarea field - $rows = $_[0]->{rows} || ($session{setting}{textAreaRows}+7); + $rows = $_[0]->{rows} || ($session{setting}{textAreaRows}+15); $columns = $_[0]->{columns} || ($session{setting}{textAreaCols}+5); $var{textarea} = textarea({ name=>$_[0]->{name}, diff --git a/lib/WebGUI/HTTP.pm b/lib/WebGUI/HTTP.pm index 64c1cb035..56fd55edd 100644 --- a/lib/WebGUI/HTTP.pm +++ b/lib/WebGUI/HTTP.pm @@ -30,16 +30,19 @@ This package allows the manipulation of HTTP protocol information. =head1 SYNOPSIS -use WebGUI::HTTP; - $header = WebGUI::HTTP::getHeader(); - WebGUI::HTTP::setRedirect($url); - WebGUI::HTTP::setCookie($name,$value); - WebGUI::HTTP::setNoHeader($bool); + use WebGUI::HTTP; + $header = WebGUI::HTTP::getHeader(); $mimetype = WebGUI::HTTP::getMimeType(); $code = WebGUI::HTTP::getStatus(); $boolean = WebGUI::HTTP::isRedirect(); + WebGUI::HTTP::setCookie($name,$value); + WebGUI::HTTP::setFilename($filename,$mimetype); + WebGUI::HTTP::setMimeType($mimetype); + WebGUI::HTTP::setNoHeader($bool); + WebGUI::HTTP::setRedirect($url); + =head1 METHODS These subroutines are available from this package: diff --git a/lib/WebGUI/Macro/Backslash_pageUrl.pm b/lib/WebGUI/Macro/Backslash_pageUrl.pm index 6646c13c4..1459c2128 100644 --- a/lib/WebGUI/Macro/Backslash_pageUrl.pm +++ b/lib/WebGUI/Macro/Backslash_pageUrl.pm @@ -16,7 +16,7 @@ use WebGUI::URL; #------------------------------------------------------------------- sub process { - return WebGUI::URL::page(); + return WebGUI::URL::getScriptURL().$session{page}{urlizedTitle}; } diff --git a/lib/WebGUI/Macro/L_loginBox.pm b/lib/WebGUI/Macro/L_loginBox.pm index 3c9078a77..e7abbf9ae 100644 --- a/lib/WebGUI/Macro/L_loginBox.pm +++ b/lib/WebGUI/Macro/L_loginBox.pm @@ -28,7 +28,7 @@ sub process { my @param = WebGUI::Macro::getParams($_[0]); my $templateId = $param[2] || 1; my %var; - $var{'user.isVisitor'} = ($session{user}{userId} == 1); + $var{'user.isVisitor'} = ($session{user}{userId} eq "1"); $var{'customText'} = $param[1]; $var{'customText'} =~ s/%(.*?)%/_createURL($1)/ge; $var{'hello.label'} = WebGUI::International::get(48); diff --git a/lib/WebGUI/MessageLog.pm b/lib/WebGUI/MessageLog.pm index caf57418c..3e25553dc 100644 --- a/lib/WebGUI/MessageLog.pm +++ b/lib/WebGUI/MessageLog.pm @@ -121,6 +121,9 @@ sub addEntry { $subject = $_[2]; $message = $_[3]; $url = $_[4]; + unless ($url =~ /^http/) { + $url = WebGUI::URL::getSiteURL().$url; + } $status = $_[5]; $from = $_[6]; if ($groupId ne "") { @@ -183,6 +186,9 @@ sub addInternationalizedEntry { $userId = $_[0]; $groupId = $_[1]; $url = $_[2]; + unless ($url =~ /^http/) { + $url = WebGUI::URL::getSiteURL().$url; + } $internationalId = $_[3]; $namespace = $_[4] || "WebGUI"; $status = $_[5] || 'notice'; diff --git a/lib/WebGUI/MetaData.pm b/lib/WebGUI/MetaData.pm index f87e53f24..2a6d08e12 100644 --- a/lib/WebGUI/MetaData.pm +++ b/lib/WebGUI/MetaData.pm @@ -259,7 +259,7 @@ A typical hashRef for this function will look like: Most of the time this will be a: -WebGUI::SQL->quickHashRef("select * from WobjectProxy where wobjectId=$proxiedId"); +WebGUI::SQL->quickHashRef("select * from WobjectProxy where wobjectId=".quote($proxiedId)); =cut diff --git a/lib/WebGUI/Operation/Collateral.pm b/lib/WebGUI/Operation/Collateral.pm index 64a0af80d..b9dd1288f 100644 --- a/lib/WebGUI/Operation/Collateral.pm +++ b/lib/WebGUI/Operation/Collateral.pm @@ -35,6 +35,7 @@ use Tie::IxHash; use WebGUI::URL; use WebGUI::HTML; + #------------------------------------------------------------------- sub _submenu { my (%menu); @@ -50,7 +51,7 @@ sub _submenu { $menu{WebGUI::URL::page('op=editCollateralFolder')} = WebGUI::International::get(759); if (WebGUI::Grouping::isInGroup(3)) { $menu{WebGUI::URL::page('op=emptyCollateralFolder')} = WebGUI::International::get(980); - $menu{WebGUI::URL::page('op=deleteCollateralFolder')} = WebGUI::International::get(760); +# $menu{WebGUI::URL::page('op=deleteCollateralFolder')} = WebGUI::International::get(760); } $menu{WebGUI::URL::page('op=listCollateral')} = WebGUI::International::get(766); return menuWrapper($_[0],\%menu); @@ -59,7 +60,7 @@ sub _submenu { #------------------------------------------------------------------- sub www_deleteCollateral { my $collateral = WebGUI::Collateral->new($session{form}{cid}); - return WebGUI::Privilege::insufficient unless ($collateral->get("userId") eq $session{user}{userId} || WebGUI::Grouping::isInGroup(3)); + return WebGUI::Privilege::insufficient unless ($collateral->get("userId") == $session{user}{userId} || WebGUI::Grouping::isInGroup(3)); my $output = '

'.WebGUI::International::get(42).'

'; $output .= WebGUI::International::get(774).'

'; $output .= '' @@ -73,7 +74,7 @@ sub www_deleteCollateral { #------------------------------------------------------------------- sub www_deleteCollateralConfirm { my $collateral = WebGUI::Collateral->new($session{form}{cid}); - return WebGUI::Privilege::insufficient unless ($collateral->get("userId") eq $session{user}{userId} || WebGUI::Grouping::isInGroup(3)); + return WebGUI::Privilege::insufficient unless ($collateral->get("userId") == $session{user}{userId} || WebGUI::Grouping::isInGroup(3)); $collateral->delete; WebGUI::Session::deleteScratch("collateralPageNumber"); return www_listCollateral(); @@ -82,7 +83,7 @@ sub www_deleteCollateralConfirm { #------------------------------------------------------------------- sub www_deleteCollateralFile { my $collateral = WebGUI::Collateral->new($session{form}{cid}); - return WebGUI::Privilege::insufficient unless ($collateral->get("userId") eq $session{user}{userId} || WebGUI::Grouping::isInGroup(3)); + return WebGUI::Privilege::insufficient unless ($collateral->get("userId") == $session{user}{userId} || WebGUI::Grouping::isInGroup(3)); $collateral->deleteFile; return www_editCollateral($collateral); } @@ -90,7 +91,7 @@ sub www_deleteCollateralFile { #------------------------------------------------------------------- sub www_deleteCollateralFolder { return WebGUI::Privilege::insufficient unless (WebGUI::Grouping::isInGroup(3)); - return WebGUI::Privilege::vitalComponent() unless ($session{scratch}{collateralFolderId} > 999); + return WebGUI::Privilege::vitalComponent() if ($session{scratch}{collateralFolderId} eq "0" || $session{scratch}{collateralFolderId} eq ""); my $output = '

'.WebGUI::International::get(42).'

'; $output .= WebGUI::International::get(775).'

'; $output .= '' @@ -104,7 +105,7 @@ sub www_deleteCollateralFolder { #------------------------------------------------------------------- sub www_deleteCollateralFolderConfirm { return WebGUI::Privilege::insufficient unless (WebGUI::Grouping::isInGroup(3)); - return WebGUI::Privilege::vitalComponent() unless ($session{scratch}{collateralFolderId} > 999); + return WebGUI::Privilege::vitalComponent() if ($session{scratch}{collateralFolderId} eq "0" || $session{scratch}{collateralFolderId} eq ""); my $folders = WebGUI::CollateralFolder->getTree({-minimumFields => 1}); if (my $deadFolder = $folders->{$session{scratch}{collateralFolderId}}) { my $parentId = $deadFolder->get("parentId"); @@ -117,7 +118,6 @@ sub www_deleteCollateralFolderConfirm { #------------------------------------------------------------------- sub www_emptyCollateralFolder { return WebGUI::Privilege::insufficient unless (WebGUI::Grouping::isInGroup(3)); - return WebGUI::Privilege::vitalComponent() unless ($session{scratch}{collateralFolderId} > 999); my $output = '

'.WebGUI::International::get(42).'

'; $output .= WebGUI::International::get(979).'

'; $output .= '' @@ -131,7 +131,6 @@ sub www_emptyCollateralFolder { #------------------------------------------------------------------- sub www_emptyCollateralFolderConfirm { return WebGUI::Privilege::insufficient unless (WebGUI::Grouping::isInGroup(3)); - return WebGUI::Privilege::vitalComponent() unless ($session{scratch}{collateralFolderId} > 999); my @collateralIds = WebGUI::SQL->buildArray("select collateralId from collateral where collateralFolderId=".quote($session{scratch}{collateralFolderId})); WebGUI::Collateral->multiDelete(@collateralIds); return www_listCollateral(); @@ -152,7 +151,7 @@ sub www_editCollateral { my $c = $_[1] || WebGUI::Collateral->new($session{form}{cid}); $collateral = $c->get; } - $canEdit = ($collateral->{userId} eq $session{user}{userId} || WebGUI::Grouping::isInGroup(3)); + $canEdit = ($collateral->{userId} == $session{user}{userId} || WebGUI::Grouping::isInGroup(3)); $folderId = $session{scratch}{collateralFolderId} || 0; $f = WebGUI::HTMLForm->new; $f->hidden("op","editCollateralSave"); @@ -193,11 +192,10 @@ sub www_editCollateral { if ($collateral->{collateralType} eq "snippet") { $output .= '

'.WebGUI::International::get(770).'

'; if ($canEdit) { - $f->HTMLArea( + $f->textarea( -name=>"parameters", -value=>$collateral->{parameters}, - -label=>WebGUI::International::get(771), - -popupToggle=>1 + -label=>WebGUI::International::get(771) ); } else { $f->readOnly( @@ -570,7 +568,7 @@ sub www_htmlAreaviewCollateral { $output .= ''; $output .= '


'; - $output .= '

WebGUI Image Manager
for htmlArea

'; + $output .= '

WebGUI Image Manager
for TinyMCE

'; $output .= ''; } else { my $c = WebGUI::Collateral->new($session{form}{cid}); @@ -590,9 +588,9 @@ sub www_htmlAreaviewCollateral { $output .= '\n"; } diff --git a/lib/WebGUI/Operation/Navigation.pm b/lib/WebGUI/Operation/Navigation.pm index ade93579f..c5f88a872 100644 --- a/lib/WebGUI/Operation/Navigation.pm +++ b/lib/WebGUI/Operation/Navigation.pm @@ -131,6 +131,7 @@ sub www_editNavigation { my $f = WebGUI::TabForm->new(\%tabs); $f->hidden({name=>'op', value=>'editNavigationSave'}); $f->hidden({name=>'navigationId', value=>$config->{navigationId}}); + $f->getTab("properties")->raw(''); $f->getTab("properties")->readOnly( -value=>$config->{navigationId}, -label=>'navigationId' @@ -274,7 +275,7 @@ sub www_editNavigationSave { # Delete from cache WebGUI::Page->recacheNavigation; - return www_listNavigation(); + return ""; } #------------------------------------------------------------------- @@ -287,7 +288,7 @@ sub www_listNavigation { while (my %data = $sth->hash) { $row[$i].= '' .deleteIcon('op=deleteNavigation&identifier='.$data{identifier}.'&navigationId='.$data{navigationId}) - .editIcon('op=editNavigation&identifier='.$data{identifier}.'&navigationId='.$data{navigationId}) + .editIcon('op=editNavigation&identifier='.$data{identifier}.'&navigationId='.$data{navigationId}."&afterEdit=".WebGUI::URL::escape("op=listNavigation")) .copyIcon('op=copyNavigation&identifier='.$data{identifier}.'&navigationId='.$data{navigationId}) .''; $row[$i].= ''.$data{identifier}.''; diff --git a/lib/WebGUI/Operation/Page.pm b/lib/WebGUI/Operation/Page.pm index 42ec6e7c9..8b62db815 100644 --- a/lib/WebGUI/Operation/Page.pm +++ b/lib/WebGUI/Operation/Page.pm @@ -107,8 +107,14 @@ sub _selectPositions { -afterEdit=>'op=editPage&npp='.$session{form}{npp}, -extras=>'onChange="changeTemplatePreview(this.form.templateId.value)"' ); - $output = ' - '; + $headtags .= ''; + WebGUI::Style::setRawHeadTags($headtags); $output .= $f->printRowsOnly; $output .= '
'; return $output; @@ -308,7 +312,7 @@ sub www_editPage { $f = WebGUI::TabForm->new(\%tabs); if ($session{form}{npp} ne "") { my $buildFromPage = $session{form}{npp}; - if ($buildFromPage == 0) { + if ($buildFromPage eq "0") { $buildFromPage = $session{setting}{defaultPage}; } %page = WebGUI::SQL->quickHash("select * from page where pageId=".quote($buildFromPage)); @@ -873,6 +877,38 @@ sub www_pastePage { } } +#------------------------------------------------------------------- +sub www_richEditPageTree { + my (%var,@bad); + my $namelessroot = WebGUI::Page->new('0'); + foreach my $page ($namelessroot->descendants) { + my $skipBadPage = 0; + foreach my $badPage (@bad) { + if ($page->{nestedSetLeft} > $badPage->{nestedSetLeft} && $page->{nestedSetRight} < $badPage->{nestedSetRight}) { + $skipBadPage = 1; + } + } + next if ($skipBadPage); # descendant of a page we threw out + if ($page->{isSystem}) { + push(@bad,$page); + next; # throw out system pages + } + unless (WebGUI::Page::canView($page)) { + push(@bad,$page); + next; # throw out pages we can't view + } + push(@{$var{page_loop}},{ + id=>$page->{pageId}, + url=>$page->{urlizedTitle}, + indent=>"   " x $page->{depth}, + title=>$page->{title} + }); + } + $session{page}{useEmptyStyle} = 1; + return WebGUI::Template::process(1,"richEditor/pagetree",\%var); +} + + #------------------------------------------------------------------- sub www_rearrangeWobjects { return WebGUI::Privilege::insufficient() unless (WebGUI::Page::canEdit($session{page}{pageId})); @@ -904,6 +940,7 @@ Returns a HTML formatted indented pagetree complete with edit/delete/cut/move bu =cut sub www_viewPageTree { + return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(4)); my ($output); $session{page}{useAdminStyle} = 1; $output = '

'.WebGUI::International::get(448).'

'; diff --git a/lib/WebGUI/Operation/Statistics.pm b/lib/WebGUI/Operation/Statistics.pm index ceae56984..ee4115e11 100644 --- a/lib/WebGUI/Operation/Statistics.pm +++ b/lib/WebGUI/Operation/Statistics.pm @@ -83,7 +83,7 @@ sub www_viewLoginHistory { $output = '

'.WebGUI::International::get(426).'

'; $sth = WebGUI::SQL->read("select * from users,userLoginLog where users.userId=userLoginLog.userId order by userLoginLog.timeStamp desc"); while (%data = $sth->hash) { - $data{username} = 'unknown user' if ($data{userId} == 0); + $data{username} = 'unknown user' if ($data{userId} eq "0"); $row[$i] = ''.$data{username}.' ('.$data{userId}.')'; $row[$i] .= ''.$data{status}.''; $row[$i] .= ''.epochToHuman($data{timeStamp},"%H:%n%p %M/%D/%y").''; diff --git a/lib/WebGUI/Operation/Template.pm b/lib/WebGUI/Operation/Template.pm index c9889ca4c..e9b498d6a 100644 --- a/lib/WebGUI/Operation/Template.pm +++ b/lib/WebGUI/Operation/Template.pm @@ -32,7 +32,7 @@ sub _submenu { tie %menu, 'Tie::IxHash'; $menu{WebGUI::URL::page('op=editTemplate&tid=new&namespace='.$session{form}{namespace})} = WebGUI::International::get(505); - if (($session{form}{op} eq "editTemplate" && $session{form}{tid} ne "new") || $session{form}{op} eq "deleteTemplateConfirm") { + if ($session{form}{op} eq "editTemplate" && ($session{form}{tid} ne "new" || $session{form}{op} ne "deleteTemplateConfirm")) { $menu{WebGUI::URL::page('op=editTemplate&tid='.$session{form}{tid}.'&namespace='.$session{form}{namespace})} = WebGUI::International::get(851); $menu{WebGUI::URL::page('op=copyTemplate&tid='.$session{form}{tid}.'&namespace='.$session{form}{namespace})} = diff --git a/lib/WebGUI/Operation/WebGUI.pm b/lib/WebGUI/Operation/WebGUI.pm index ce370eeab..bba29f569 100644 --- a/lib/WebGUI/Operation/WebGUI.pm +++ b/lib/WebGUI/Operation/WebGUI.pm @@ -91,7 +91,7 @@ sub www_theWg {
ctId})}$contentHash{"page.position".${$wobject}{templatePosition}}.="<br>"; -
}#--EasterEg
gGoesHerHere!!Checksifuserhasprivilegetoviewthewobjectif(!WebGUI:: +
}#--EasterEg
gGoesHere!!Checksifuserhasprivilegetoviewthewobjectif(!WebGUI::
Privilege::c
anViewWobject($wobject->{wobjectId})){next;}#--EndChangesif(${$ diff --git a/lib/WebGUI/Page.pm b/lib/WebGUI/Page.pm index a81583393..de123bf98 100644 --- a/lib/WebGUI/Page.pm +++ b/lib/WebGUI/Page.pm @@ -131,6 +131,7 @@ sub _processWobjectFunctions { my ($wobject, $output, $proxyWobjectId, $cmd, $w); if (exists $session{form}{func} && exists $session{form}{wid}) { if ($session{form}{func} =~ /^[A-Za-z]+$/) { + if ($session{form}{wid} =~ /^[A-Za-z0-9\_\-]+$/) { #valid wobject id if ($session{form}{wid} eq "new") { $wobject = {wobjectId=>"new",namespace=>$session{form}{namespace},pageId=>$session{page}{pageId}}; } else { @@ -178,6 +179,9 @@ sub _processWobjectFunctions { } } } + } else { + WebGUI::ErrorHandler::security("instanciate a wobject with an invalid wobjectId [".$session{form}{wid}."]"); + } } else { WebGUI::ErrorHandler::security("execute an invalid function on wobject " .$session{form}{wid}.": ".$session{form}{func}); @@ -235,7 +239,7 @@ sub ancestors { #------------------------------------------------------------------- -=head2 canEdit ( [ pageId ] ) +=head2 canEdit ( [ pageId || pageProperties ] ) Returns a boolean (0|1) value signifying that the user has the required privileges. @@ -243,21 +247,24 @@ Returns a boolean (0|1) value signifying that the user has the required privileg The unique identifier for the page that you wish to check the privileges on. Defaults to the current page id. +You can alternatively pass a hash reference containing the page's properties. This will save a hit to the database. + =cut sub canEdit { my $pageId = shift || $session{page}{pageId}; - my (%page); - tie %page, 'Tie::CPHash'; - if ($pageId ne $session{page}{pageId}) { - %page = WebGUI::SQL->quickHash("select ownerId,groupIdEdit from page where pageId=".quote($pageId)); + my $page; + if (ref $pageId eq 'HASH') { + $page = $pageId; + } elsif ($pageId ne $session{page}{pageId}) { + $page = WebGUI::SQL->quickHashRef("select ownerId,groupIdEdit from page where pageId=".quote($pageId)); } else { - %page = %{$session{page}}; + $page = $session{page}; } - if ($session{user}{userId} eq $page{ownerId}) { + if ($session{user}{userId} eq $page->{ownerId}) { return 1; } else { - return WebGUI::Grouping::isInGroup($page{groupIdEdit}); + return WebGUI::Grouping::isInGroup($page->{groupIdEdit}); } } @@ -325,7 +332,7 @@ sub canMoveUp { #------------------------------------------------------------------- -=head2 canView ( [ pageId ] ) +=head2 canView ( [ pageId || $pageProperties ] ) Returns a boolean (0|1) value signifying that the user has the required privileges. Always returns users that have the rights to edit this page. @@ -333,23 +340,26 @@ Returns a boolean (0|1) value signifying that the user has the required privileg The unique identifier for the page that you wish to check the privileges on. Defaults to the current page id. +You can alternatively pass a hash reference of page properties. This will eliminate a hit to the database. + =cut sub canView { my $pageId = shift || $session{page}{pageId}; - my %page; - tie %page, 'Tie::CPHash'; - if ($pageId eq $session{page}{pageId}) { - %page = %{$session{page}}; + my $page; + if (ref $pageId eq 'HASH') { + $page = $pageId; + } elsif ($pageId eq $session{page}{pageId}) { + $page = $session{page}; } else { - %page = WebGUI::SQL->quickHash("select ownerId,groupIdView,startDate,endDate from page where pageId=".quote($pageId),WebGUI::SQL->getSlave); + $page = WebGUI::SQL->quickHashRef("select ownerId,groupIdEdit,groupIdView,startDate,endDate from page where pageId=".quote($pageId),WebGUI::SQL->getSlave); } - if ($session{user}{userId} eq $page{ownerId}) { + if ($session{user}{userId} eq $page->{ownerId}) { return 1; - } elsif ($page{startDate} < WebGUI::DateTime::time() && $page{endDate} > WebGUI::DateTime::time() && WebGUI::Grouping::isInGroup($page{groupIdView})) { + } elsif ($page->{startDate} < WebGUI::DateTime::time() && $page->{endDate} > WebGUI::DateTime::time() && WebGUI::Grouping::isInGroup($page->{groupIdView})) { return 1; } else { - return canEdit($pageId); + return canEdit($page); } } @@ -1562,13 +1572,11 @@ sub traversePreOrder { @pages = $self->self_and_descendants; # The 'ueber'-root contains no data so we do not want to return i! - shift @pages if ($pages[0]->{'pageId'} eq 0); - + shift @pages if ($pages[0]->{'pageId'} eq '0'); foreach (@pages) { $page = WebGUI::Page->new($_->{'pageId'}); &$mappingFunction($page, {_depth=>$page->get('depth')}); } - return @pages; } diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 912939d1f..6a8ee4f47 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -291,7 +291,7 @@ sub open { ###---------------------------- ### operating system specific things $session{os}{name} = $^O; - if ($session{os}{name} =~ /^Win/i) { + if ($session{os}{name} =~ /Win/) { $session{os}{type} = "Windowsish"; $session{os}{slash} = "\\"; } else { diff --git a/lib/WebGUI/URL.pm b/lib/WebGUI/URL.pm index 67aef3e67..c62044bb7 100644 --- a/lib/WebGUI/URL.pm +++ b/lib/WebGUI/URL.pm @@ -119,7 +119,7 @@ Name value pairs to add to the URL in the form of: =cut sub gateway { - my $url = getSiteURL().$_[0]; + my $url = getScriptURL().$_[0]; if ($_[1]) { $url = append($url,$_[1]); } @@ -165,9 +165,28 @@ sub setSiteURL { #------------------------------------------------------------------- +=head2 getScriptURL { + +Returns the URL for the gateway script. + +=cut + +sub getScriptURL { + my $scripturl; + if (exists $session{config}{scripturl}) { + $scripturl = $session{config}{scripturl}; + } else { + $scripturl = $session{env}{SCRIPT_NAME}; + } + $scripturl .= '/'; + return $scripturl; +} + +#------------------------------------------------------------------- + =head2 getSiteURL ( ) -Returns a constructed site url from protocol to gateway. The returned +Returns a constructed site url. The returned value can be overridden using the setSiteURL function. =cut @@ -190,14 +209,7 @@ sub getSiteURL { if ($session{env}{SERVER_PORT} == 443) { $proto = "https://"; } - my $scripturl; - if (exists $session{config}{scripturl}) { - $scripturl .= $session{config}{scripturl}; - } else { - $scripturl .= $session{env}{SCRIPT_NAME}; - } - $scripturl .= '/'; - return $proto.$site.$scripturl; + return $proto.$site; } @@ -242,7 +254,7 @@ Name value pairs to add to the URL in the form of: =cut sub page { - my $url = getSiteURL().$session{page}{urlizedTitle}; + my $url = getScriptURL().$session{page}{urlizedTitle}; if ($_[0]) { $url = append($url,$_[0]); } diff --git a/lib/WebGUI/Wobject/DataForm.pm b/lib/WebGUI/Wobject/DataForm.pm index aec32e679..46d6a03bd 100644 --- a/lib/WebGUI/Wobject/DataForm.pm +++ b/lib/WebGUI/Wobject/DataForm.pm @@ -127,9 +127,9 @@ sub duplicate { tie %dataField, 'Tie::CPHash'; $w = $_[0]->SUPER::duplicate($_[1]); $w = WebGUI::Wobject::DataForm->new({wobjectId=>$w,namespace=>$_[0]->get("namespace")}); - $sthTab = WebGUI::SQL->read("select * from DataForm_tab where wobjectId=".$_[0]->get("wobjectId")); + $sthTab = WebGUI::SQL->read("select * from DataForm_tab where wobjectId=".quote($_[0]->get("wobjectId"))); while (%dataTab = $sthTab->hash) { - $sthField = WebGUI::SQL->read("select * from DataForm_field where wobjectId=".$_[0]->get("wobjectId")." AND DataForm_tabId=".$dataTab{DataForm_tabId}); + $sthField = WebGUI::SQL->read("select * from DataForm_field where wobjectId=".quote($_[0]->get("wobjectId"))." AND DataForm_tabId=".quote($dataTab{DataForm_tabId})); $dataTab{DataForm_tabId} = "new"; $newTabId = $w->setCollateral("DataForm_tab","DataForm_tabId",\%dataTab); while (%dataField = $sthField->hash) { @@ -139,7 +139,7 @@ sub duplicate { } $sthField->finish; } - $sthField = WebGUI::SQL->read("select * from DataForm_field where wobjectId=".$_[0]->get("wobjectId")." AND DataForm_tabId=0"); + $sthField = WebGUI::SQL->read("select * from DataForm_field where wobjectId=".quote($_[0]->get("wobjectId"))." AND DataForm_tabId='0'"); while (%dataField = $sthField->hash) { $dataField{DataForm_fieldId} = "new"; $w->setCollateral("DataForm_field","DataForm_fieldId",\%dataField); diff --git a/lib/WebGUI/Wobject/EventsCalendar.pm b/lib/WebGUI/Wobject/EventsCalendar.pm index c746531ba..a999b7c39 100644 --- a/lib/WebGUI/Wobject/EventsCalendar.pm +++ b/lib/WebGUI/Wobject/EventsCalendar.pm @@ -131,7 +131,7 @@ sub new { #------------------------------------------------------------------- sub purge { - WebGUI::SQL->write("delete from EventsCalendar_event where wobjectId=".$_[0]->get("wobjectId")); + WebGUI::SQL->write("delete from EventsCalendar_event where wobjectId=".quote($_[0]->get("wobjectId"))); $_[0]->SUPER::purge(); } @@ -160,6 +160,7 @@ sub www_deleteEventConfirm { } else { $_[0]->deleteCollateral("EventsCalendar_event","EventsCalendar_eventId",$session{form}{eid}); } + $_[0]->deleteCache; return ""; } @@ -318,7 +319,6 @@ sub www_editEvent { #------------------------------------------------------------------- sub www_editEventSave { return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit); - $_[0]->deleteCache; my (@startDate, @endDate, $until, @eventId, $i, $recurringEventId); $startDate[0] = WebGUI::FormProcessor::dateTime("startDate"); $startDate[0] = time() unless ($startDate[0] > 0); @@ -367,6 +367,7 @@ sub www_editEventSave { description=".quote($session{form}{description}).", startDate=".$startDate[0].", endDate=".$endDate[0]." where EventsCalendar_eventId=".quote($session{form}{eid})); } + $_[0]->deleteCache; if ($session{form}{proceed} eq "addEvent") { $session{form}{eid} = "new"; return $_[0]->www_editEvent; @@ -408,6 +409,8 @@ sub www_view { $maxDate = WebGUI::DateTime::addToDate($minDate,0,6,0); } elsif ($_[0]->get("endMonth") eq "after3") { $maxDate = WebGUI::DateTime::addToDate($minDate,0,3,0); + } elsif ($_[0]->get("endMonth") eq "current") { # a hack that we need to get the default month to be end month. probably a better way to do it + $maxDate = WebGUI::DateTime::addToDate($minDate,0,1,0); } $maxDate = $maxDate || WebGUI::DateTime::time(); @@ -423,6 +426,7 @@ sub www_view { $session{form}{calPn} = 1; } } + my @now = WebGUI::DateTime::epochToArray(WebGUI::DateTime::time()); for (my $i=1;$i<$monthCount;$i++) { my $thisMonth = WebGUI::DateTime::addToDate($minDate,0,($i-1),0); my ($monthStart, $monthEnd) = WebGUI::DateTime::monthStartEnd($thisMonth); @@ -494,9 +498,7 @@ sub www_view { day=>$dayCounter, isStartOfWeek=>($dayOfWeekCounter==1), isEndOfWeek=>($dayOfWeekCounter==7), - isToday=>(WebGUI::DateTime::getDaysInInterval( - WebGUI::DateTime::setToEpoch($date[0]."-".$date[1]."-".$dayCounter), - WebGUI::DateTime::time()) == 0), + isToday=>($date[0]."-".$date[1]."-".$dayCounter eq $now[0]."-".$now[1]."-".$now[2]), event_loop=>\@{$events{$dayCounter}}, url=>$events{$dayCounter}->[0]->{url} }); diff --git a/lib/WebGUI/Wobject/FileManager.pm b/lib/WebGUI/Wobject/FileManager.pm index 6aa1edcab..becb0c274 100644 --- a/lib/WebGUI/Wobject/FileManager.pm +++ b/lib/WebGUI/Wobject/FileManager.pm @@ -346,7 +346,7 @@ sub www_view { $var{"dateColumn.url"} = $_[0]->_sortByColumn("dateUploaded",$url); $session{form}{sort} = "sequenceNumber" if ($session{form}{sort} eq ""); $var{"search.form"} = WebGUI::Search::form({wid=>$_[0]->get("wobjectId"),func=>"view"}); - $var{"search.url"} = WebGUI::Search::toggleURL(); + $var{"search.url"} = WebGUI::Search::toggleURL("wid=".$_[0]->get("wobjectId")."&func=view"); $var{"search.label"} = WebGUI::International::get(364); $var{"addfile.url"} = WebGUI::URL::page('func=editDownload&did=new&wid='.$_[0]->get("wobjectId")); $var{"addfile.label"} = WebGUI::International::get(11,$_[0]->get("namespace")); diff --git a/lib/WebGUI/Wobject/HttpProxy.pm b/lib/WebGUI/Wobject/HttpProxy.pm index 57c5ff413..4ac6d33ad 100644 --- a/lib/WebGUI/Wobject/HttpProxy.pm +++ b/lib/WebGUI/Wobject/HttpProxy.pm @@ -287,7 +287,7 @@ sub www_view { $var{content} = "Getting
$proxiedUrl failed". "

GET status line: ".$response->status_line.""; } - if ($session{user}{userId} == 1) { + if ($session{user}{userId} eq '1') { $ttl = $session{page}{cacheTimeoutVisitor}; } else { $ttl = $session{page}{cacheTimeout}; diff --git a/lib/WebGUI/Wobject/IndexedSearch.pm b/lib/WebGUI/Wobject/IndexedSearch.pm index 81344112f..d7ff7d5d4 100644 --- a/lib/WebGUI/Wobject/IndexedSearch.pm +++ b/lib/WebGUI/Wobject/IndexedSearch.pm @@ -133,7 +133,7 @@ sub www_edit { # Page roots %searchRoot = ( 'any'=>WebGUI::International::get(15,$self->get("namespace")), $session{page}{pageId}=>WebGUI::International::get(4,$self->get("namespace")), - WebGUI::SQL->buildHash("select pageId,title from page where parentId='0' and isSystem<>'1' order by title") + WebGUI::SQL->buildHash("select pageId,title from page where parentId='0' and isSystem<>1 order by title") ); $properties->checkList ( -name=>'searchRoot', -options=>\%searchRoot, diff --git a/lib/WebGUI/Wobject/IndexedSearch/Search.pm b/lib/WebGUI/Wobject/IndexedSearch/Search.pm index f11fb9d91..bef973923 100644 --- a/lib/WebGUI/Wobject/IndexedSearch/Search.pm +++ b/lib/WebGUI/Wobject/IndexedSearch/Search.pm @@ -70,7 +70,7 @@ sub _recurseCrumbTrail { if ($data{pageId}) { $output .= _recurseCrumbTrail($data{parentId}); } - if ($data{menuTitle} ne "") { + if ($data{pageId} ne "0") { $output .= ''.$data{menuTitle}.' > '; } diff --git a/lib/WebGUI/Wobject/MessageBoard.pm b/lib/WebGUI/Wobject/MessageBoard.pm index d521a78c6..12fff83fe 100644 --- a/lib/WebGUI/Wobject/MessageBoard.pm +++ b/lib/WebGUI/Wobject/MessageBoard.pm @@ -85,10 +85,11 @@ sub getIndexerParams { page.pageId as pageId, page.groupIdView as page_groupIdView, wobject.groupIdView as wobject_groupIdView, - 7 as wobject_special_groupIdView - from forumPost, forumThread, MessageBoard_forums, wobject, page + forum.groupToView as wobject_special_groupIdView + from forum, forumPost, forumThread, MessageBoard_forums, wobject, page where forumPost.forumThreadId = forumThread.forumThreadId and forumThread.forumId = MessageBoard_forums.forumId + and forumThread.forumId = forum.forumId and MessageBoard_forums.wobjectId = wobject.wobjectId and wobject.pageId = page.pageId and wobject.startDate < $now diff --git a/lib/WebGUI/Wobject/SiteMap.pm b/lib/WebGUI/Wobject/SiteMap.pm index 655eaf0d8..d5d09f574 100644 --- a/lib/WebGUI/Wobject/SiteMap.pm +++ b/lib/WebGUI/Wobject/SiteMap.pm @@ -49,8 +49,8 @@ sub _traversePageTree { "page.title" => $data->{title}, "page.menuTitle" => $data->{menuTitle}, "page.synopsis" => $data->{synopsis}, - "page.isRoot" => ($parent eq '0'), - "page.isTop" => ($currentDepth == 0 || ($currentDepth == 1 && $parent eq '0')) + "page.isRoot" => ($parent eq "0"), + "page.isTop" => ($currentDepth == 0 || ($currentDepth == 1 && $parent eq "0")) }); push(@pages,@{_traversePageTree($data->{pageId},($currentDepth+1),$depth,$indent,$alphabetic)}); } diff --git a/lib/WebGUI/Wobject/Survey.pm b/lib/WebGUI/Wobject/Survey.pm index 2177c6c56..4fe2b1e54 100644 --- a/lib/WebGUI/Wobject/Survey.pm +++ b/lib/WebGUI/Wobject/Survey.pm @@ -1050,7 +1050,7 @@ sub www_viewStatisticalOverview { $var->{title} = WebGUI::International::get(58,$self->get("namespace")); my $p = WebGUI::Paginator->new(WebGUI::URL::page('func=viewStatisticalOverview&wid='.$self->get("wobjectId"))); $p->setDataByQuery("select Survey_questionId,question,answerFieldType,allowComment from Survey_question - where Survey_id=".$self->get("Survey_id")." order by sequenceNumber"); + where Survey_id=".quote($self->get("Survey_id"))." order by sequenceNumber"); my $questions = $p->getPageData; my @questionloop; $var->{'answer.label'} = WebGUI::International::get(19,$self->get("namespace")); diff --git a/lib/WebGUI/Wobject/USS.pm b/lib/WebGUI/Wobject/USS.pm index 6919f22af..a4aff6404 100644 --- a/lib/WebGUI/Wobject/USS.pm +++ b/lib/WebGUI/Wobject/USS.pm @@ -227,7 +227,12 @@ sub purge { $forum->purge; } my $page = WebGUI::Page->new($pageId); - $page->purge; + if (defined $page) { + $page->purge; + } else { + WebGUI::ErrorHandler::warn("Submission ".$submissionId." + of USS ".$_[0]->get("USS_id")." didn't have real page attached to it. This could be a minor problem caused by a bug of old, or it could indicate major data corruption issues."); + } } $sth->finish; WebGUI::SQL->write("delete from USS_submission where USS_id=".quote($_[0]->get("USS_id"))); @@ -266,7 +271,7 @@ sub www_approveSubmission { WebGUI::MessageLog::addInternationalizedEntry($submission{userId},'',WebGUI::URL::page('func=viewSubmission&wid='. $session{form}{wid}.'&sid='.$session{form}{sid}),4,$self->get("namespace")); WebGUI::MessageLog::completeEntry($session{form}{mlog}); - $self->deleteCachedSubmission; + $self->deleteCachedSubmission($session{form}{sid}); return WebGUI::Operation::www_viewMessageLog(); } else { return WebGUI::Privilege::insufficient(); @@ -288,7 +293,7 @@ sub www_deleteFile { $session{form}{file}=>'', USS_submissionId=>$session{form}{sid} },0,0); - $self->deleteCachedSubmission; + $self->deleteCachedSubmission($session{form}{sid}); return $self->www_editSubmission(); } else { return WebGUI::Privilege::insufficient(); @@ -319,7 +324,7 @@ sub www_deleteSubmissionConfirm { } my $page = WebGUI::Page->new($pageId); $page->purge; - $self->deleteCachedSubmission; + $self->deleteCachedSubmission($session{form}{sid}); $self->deleteCollateral("USS_submission","USS_submissionId",$session{form}{sid}); my $file = WebGUI::Attachment->new("",$session{form}{wid},$session{form}{sid}); $file->deleteNode; @@ -340,7 +345,7 @@ sub www_denySubmission { WebGUI::MessageLog::addInternationalizedEntry($submission{userId},'',WebGUI::URL::page('func=viewSubmission&wid='. $session{form}{wid}.'&sid='.$session{form}{sid}),5,$self->get("namespace")); WebGUI::MessageLog::completeEntry($session{form}{mlog}); - $self->deleteCachedSubmission; + $self->deleteCachedSubmission($session{form}{sid}); return WebGUI::Operation::www_viewMessageLog(); } else { return WebGUI::Privilege::insufficient(); @@ -656,6 +661,7 @@ sub www_editSubmissionSave { $pageVars{subroutinePackage} = "WebGUI::Wobject::USS"; $pageVars{subroutineParams} = "{wobjectId=>'".$_[0]->wid."',submissionId=>'".$session{form}{sid}."'}"; $pageVars{urlizedTitle} .= "/".$_[0]->get("title")."/".$session{form}{title}; + $pageVars{urlizedTitle} .= ".".$session{setting}{urlExtension} unless ($pageVars{urlizedTitle} =~ /\./ && $session{setting}{urlExtension} ne ""); $pageVars{urlizedTitle} = WebGUI::Page::makeUnique(WebGUI::URL::urlize($pageVars{urlizedTitle},-999)); $newPage->set(\%pageVars); %hash = (); @@ -693,7 +699,7 @@ sub www_editSubmissionSave { my $page = WebGUI::Page->new($submission->{pageId}); $page->set(\%pageVars); $_[0]->setCollateral("USS_submission", "USS_submissionId", \%hash, 1, 0, "USS_id", $_[0]->get("USS_id")); - $_[0]->deleteCachedSubmission; + $_[0]->deleteCachedSubmission($hash{USS_submissionId}); return $_[0]->www_viewSubmission(); } else { return WebGUI::Privilege::insufficient(); diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm index 2e12a3175..1a82c8c48 100644 --- a/lib/WebGUI/i18n/English/WebGUI.pm +++ b/lib/WebGUI/i18n/English/WebGUI.pm @@ -469,11 +469,6 @@ The URL of the web site for this theme's designer. If you are in the business of lastUpdated => 1050264990 }, - '495' => { - message => q|htmlArea (Internet Explorer 5.5+)|, - lastUpdated => 1044704928 - }, - '859' => { message => q|Signature|, lastUpdated => 1043879866 @@ -555,7 +550,7 @@ The URL of the web site for this theme's designer. If you are in the business of }, '49' => { - message => q|Click here to log out.|, + message => q|Click here to log out.|, lastUpdated => 1031514049 }, @@ -2132,7 +2127,7 @@ Displays a small text message to the user if they belong to the specified group. Example: ^GroupText("Visitors","You need an account to do anything cool on this site!","We value our registered users!");

^L; or ^L(); - Login Box
-A small login form. This macro takes up to three parameters. The first is used to set the width of the login box: ^L(20);. The second sets the message displayed after the user is logged in: ^L(20,"Hi ^a(^@;);. Click %here% if you wanna log out!");. Text between percent signs (%) is replaced by a link to the logout operation. The third parameter is the name of a template in the Macro/L_loginBox namespace to replace the default template. The variables below are +A small login form. This macro takes up to three parameters. The first is used to set the width of the login box: ^L(20);. The second sets the message displayed after the user is logged in: ^L(20,"Hi ^a(^@;);. Click %here% if you wanna log out!");. Text between percent signs (%) is replaced by a link to the logout operation. The third parameter is the ID of a template in the Macro/L_loginBox namespace to replace the default template. The variables below are available in the template. Not all of them are required, but variables that will cause the macro to output code that doesn't function properly (like not actually log someone in) are marked with an asterisk '*'

user.isVisitor
@@ -2474,13 +2469,17 @@ Choose which group can view this page. If you want both visitors and registered Choose the group that can edit this page. The group assigned editing rights can also always view the page.

+Wobject privileges?
+Allows content managers to specify view/edit privileges on a per wobject basis rather than relying on the privileges on the page. +

+ You can optionally recursively give these privileges to all pages under this page.

What next?
If you leave this on the default setting you'll be redirected to the new page after creating it.

|, - lastUpdated => 1096433872 + lastUpdated => 1099004008 }, '60' => { @@ -2829,11 +2828,6 @@ Select which host to use by default when generating URLs. Config Sitename will u lastUpdated => 1031514049 }, - '887' => { - message => q|Midas (Mozilla 1.3+)|, - lastUpdated => 1047342950 - }, - '26' => { message => q|December|, lastUpdated => 1031514049 @@ -6533,11 +6527,6 @@ Create your template by using template commands and variables, macros, and HTML. lastUpdated => 1031514049 }, - '494' => { - message => q|RealObjects edit-on Pro 2.x|, - lastUpdated => 1044704984 - }, - '873' => { message => q|Subscribe to thread|, lastUpdated => 1065876827 @@ -7442,8 +7431,8 @@ config file.

lastUpdated =>1092748557, context => q|Label for Forum Settings| }, - 'HTMLArea 3' => { - message => q|HTMLArea 3 (IE, mozilla)|, + 'tinymce' => { + message => q|TinyMCE (IE, mozilla)|, lastUpdated =>1092748557, context => q|option for Rich Editor in profile| }, diff --git a/sbin/Hourly/DeleteExpiredGroupings.pm b/sbin/Hourly/DeleteExpiredGroupings.pm index 7f5d71678..bcb58282d 100644 --- a/sbin/Hourly/DeleteExpiredGroupings.pm +++ b/sbin/Hourly/DeleteExpiredGroupings.pm @@ -18,16 +18,16 @@ use WebGUI::SQL; #----------------------------------------- sub process { my @date = WebGUI::DateTime::localtime(); - if ($date[4] == 3) { # only occurs at 3am on the day in question. + if ($date[3] == 3) { # only occurs at 3am on the day in question. my $sth = WebGUI::SQL->read("select groupId,deleteOffset,dbCacheTimeout from groups"); while (my $data = $sth->hashRef) { if ($data->{dbCacheTimeout} > 0) { - # there is no need to wait deleteOffset days for expired external group cache data - WebGUI::SQL->write("delete from groupings where groupId=".quote($data->{groupId})." and expireDate < ".WebGUI::DateTime::time()); - } else { + # there is no need to wait deleteOffset days for expired external group cache data + WebGUI::SQL->write("delete from groupings where groupId=".quote($data->{groupId})." and expireDate < ".WebGUI::DateTime::time()); + } else { WebGUI::SQL->write("delete from groupings where groupId=".quote($data->{groupId})." and expireDate < " .(WebGUI::DateTime::time()-(86400*$data->{deleteOffset}))); - } + } } $sth->finish; } diff --git a/sbin/Hourly/IndexedSearch_buildIndex.pm b/sbin/Hourly/IndexedSearch_buildIndex.pm index 391d8be26..e1e4b4d8b 100644 --- a/sbin/Hourly/IndexedSearch_buildIndex.pm +++ b/sbin/Hourly/IndexedSearch_buildIndex.pm @@ -169,9 +169,9 @@ sub getIndexerParams { b.fieldData as publicProfile, 'profile' as namespace, 1 as pageId, - 7 as page_groupIdView, - 7 as wobject_groupIdView, - 7 as wobject_special_groupIdView + 2 as page_groupIdView, + 2 as wobject_groupIdView, + 2 as wobject_special_groupIdView from userProfileData LEFT join userProfileData b on userProfileData.userId=b.userId diff --git a/sbin/Hourly/NotifyExpiredGroupings.pm b/sbin/Hourly/NotifyExpiredGroupings.pm index e8eb4d33f..2b735be43 100644 --- a/sbin/Hourly/NotifyExpiredGroupings.pm +++ b/sbin/Hourly/NotifyExpiredGroupings.pm @@ -19,18 +19,20 @@ use WebGUI::SQL; #----------------------------------------- sub process { + my $verbose = shift; my @date = WebGUI::DateTime::localtime(WebGUI::DateTime::time()); - if ($date[4] == 1) { # only occurs at 1am on the day in question. + if ($date[3] == 1) { # only occurs at 1am on the day in question. my $now = WebGUI::DateTime::time(); my $a = WebGUI::SQL->read("select groupId,expireNotifyOffset,expireNotifyMessage from groups where expireNotify=1"); while (my $group = $a->hashRef) { - my $start = $now + (86400 * $group->{expireNotifyOffset}); + my $start = $now + (86400 * ($group->{expireNotifyOffset}-1)); my $end = $start + 86400; my $b = WebGUI::SQL->read("select userId from groupings where groupId=".quote($group->{groupId})." and expireDate>=".$start." and expireDate<=".$end); while (my ($userId) = $b->array) { WebGUI::MessageLog::addEntry($userId,"",WebGUI::International::get(867),$group->{expireNotifyMessage}); + print "\n\t\tNotified ".$userId." about ".$group->{groupId} if ($verbose); } $b->finish; } diff --git a/sbin/testEnvironment.pl b/sbin/testEnvironment.pl index 6f61cd8d8..be469c492 100644 --- a/sbin/testEnvironment.pl +++ b/sbin/testEnvironment.pl @@ -29,7 +29,7 @@ print "\nWebGUI is checking your system environment:\n\n"; my ($os, $prereq, $dbi, $dbDrivers); $prereq = 1; -if ($^O =~ /^Win/i) { +if ($^O =~ /Win/) { $os = "Windowsish"; } else { $os = "Linuxish";