diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index b8fc13e99..85374e35e 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -9,6 +9,15 @@ - fix [ 1293947 ] 6.7.3 Cannot use a second AssetProxy with IE, Stack overflow (Wouter van Oijen / ProcoliX) - Added a few more performance enhanceers which can cut the number of database queries per page in half in some cases. + - fix [ 1292597 ] Trash not emptied + - fix [ 1292209 ] purgeTree called in runHourly.pl (6.7.4) + - fix [ 1290600 ] 6.6.5-6.7.0 upgrade script (fix) (Nicklous Roberts) + - fix [ 1288786 ] Names of copied style templates doesnt update. + - fix [ 1292538 ] Template::getList isn't versioned + - fix [ 1241451 ] Images not showing up in TinyMCE + - fix [ 1252786 ] rich edit ie image problem + - fix [ 1284248 ] runHourly.pl moving assets I don't want in trash to trash + 6.7.4 - fix [ 1279861 ] POD errors in 6.7.3 diff --git a/docs/upgrades/upgrade_6.6.5-6.7.0.pl b/docs/upgrades/upgrade_6.6.5-6.7.0.pl index 7778ceeba..c0958c159 100644 --- a/docs/upgrades/upgrade_6.6.5-6.7.0.pl +++ b/docs/upgrades/upgrade_6.6.5-6.7.0.pl @@ -235,7 +235,7 @@ sub addAssetVersioning { } WebGUI::SQL->write("create table assetData ( assetId varchar(22) not null, - revisionDate bigint, + revisionDate bigint not null, revisedBy varchar(22) not null, tagId varchar(22) not null, status varchar(35) not null default 'pending', diff --git a/lib/WebGUI/Asset/RichEdit.pm b/lib/WebGUI/Asset/RichEdit.pm index a0d8a6056..45b339516 100644 --- a/lib/WebGUI/Asset/RichEdit.pm +++ b/lib/WebGUI/Asset/RichEdit.pm @@ -400,7 +400,9 @@ sub getRichEditor { mode => "exact", elements => $nameId, theme => "advanced", - document_base_url => "/", + relative_urls => "false", +# remove_script_host => "false", +# document_base_url => "/", auto_reset_designmode => "true", cleanup_callback => "tinyMCE_WebGUI_Cleanup", urlconvertor_callback => "tinyMCE_WebGUI_URLConvertor", diff --git a/lib/WebGUI/Asset/Template.pm b/lib/WebGUI/Asset/Template.pm index 64e0470ea..1c1355312 100644 --- a/lib/WebGUI/Asset/Template.pm +++ b/lib/WebGUI/Asset/Template.pm @@ -199,7 +199,14 @@ Specify the namespace to build the list for. sub getList { my $class = shift; my $namespace = shift; - return WebGUI::SQL->buildHashRef("select assetData.assetId,assetData.title from template left join asset on asset.assetId=template.assetId left join assetData on asset.assetId=assetData.assetId where template.namespace=".quote($namespace)." and template.showInForms=1 and asset.state='published' and (assetData.status='approved' or assetData.tagId=".quote($session{scratch}{versionTag}).") group by assetData.assetId order by assetData.title",WebGUI::SQL->getSlave); + my $sth = WebGUI::SQL->read("select asset.assetId, max(assetData.revisionDate) from template left join asset on asset.assetId=template.assetId left join assetData on assetData.revisionDate=template.revisionDate and assetData.assetId=template.assetId where template.namespace=".quote($namespace)." and template.showInForms=1 and asset.state='published' and (assetData.status='approved' or assetData.tagId=".quote($session{scratch}{versionTag}).") group by assetData.assetId order by assetData.title",WebGUI::SQL->getSlave); + my %templates; + tie %templates, 'Tie::IxHash'; + while (my ($id, $version) = $sth->array) { + $templates{$id} = WebGUI::Asset::Template->new($id,undef,$version)->getTitle; + } + $sth->finish; + return \%templates; } diff --git a/sbin/Hourly/TrashExpiredContent.pm b/sbin/Hourly/TrashExpiredContent.pm index 0784bab11..5ecffec49 100644 --- a/sbin/Hourly/TrashExpiredContent.pm +++ b/sbin/Hourly/TrashExpiredContent.pm @@ -25,7 +25,7 @@ sub process { asset.assetId=assetData.assetId where assetData.endDate<".$epoch." group by assetData.assetId"); while (my ($assetId, $class, $version) = $sth->array) { my $asset = WebGUI::Asset->new($assetId,$class,$version); - $asset->trash; + $asset->trash if ($asset->get("endDate") < $epoch); } $sth->finish; } diff --git a/www/extras/tinymce/jscripts/webgui.js b/www/extras/tinymce/jscripts/webgui.js index 95661263c..209addb28 100644 --- a/www/extras/tinymce/jscripts/webgui.js +++ b/www/extras/tinymce/jscripts/webgui.js @@ -2,13 +2,14 @@ function tinyMCE_WebGUI_URLConvertor(url, node, on_save) { // The next line would have tried formatting the URL, but we don't want it to - //url = tinyMCE.convertURL(url, node, on_save); + url = tinyMCE.convertURL(url, node, on_save); // Do custom WebUI convertion, replace back ^(); url = url.replace(new RegExp("%5E", "g"), "^"); url = url.replace(new RegExp("%3B", "g"), ";"); url = url.replace(new RegExp("%28", "g"), "("); url = url.replace(new RegExp("%29", "g"), ")"); url = url.replace(/^\/\^/,"^"); + url = url.replace(/http:\/\/\//,"/"); return url; }