From c5bd1b9bd8452c2b8320b27e6d115870a9f72664 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sat, 11 Oct 2008 02:00:29 +0000 Subject: [PATCH] Update the Asset skeleton so that it doesn't try to call the International system with procedural calls. Update International pod to remove procedural calls as well. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/_NewAsset.skeleton | 12 ++++++++---- lib/WebGUI/International.pm | 10 +--------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 7532ac534..471e940c7 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -37,6 +37,7 @@ Khoe) - fixed #8802: isImage not functioning in Folders - added RFE #480: Apply button for assets + - fixed #8807: _NewAsset.skeleton out of date 7.6.0 - added: users may now customize the post received page for the CS diff --git a/lib/WebGUI/Asset/_NewAsset.skeleton b/lib/WebGUI/Asset/_NewAsset.skeleton index 92ec55fe8..ae49a4647 100644 --- a/lib/WebGUI/Asset/_NewAsset.skeleton +++ b/lib/WebGUI/Asset/_NewAsset.skeleton @@ -230,15 +230,19 @@ sub view { =head2 www_edit ( ) -Web facing method which is the default edit page +Web facing method which is the default edit page. Unless the method needs +special handling or formatting, it does not need to be included in +the module. =cut sub www_edit { my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - return $self->session->privilege->locked() unless $self->canEditIfLocked; - return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('edit asset',"Asset_NewAsset")); + my $session = $self->session; + return $session->privilege->insufficient() unless $self->canEdit; + return $session->privilege->locked() unless $self->canEditIfLocked; + my $i18n = WebGUI::International->new($session, 'Asset_NewAsset'); + return $self->getAdminConsole->render($self->getEditForm->print, $i18n->get('edit asset')); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/International.pm b/lib/WebGUI/International.pm index ea48c70e1..0451e07cf 100644 --- a/lib/WebGUI/International.pm +++ b/lib/WebGUI/International.pm @@ -31,15 +31,7 @@ This package provides an interface to the internationalization system. =head1 SYNOPSIS use WebGUI::International; - $string = WebGUI::International::get($session,$internationalId,$namespace); - $hashRef = WebGUI::International::getLanguage($session,$lang); - $hashRef = WebGUI::International::getLanguages($session); - $url = WebGUI::International::makeUrlCompliant($session,$url); - -This package can also be used in object-oriented (OO) style. - - use WebGUI::International; - my $i = WebGUI::International->new($session,$namespace); + my $i = WebGUI::International->new($session, $namespace); $string = $i->get($internationalId); $string = $i->get($internationalId, $otherNamespace);