From fd57cbaa51fbfca73cb9b3d77d4d8433a9d88f69 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 23 May 2005 15:02:23 +0000 Subject: [PATCH] fixed a bunch of bugs --- docs/changelog/6.x.x.txt | 7 +++++++ lib/WebGUI/AdminConsole.pm | 2 +- lib/WebGUI/Asset/Redirect.pm | 3 ++- lib/WebGUI/Asset/RichEdit.pm | 1 + lib/WebGUI/Form.pm | 2 +- lib/WebGUI/HTTP.pm | 7 ++++++- lib/WebGUI/Session.pm | 7 ++++++- www/extras/tinymce/jscripts/webgui.js | 2 +- 8 files changed, 25 insertions(+), 6 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index ab79ac67a..9d4d62ed7 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -33,7 +33,12 @@ - fix [ 1204123 ] Bug: sortby.lastreply.url - fix [ 1203779 ] "Remove" Button in FileUploadControl not internationalized - fix [ 1201650 ] Server-wide Cache can be viewed/cleared by an admin + - fix [ 1205128 ] typo in \lib\WebGUI\AdminConsole.pm + - Fixed a bug with macro quotes and TinyMCE. - fix [ 1197095 ] runHourly not finishing + - Fixed a bug with the rich editor locking up when switching between tabs. + - fix [ 1187256 ] WG v6.5.6 incompatible with mod_perl v2.0.0RC5? (Koen de + Jonge) 6.6.0 @@ -120,6 +125,8 @@ - fix [ 1180291 ] tinymce resets src of img incorrectly - fix [ 1186395 ] survey: view statisics broken - RFE 1035743, internationalize WebGUI macros. + - Redirects now process macros in the redirect URL. + - You can now tie LDAP groups to WebGUI groups. 6.5.6 diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index 6216115ad..98d6e7243 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -34,7 +34,7 @@ Package to manipulate items in WebGUI's asset system. Replaces Collateral. An asset is the basic class of content in WebGUI. This handles security, urls, and other basic information common to all content items. -A lineage is a concatenated series of sequence numbers, each six digits long, that explain an asset's position in its familiy tree. Lineage describes who the asset's anscestors are, how many ancestors the asset has in its family tree (lineage length), and the asset's position (rank) amongst its siblings. In addition, lineage provides enough information about an asset to generate a list of its siblings and descendants. +A lineage is a concatenated series of sequence numbers, each six digits long, that explain an asset's position in its familiy tree. Lineage describes who the asset's ancestors are, how many ancestors the asset has in its family tree (lineage length), and the asset's position (rank) amongst its siblings. In addition, lineage provides enough information about an asset to generate a list of its siblings and descendants. use WebGUI::Asset; diff --git a/lib/WebGUI/Asset/Redirect.pm b/lib/WebGUI/Asset/Redirect.pm index 862962f72..c3a88eb1a 100644 --- a/lib/WebGUI/Asset/Redirect.pm +++ b/lib/WebGUI/Asset/Redirect.pm @@ -17,6 +17,7 @@ package WebGUI::Asset::Redirect; use strict; use WebGUI::Asset; use WebGUI::HTTP; +use WebGUI::Macro; use WebGUI::Session; our @ISA = qw(WebGUI::Asset); @@ -150,7 +151,7 @@ sub www_view { if ($session{var}{adminOn}) { return $self->getContainer->www_view; } -WebGUI::HTTP::setRedirect($self->get("redirectUrl")) unless $self->newByUrl($self->get("redirectUrl"))->getUrl eq $self->getUrl; + WebGUI::HTTP::setRedirect(WebGUI::Macro::process($self->get("redirectUrl"))) unless $self->newByUrl($self->get("redirectUrl"))->getUrl eq $self->getUrl; return "Redirect is self-referential"; } diff --git a/lib/WebGUI/Asset/RichEdit.pm b/lib/WebGUI/Asset/RichEdit.pm index c91514544..44f21fc2e 100644 --- a/lib/WebGUI/Asset/RichEdit.pm +++ b/lib/WebGUI/Asset/RichEdit.pm @@ -412,6 +412,7 @@ sub getRichEditor { mode => "specific_textareas", theme => "advanced", document_base_url => "/", + auto_reset_designmode => "true", cleanup_callback => "tinyMCE_WebGUI_Cleanup", urlconvertor_callback => "tinyMCE_WebGUI_URLConvertor", theme_advanced_buttons1 => join(",",@toolbarRow1), diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index c0dbbd82e..d66539bf0 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -1432,7 +1432,7 @@ sub phone { return text({ name=>$params->{name}, maxlength=>$maxLength, - extras=>'onKeyUp="doInputCheck(this.form.'.$params->{name}.',\'0123456789-()+ \')" '.$params->{extras}, + extras=>'onkeyup="doInputCheck(this.form.'.$params->{name}.',\'0123456789-()+ \')" '.$params->{extras}, value=>$params->{value}, size=>$params->{size}, defaultValue=>$params->{defaultValue} diff --git a/lib/WebGUI/HTTP.pm b/lib/WebGUI/HTTP.pm index 106f62b0d..bc570d7b7 100644 --- a/lib/WebGUI/HTTP.pm +++ b/lib/WebGUI/HTTP.pm @@ -80,7 +80,12 @@ sub getHeader { $params{"-cookie"} = $session{http}{cookie}; my $status = getStatus(); if($session{env}{MOD_PERL}) { - my $r = Apache->request; + my $r; + if ($$mod_perl::VERSION >= 1.999023) { + $r = Apache2::RequestUtil->request; + } else { + $r = Apache->request; + } if(defined($r)) { $r->custom_response($status, '' ); $r->status($status); diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 31d48273f..7d936339c 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -118,7 +118,12 @@ sub _setupUserInfo { } $session{user} = \%user; if ($session{env}{MOD_PERL}) { - my $r = Apache->request; + my $r; + if ($$mod_perl::VERSION >= 1.999023) { + $r = Apache2::RequestUtil->request; + } else { + $r = Apache->request; + } if(defined($r)) { $r->user($session{user}{username}); } diff --git a/www/extras/tinymce/jscripts/webgui.js b/www/extras/tinymce/jscripts/webgui.js index e32461812..078d969ad 100644 --- a/www/extras/tinymce/jscripts/webgui.js +++ b/www/extras/tinymce/jscripts/webgui.js @@ -14,7 +14,7 @@ function tinyMCE_WebGUI_URLConvertor(url, node, on_save) { return url; } -function tinyMCE_WebGUI_Cleanup(content) { +function tinyMCE_WebGUI_Cleanup(type,content) { return content.replace(new RegExp(""","g"),'"'); }