X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fetc%2Fupgrade%2F3.8.0%2Fcontent;h=ae3a9fc0b1f0a5f21a7bdb537d40e8c205f2caa6;hb=606acab48f55da2b8846e5539839d591b63ae18c;hp=f4e389b90a56bddfe8c8b213c9ed110fa75b5f58;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git diff --git a/rt/etc/upgrade/3.8.0/content b/rt/etc/upgrade/3.8.0/content index f4e389b90..ae3a9fc0b 100644 --- a/rt/etc/upgrade/3.8.0/content +++ b/rt/etc/upgrade/3.8.0/content @@ -1,21 +1,24 @@ -@Final = ( +use strict; +use warnings; + +our @Final = ( # by incident we've changed 'My Bookmarks' to 'Bookmarked Tickets' when # 3.7.82 upgrade script still was creating 'My Bookmarks', try to fix it sub { - $RT::Logger->debug("Going to rename 'My Bookmarks' to 'Bookmarked Tickets'"); - my $sys = RT::System->new($RT::SystemUser); + RT->Logger->debug("Going to rename 'My Bookmarks' to 'Bookmarked Tickets'"); + my $sys = RT::System->new(RT->SystemUser); - my $attrs = RT::Attributes->new( $RT::SystemUser ); + my $attrs = RT::Attributes->new( RT->SystemUser ); $attrs->LimitToObject( $sys ); my ($attr) = $attrs->Named( 'Search - My Bookmarks' ); unless ($attr) { - $RT::Logger->debug("You have no global search 'My Bookmarks'. Skipped."); + RT->Logger->debug("You have no global search 'My Bookmarks'. Skipped."); return 1; } my ($status, $msg) = $attr->SetName( 'Search - Bookmarked Tickets' ); - $RT::Logger->error($msg) and return undef unless $status; + RT->Logger->error($msg) and return undef unless $status; - $RT::Logger->debug("Renamed."); + RT->Logger->debug("Renamed."); return 1; }, );