diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index bdc9f5e23..70560e7ba 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -10,6 +10,7 @@ - fixed #11708: Activity DeleteExpiredSessions is too slow - fixed #11621: Documentation Error: Methods that accept URLs should indicate whether or not to include Gateway - fixed #11457: Carousel broken + - fixed #11455: Wrong use of Extras macro? 7.9.8 - fixed #11651: First Day of Week is a string... diff --git a/docs/upgrades/packages-7.9.9/default_ldap_anonymous_registration_template.wgpkg b/docs/upgrades/packages-7.9.9/default_ldap_anonymous_registration_template.wgpkg new file mode 100644 index 000000000..fc7d0b604 Binary files /dev/null and b/docs/upgrades/packages-7.9.9/default_ldap_anonymous_registration_template.wgpkg differ diff --git a/docs/upgrades/packages-7.9.9/default_webgui_anonymous_registration_template.wgpkg b/docs/upgrades/packages-7.9.9/default_webgui_anonymous_registration_template.wgpkg new file mode 100644 index 000000000..d398c886e Binary files /dev/null and b/docs/upgrades/packages-7.9.9/default_webgui_anonymous_registration_template.wgpkg differ diff --git a/docs/upgrades/packages-7.9.9/greenportal_calendar_greenportal_calendarmonth.wgpkg b/docs/upgrades/packages-7.9.9/greenportal_calendar_greenportal_calendarmonth.wgpkg new file mode 100644 index 000000000..0dfbd5389 Binary files /dev/null and b/docs/upgrades/packages-7.9.9/greenportal_calendar_greenportal_calendarmonth.wgpkg differ diff --git a/docs/upgrades/packages-7.9.9/root_import_account_inbox_default-inbox-send-message-template.wgpkg b/docs/upgrades/packages-7.9.9/root_import_account_inbox_default-inbox-send-message-template.wgpkg new file mode 100644 index 000000000..07ae61705 Binary files /dev/null and b/docs/upgrades/packages-7.9.9/root_import_account_inbox_default-inbox-send-message-template.wgpkg differ diff --git a/docs/upgrades/packages-7.9.9/root_import_calendar-templates_default-calendar-month.wgpkg b/docs/upgrades/packages-7.9.9/root_import_calendar-templates_default-calendar-month.wgpkg new file mode 100644 index 000000000..055c94f4b Binary files /dev/null and b/docs/upgrades/packages-7.9.9/root_import_calendar-templates_default-calendar-month.wgpkg differ diff --git a/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission-main.wgpkg b/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission-main.wgpkg new file mode 100644 index 000000000..5cd8cf179 Binary files /dev/null and b/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission-main.wgpkg differ diff --git a/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission-queue.wgpkg b/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission-queue.wgpkg new file mode 100644 index 000000000..d93cc9f27 Binary files /dev/null and b/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission-queue.wgpkg differ diff --git a/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission.wgpkg b/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission.wgpkg new file mode 100644 index 000000000..28cd8e598 Binary files /dev/null and b/docs/upgrades/packages-7.9.9/root_import_ems_ems-event-submission.wgpkg differ diff --git a/docs/upgrades/packages-7.9.9/stockdatatmpl000000001.wgpkg b/docs/upgrades/packages-7.9.9/stockdatatmpl000000001.wgpkg new file mode 100644 index 000000000..82f753636 Binary files /dev/null and b/docs/upgrades/packages-7.9.9/stockdatatmpl000000001.wgpkg differ diff --git a/t/badExtrasMacros.t b/t/badExtrasMacros.t new file mode 100644 index 000000000..f6af6186c --- /dev/null +++ b/t/badExtrasMacros.t @@ -0,0 +1,62 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2009 Plain Black Corporation. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------- +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------- + +use FindBin; +use strict; +use warnings; +use lib "$FindBin::Bin/lib"; ##t/lib + +use WebGUI::Test; +use WebGUI::Session; +use Data::Dumper; +use WebGUI::Asset::Template; + +#The goal of this test is to locate poorly used macros in the default +#templates; + +use Test::More; # increment this value for each test you create +my $numTests = 0; + +my $session = WebGUI::Test->session; +my $lib = WebGUI::Test->lib; + +##Find the name of the International macro in the user's config file. + +#note "International macro name = $international"; + +##Regexp setup for parsing out the Macro calls. +my $macro = qr{ + \^ + Extras + (?: \( \) )? + ; + }xms; + +# put your tests here + +$numTests = $session->db->quickScalar('select count(distinct(assetId)) from template'); + +plan tests => $numTests; + +my $getATemplate = WebGUI::Asset::Template->getIsa($session); + +my @templateLabels; + +while (my $templateAsset = $getATemplate->()) { + my $template = $templateAsset->get('template'); + my $header = $templateAsset->get('extraHeadTags'); + my $match = ($template =~ $macro); + if ($header) { + $match ||= ($header =~ $macro); + } + ok(!$match, sprintf "%s: %s (%s) has no bad extras macros", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl); +} + +