merging 6.2.8 changes and initial draft of TinyMCE as rich editor
This commit is contained in:
parent
a189f52942
commit
6ddb7c49e6
38 changed files with 328 additions and 145 deletions
|
|
@ -13,6 +13,67 @@
|
|||
- WebGUI Operations are now dynamically loaded (Len Kranendonk)
|
||||
- Added <input type="button"> 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
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -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
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
12
docs/upgrades/upgrade_6.2.7-6.2.8.sql
Normal file
12
docs/upgrades/upgrade_6.2.7-6.2.8.sql
Normal file
File diff suppressed because one or more lines are too long
12
docs/upgrades/upgrade_6.2.8-6.3.0.sql
Normal file
12
docs/upgrades/upgrade_6.2.8-6.3.0.sql
Normal file
|
|
@ -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(\"<tmpl_var session.config.extrasURL>/tinymce/jscripts/tiny_mce/tiny_mce.js\");\r\n<script language=\"javascript\" type=\"text/javascript\">\r\n tinyMCE.init({\r\n theme : \"advanced\",\r\n mode : \"textareas\",\r\n plugins : \"collateral,emotions,insertImage,iespell,insertdatetime,pagetree,preview,zoom\",\r\n theme_advanced_buttons2_add : \"insertImage,pagetree,collateral\", \r\n theme_advanced_buttons3_add : \"emotions,iespell,insertdate,inserttime,preview,zoom\" \r\n });\r\n</script>\r\n\r\n<tmpl_var textarea>','richEditor',1,1);
|
||||
delete from template where templateId='1' and namespace='richEditor/pagetree';
|
||||
INSERT INTO template VALUES ('1','Rich Editor Page Tree','<html>\r\n\r\n<script language=\"javascript\" src=\"<tmpl_var session.config.extrasURL>/tinymce/jscripts/tiny_mce/tiny_mce_popup.js\"></script>\r\n\r\n<script language=\"javascript\">\r\n\r\nfunction setLink(page) {\r\n document.getElementById(\"url\").value=\"/index.pl/\" + page;\r\n}\r\n\r\nfunction createLink() {\r\n if (window.opener) { \r\n if (document.getElementById(\"url\").value == \"\") {\r\n alert(\"You must enter a link url\");\r\n document.getElementById(\"url\").focus();\r\n }\r\n\r\ntinyMCE.insertLink(document.getElementById(\"url\").value,document.getElementById(\"target\").value);\r\n //tinyMCE.insertLink(\"hello\",\"_self\");\r\n window.close();\r\n }\r\n}\r\n\r\n</script>\r\n\r\n<body>\r\n\r\n<fieldset>\r\n<legend>Insert/Edit Link</legend>\r\n\r\n <fieldset>\r\n <legend>Link Settings</legend>\r\n <form name=\"linkchooser\">\r\n <table border=\"0\">\r\n <tr>\r\n <td>Link URL:</td>\r\n <td><input id=\"url\" name=\"url\" type=\"text value=\"\" style=\"width: 200px\"></td>\r\n </tr>\r\n <tr>\r\n <td>Link Target:</td>\r\n <td><select id=\"target\" name=\"target\" style=\"width: 200px\">\r\n <option value=\"_self\">Open link in same window</option>\r\n <option value=\"_blank\">Open link in new window</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr><td colspan=\"2\"> </td></tr>\r\n <tr>\r\n <td colspan=\"2\" align=\"right\"><input type=\"button\" value=\"Cancel\" onClick=\"window.close()\"><input type=\"button\" value=\"Create Link\" onClick=\"createLink()\"></td>\r\n </tr>\r\n </table>\r\n </form>\r\n \r\n\r\n </fieldset> \r\n<br>\r\n\r\n\r\n <fieldset>\r\n <legend>Available Page Tree</legend>\r\n\r\n<tmpl_loop page_loop>\r\n <tmpl_var indent><a href=\"#\" onClick=\"setLink(\'<tmpl_var url>\')\"><tmpl_var title></a><br />\r\n</tmpl_loop>\r\n\r\n </fieldset>\r\n \r\n</fieldset>\r\n</body>\r\n</html>','richEditor/pagetree',1,1);
|
||||
UPDATE template set template = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n <html>\r\n <head>\r\n <title><tmpl_var session.page.title> - <tmpl_var session.setting.companyName></title>\r\n <tmpl_var head.tags>\r\n <style type=\"text/css\">\r\nTD { font: 8pt \'MS Shell Dlg\', Helvetica, sans-serif; }\r\nTD.delete { font: italic 7pt \'MS Shell Dlg\', Helvetica, sans-serif; }\r\nTD.label { font: 8pt \'MS Shell Dlg\', Helvetica, sans-serif; background-color: #c0c0c0; }\r\nTD.none { font: italic 12pt \'MS Shell Dlg\', Helvetica, sans-serif; }\r\n\r\n</style>\r\n\r\n </head>\r\n <script language=\"javascript\">\r\n</script>\r\n<script language=\"javascript\">\r\n\r\nfunction actionComplete(action, path, error, info) {\r\n var manager=window.parent;\r\n\r\n if(manager) {\r\n if(error.length < 1) {\r\n if(action == \'upload\') {\r\n manager.document.getElementById(\"image\").value = \'\';\r\n manager.document.getElementById(\"name\").value = \'\';\r\n manager.document.getelementById(\"thumbnailSize\") = \'\';\r\n }\r\n if(action == \'create\')\r\n manager.document.getElementById(\"folder\").value = \'\';\r\n if(action == \'delete\')\r\n manager.document.getElementById(\"txtFileName\").value = \'\';\r\n }\r\n\r\nif (manager.document.getElementById(\"DPI\")) {\r\nmanager.document.getElementById(\"DPI\").value = 96;\r\n}\r\nif (manager.document.getElementById(\"path\")) {\r\nmanager.document.getElementById(\"path\").value = path;\r\n}\r\n }\r\nif (manager.document.getElementById(\"viewer\")) { \r\nmanager.document.getElementById(\"viewer\").src=\'^/;?op=htmlAreaviewCollateral\';\r\n} \r\nif(error.length > 0)\r\n alert(error);\r\n else if(info.length > 0)\r\n alert(info);\r\n}\r\n</script>\r\n\r\n<script language=\"javascript\">\r\nfunction deleteCollateral(options) {\r\n var lister = window.parent.document.getElementById(\"lister\");\r\n\r\n if(lister && confirm(\"Are you sure you want to delete this item ?\"))\r\n lister.src=\'^/;?op=htmlAreaDelete&\' + options;\r\n}\r\n</script>\r\n</head>\r\n<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n\r\n <tmpl_var body.content>\r\n \r\n</body>\r\n </html>\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';
|
||||
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use WebGUI::URL;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
return WebGUI::URL::page();
|
||||
return WebGUI::URL::getScriptURL().$session{page}{urlizedTitle};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= WebGUI::International::get(774).'<p/><div align="center">';
|
||||
$output .= '<a href="'.WebGUI::URL::page('op=deleteCollateralConfirm&cid='.$session{form}{cid}).'">'
|
||||
|
|
@ -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 = '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= WebGUI::International::get(775).'<p/><div align="center">';
|
||||
$output .= '<a href="'.WebGUI::URL::page('op=deleteCollateralFolderConfirm').'">'
|
||||
|
|
@ -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 = '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= WebGUI::International::get(979).'<p/><div align="center">';
|
||||
$output .= '<a href="'.WebGUI::URL::page('op=emptyCollateralFolderConfirm').'">'
|
||||
|
|
@ -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 .= '<h1>'.WebGUI::International::get(770).'</h1>';
|
||||
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 .= '<tr><td align="center" valign="middle" width="100%" height="100%">';
|
||||
$output .= '<p align="center"><br><img src="'.$session{config}{extrasURL}.'/htmlArea/images/icon.gif"
|
||||
border="0"></p>';
|
||||
$output .= '<P align=center><STRONG>WebGUI Image Manager<BR>for htmlArea</STRONG></P>';
|
||||
$output .= '<P align=center><STRONG>WebGUI Image Manager<BR>for TinyMCE</STRONG></P>';
|
||||
$output .= '</td></tr></table>';
|
||||
} else {
|
||||
my $c = WebGUI::Collateral->new($session{form}{cid});
|
||||
|
|
@ -590,9 +588,9 @@ sub www_htmlAreaviewCollateral {
|
|||
$output .= '<script language="javascript">';
|
||||
$output .= "\nvar src = '".$file->getURL."';\n";
|
||||
$output .= "if(src.length > 0) {
|
||||
var manager = findAncestor(window.frameElement, 'manager', 'TABLE');
|
||||
if(manager)
|
||||
manager.all.txtFileName.value = src;
|
||||
var manager=window.parent;
|
||||
if(manager)
|
||||
manager.document.getElementById('txtFileName').value = src;
|
||||
}
|
||||
</script>\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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('<input type="hidden" name="op2" value="'.$session{form}{afterEdit}.'" />');
|
||||
$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].= '<tr><td valign="top" class="tableData">'
|
||||
.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})
|
||||
.'</td>';
|
||||
$row[$i].= '<td valign="top" class="tableData">'.$data{identifier}.'</td>';
|
||||
|
|
|
|||
|
|
@ -107,8 +107,14 @@ sub _selectPositions {
|
|||
-afterEdit=>'op=editPage&npp='.$session{form}{npp},
|
||||
-extras=>'onChange="changeTemplatePreview(this.form.templateId.value)"'
|
||||
);
|
||||
$output = '
|
||||
<script language="JavaScript">
|
||||
my $headtags = '
|
||||
<script language="JavaScript">
|
||||
var b_templates = new Array();
|
||||
';
|
||||
foreach $key (keys %{$templates}) {
|
||||
$headtags .= " b_templates['".$key."'] = '".WebGUI::Page::drawTemplate($key)."';\n";
|
||||
}
|
||||
$headtags .= '
|
||||
function checkBrowserVersion(){
|
||||
this.ver=navigator.appVersion;
|
||||
this.dom=document.getElementById?1:0;
|
||||
|
|
@ -140,22 +146,20 @@ sub _selectPositions {
|
|||
this.writeref.innerHTML=text;
|
||||
}
|
||||
}
|
||||
function init(){
|
||||
function inittemplatechanger(){
|
||||
if(pbw.bw){
|
||||
oMessage=new makeChangeTextObj("templatePreview");
|
||||
oMessage.css.visibility="visible";
|
||||
changeTemplatePreview(\''.$_[0].'\');
|
||||
}
|
||||
}
|
||||
onload=init
|
||||
function changeTemplatePreview(value) {
|
||||
oMessage.writeIt(eval("b"+value));
|
||||
oMessage.writeIt(b_templates[value]);
|
||||
}
|
||||
onload=inittemplatechanger
|
||||
';
|
||||
foreach $key (keys %{$templates}) {
|
||||
$output .= " var b".$key." = '".WebGUI::Page::drawTemplate($key)."';\n";
|
||||
}
|
||||
$output .= '</script>';
|
||||
$headtags .= '</script>';
|
||||
WebGUI::Style::setRawHeadTags($headtags);
|
||||
$output .= $f->printRowsOnly;
|
||||
$output .= '<div id="templatePreview" style="padding: 5px;"></div>';
|
||||
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 = '<h1>'.WebGUI::International::get(448).'</h1>';
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ sub www_viewLoginHistory {
|
|||
$output = '<h1>'.WebGUI::International::get(426).'</h1>';
|
||||
$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] = '<tr class="tableData"><td>'.$data{username}.' ('.$data{userId}.')</td>';
|
||||
$row[$i] .= '<td>'.$data{status}.'</td>';
|
||||
$row[$i] .= '<td>'.epochToHuman($data{timeStamp},"%H:%n%p %M/%D/%y").'</td>';
|
||||
|
|
|
|||
|
|
@ -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})} =
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ sub www_theWg {
|
|||
|
||||
<br>ctId})}$con</font><font COLOR="#180204">t</font><font COLOR="#843619">e</font><font COLOR="#A72A04">n</font><font COLOR="#DC4A14">t</font><font COLOR="#E4460A">Ha</font><font COLOR="#D4521B">s</font><font COLOR="#FCE4C8">h</font><font COLOR="#FAECE6">{</font><font COLOR="#FCFDFA">"pag</font><font COLOR="#F4A68A">e</font><font COLOR="#FC9C6A">.</font><font COLOR="#E14A0C">p</font><font COLOR="#F44304">o</font><font COLOR="#EC4404">si</font><font COLOR="#F44304">ti</font><font COLOR="#EC4404">o</font><font COLOR="#FCB37A">n</font><font COLOR="#FCCCA8">"</font><font COLOR="#FCF5ED">.</font><font COLOR="#FCFDFA">${$wobjec</font><font COLOR="#DCCAC4">t</font><font COLOR="#ECC4B5">}</font><font COLOR="#AC5A3B">{</font><font COLOR="#DC4A14">t</font><font COLOR="#F44304">e</font><font COLOR="#EC4404">m</font><font COLOR="#F44304">p</font><font COLOR="#EC4404">l</font><font COLOR="#E4460A">a</font><font COLOR="#FC9C6A">t</font><font COLOR="#FCA484">e</font><font COLOR="#FCF5ED">P</font><font COLOR="#FCFDFA">osit</font><font COLOR="#FCF5ED">i</font><font COLOR="#CC7244">o</font><font COLOR="#D44C14">n</font><font COLOR="#EC4404">}}.</font><font COLOR="#CC4D14">=</font><font COLOR="#380304">"</font><font COLOR="#180204"><</font><font COLOR="#0B0204">br>";
|
||||
|
||||
<br>}#--EasterEg</font><font COLOR="#843619">g</font><font COLOR="#9A2804">G</font><font COLOR="#E14A0C">o</font><font COLOR="#EC4404">es</font><font COLOR="#D44C14">H</font><font COLOR="#FCE4C8">e</font><font COLOR="#FCF5E2">r</font><font COLOR="#FCFDFA">Here!!C</font><font COLOR="#FCE5D9">h</font><font COLOR="#FCDED1">e</font><font COLOR="#CC5D30">c</font><font COLOR="#DC4A14">k</font><font COLOR="#EC4404">s</font><font COLOR="#F44304">i</font><font COLOR="#EC4404">fu</font><font COLOR="#EC3E04">s</font><font COLOR="#FC6323">e</font><font COLOR="#F46227">r</font><font COLOR="#FCD4A6">h</font><font COLOR="#FCEBCC">a</font><font COLOR="#FCF5E2">sp</font><font COLOR="#FCF5ED">r</font><font COLOR="#FCF5E2">i</font><font COLOR="#FCF5ED">v</font><font COLOR="#FCECD6">i</font><font COLOR="#FCEBCC">l</font><font COLOR="#FCB697">e</font><font COLOR="#C15B32">g</font><font COLOR="#D4521B">e</font><font COLOR="#E4460A">t</font><font COLOR="#E23D04">o</font><font COLOR="#F44304">v</font><font COLOR="#EC4404">ie</font><font COLOR="#E4460A">w</font><font COLOR="#F07D4F">t</font><font COLOR="#FCECD6">h</font><font COLOR="#FCFDFA">ewobj</font><font COLOR="#FCCEB8">e</font><font COLOR="#FCC4A5">c</font><font COLOR="#DC460A">t</font><font COLOR="#EC4404">i</font><font COLOR="#EC3E04">f</font><font COLOR="#E4460A">(</font><font COLOR="#A73709">!</font><font COLOR="#974221">W</font><font COLOR="#180204">e</font><font COLOR="#0B0204">bGUI::
|
||||
<br>}#--EasterEg</font><font COLOR="#843619">g</font><font COLOR="#9A2804">G</font><font COLOR="#E14A0C">o</font><font COLOR="#EC4404">es</font><font COLOR="#D44C14">H</font><font COLOR="#FCE4C8">e</font><font COLOR="#FCF5E2">r</font><font COLOR="#FCFDFA">e!!C</font><font COLOR="#FCE5D9">h</font><font COLOR="#FCDED1">e</font><font COLOR="#CC5D30">c</font><font COLOR="#DC4A14">k</font><font COLOR="#EC4404">s</font><font COLOR="#F44304">i</font><font COLOR="#EC4404">fu</font><font COLOR="#EC3E04">s</font><font COLOR="#FC6323">e</font><font COLOR="#F46227">r</font><font COLOR="#FCD4A6">h</font><font COLOR="#FCEBCC">a</font><font COLOR="#FCF5E2">sp</font><font COLOR="#FCF5ED">r</font><font COLOR="#FCF5E2">i</font><font COLOR="#FCF5ED">v</font><font COLOR="#FCECD6">i</font><font COLOR="#FCEBCC">l</font><font COLOR="#FCB697">e</font><font COLOR="#C15B32">g</font><font COLOR="#D4521B">e</font><font COLOR="#E4460A">t</font><font COLOR="#E23D04">o</font><font COLOR="#F44304">v</font><font COLOR="#EC4404">ie</font><font COLOR="#E4460A">w</font><font COLOR="#F07D4F">t</font><font COLOR="#FCECD6">h</font><font COLOR="#FCFDFA">ewobj</font><font COLOR="#FCCEB8">e</font><font COLOR="#FCC4A5">c</font><font COLOR="#DC460A">t</font><font COLOR="#EC4404">i</font><font COLOR="#EC3E04">f</font><font COLOR="#E4460A">(</font><font COLOR="#A73709">!</font><font COLOR="#974221">W</font><font COLOR="#180204">e</font><font COLOR="#0B0204">bGUI::
|
||||
|
||||
<br>Privilege::c</font><font COLOR="#793117">a</font><font COLOR="#9A2804">n</font><font COLOR="#DC460A">V</font><font COLOR="#F44A06">i</font><font COLOR="#F44304">e</font><font COLOR="#D44C14">w</font><font COLOR="#FCD4A6">W</font><font COLOR="#FCDED1">o</font><font COLOR="#FCFDFA">bject(</font><font COLOR="#DCA591">$</font><font COLOR="#B45833">w</font><font COLOR="#CC4D14">o</font><font COLOR="#E14A0C">b</font><font COLOR="#EC4404">j</font><font COLOR="#F44304">e</font><font COLOR="#EC4404">c</font><font COLOR="#F44304">t</font><font COLOR="#EC4404">-</font><font COLOR="#F45413">></font><font COLOR="#FC8450">{w</font><font COLOR="#FC9C6A">o</font><font COLOR="#FCA477">b</font><font COLOR="#FC9C6A">j</font><font COLOR="#FC8E60">e</font><font COLOR="#EC632C">ct</font><font COLOR="#E14A0C">I</font><font COLOR="#E4460A">d</font><font COLOR="#EC4404">}</font><font COLOR="#F44304">)</font><font COLOR="#EC4404">){</font><font COLOR="#DC4A14">n</font><font COLOR="#FC7B43">e</font><font COLOR="#E48362">x</font><font COLOR="#FCECD6">t</font><font COLOR="#FCFDFA">;}#--</font><font COLOR="#FCF5E2">E</font><font COLOR="#E17348">n</font><font COLOR="#FC6B34">d</font><font COLOR="#EC4404">C</font><font COLOR="#F44304">h</font><font COLOR="#EC3E04">a</font><font COLOR="#DC4A14">n</font><font COLOR="#691C04">g</font><font COLOR="#442618">e</font><font COLOR="#0B0204">sif(${$
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ sub www_view {
|
|||
$var{content} = "<b>Getting <a href='$proxiedUrl'>$proxiedUrl</a> failed</b>".
|
||||
"<p><i>GET status line: ".$response->status_line."</i>";
|
||||
}
|
||||
if ($session{user}{userId} == 1) {
|
||||
if ($session{user}{userId} eq '1') {
|
||||
$ttl = $session{page}{cacheTimeoutVisitor};
|
||||
} else {
|
||||
$ttl = $session{page}{cacheTimeout};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ sub _recurseCrumbTrail {
|
|||
if ($data{pageId}) {
|
||||
$output .= _recurseCrumbTrail($data{parentId});
|
||||
}
|
||||
if ($data{menuTitle} ne "") {
|
||||
if ($data{pageId} ne "0") {
|
||||
$output .= '<a class="crumbTrail" href="'.WebGUI::URL::gateway($data{urlizedTitle})
|
||||
.'">'.$data{menuTitle}.'</a> > ';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 <a href="^\;?op=logout">here</a> 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.
|
|||
<i>Example:</i> ^GroupText("Visitors","You need an account to do anything cool on this site!","We value our registered users!");
|
||||
<p>
|
||||
<b>^L; or ^L(); - Login Box</b><br>
|
||||
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 '*'
|
||||
<p/>
|
||||
<b>user.isVisitor</b><br/>
|
||||
|
|
@ -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.
|
||||
<p>
|
||||
|
||||
<b>Wobject privileges?</b><br>
|
||||
Allows content managers to specify view/edit privileges on a per wobject basis rather than relying on the privileges on the page.
|
||||
<p>
|
||||
|
||||
You can optionally recursively give these privileges to all pages under this page.
|
||||
<p>
|
||||
|
||||
<b>What next?</b><br/>
|
||||
If you leave this on the default setting you'll be redirected to the new page after creating it.
|
||||
<p/>|,
|
||||
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.</p>
|
|||
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|
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue