From c03e4f67dcc94334a9485652421231a02f1b036a Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 17 Aug 2005 22:33:27 +0000 Subject: [PATCH] more bug fixes --- docs/changelog/6.x.x.txt | 2 ++ lib/WebGUI/Asset.pm | 11 +++++++++++ lib/WebGUI/Operation.pm | 1 + www/extras/tinymce/defaultcontent.css | 5 +++++ 4 files changed, 19 insertions(+) create mode 100644 www/extras/tinymce/defaultcontent.css diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 2409c4f60..ffa188957 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -15,6 +15,8 @@ not get their properties copied from the previous revision. - Set the rich editor to use a bigger font by default if no style sheet specifically setting it was called. + - fix [ 1256549 ] Users are allowed to set url to extras or uploads + - fix [ 1262505 ] Unable to edit group info 6.7.0 diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 4b0cfa823..650f00ff4 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -269,6 +269,17 @@ Any text string. Most likely will have been the Asset's name or title. sub fixUrl { my $self = shift; my $url = WebGUI::URL::urlize(shift); + my @badUrls = ($session{config}{extrasURL}, $session{config}{uploadsURL}); + foreach my $badUrl (@badUrls) { + if ($badUrl =~ /^http/) { + $badUrl =~ s/^http.*\/(.*)$/$1/; + } else { + $badUrl =~ s/^\/(.*)/$1/; + } + if ($url =~ /^$badUrl/) { + $url = "_".$url; + } + } if (length($url) > 250) { $url = substr($url,220); } diff --git a/lib/WebGUI/Operation.pm b/lib/WebGUI/Operation.pm index 7e7db61c6..cf8fdfcab 100644 --- a/lib/WebGUI/Operation.pm +++ b/lib/WebGUI/Operation.pm @@ -102,6 +102,7 @@ sub getOperations { 'deleteGroupConfirm' => 'WebGUI::Operation::Group', 'deleteGroupConfirm' => 'WebGUI::Operation::Group', 'deleteGroupGrouping' => 'WebGUI::Operation::Group', + 'editGroup' => 'WebGUI::Operation::Group', 'editGroupSave' => 'WebGUI::Operation::Group', 'listGroups' => 'WebGUI::Operation::Group', 'emailGroup' => 'WebGUI::Operation::Group', diff --git a/www/extras/tinymce/defaultcontent.css b/www/extras/tinymce/defaultcontent.css new file mode 100644 index 000000000..69c7339c2 --- /dev/null +++ b/www/extras/tinymce/defaultcontent.css @@ -0,0 +1,5 @@ +/* If the site managers don't specify a style sheet to use with the rich editor, we do just to make it readable. */ + +body { + font-size: 15px; +}