From 0bef2b2839e176b599b4dc14614f1275333f77ef Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 9 May 2010 14:30:47 -0700 Subject: [PATCH] Change the core to use newById instead of new. --- lib/WebGUI/Macro/PickLanguage.pm | 2 +- lib/WebGUI/Shop/Pay.pm | 2 +- lib/WebGUI/Shop/Transaction.pm | 2 +- lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/WebGUI/Macro/PickLanguage.pm b/lib/WebGUI/Macro/PickLanguage.pm index a1af2a40b..750867efd 100644 --- a/lib/WebGUI/Macro/PickLanguage.pm +++ b/lib/WebGUI/Macro/PickLanguage.pm @@ -44,7 +44,7 @@ This macro takes a templateId to show the links sub process { my $session = shift; my $templateId = shift || "_aE16Rr1-bXBf8SIaLZjCg"; - my $template = WebGUI::Asset::Template->new($session, $templateId); + my $template = WebGUI::Asset::Template->newById($session, $templateId); return "Could not instanciate template with id [$templateId]" unless $template; my $i18n = WebGUI::International->new($session); my $languages = $i18n->getLanguages(); diff --git a/lib/WebGUI/Shop/Pay.pm b/lib/WebGUI/Shop/Pay.pm index 8d1c91a52..bdb54fad0 100644 --- a/lib/WebGUI/Shop/Pay.pm +++ b/lib/WebGUI/Shop/Pay.pm @@ -431,7 +431,7 @@ sub www_selectPaymentGateway { } $var->{ paymentGateways } = \@paymentGateways; $var->{ choose } = $i18n->get('choose payment gateway message'); - my $template = WebGUI::Asset::Template->new($session, $session->setting->get("selectGatewayTemplateId")); + my $template = WebGUI::Asset::Template->newById($session, $session->setting->get("selectGatewayTemplateId")); return $session->style->userStyle($template->process($var)); } diff --git a/lib/WebGUI/Shop/Transaction.pm b/lib/WebGUI/Shop/Transaction.pm index 7619dbc51..bc707daee 100644 --- a/lib/WebGUI/Shop/Transaction.pm +++ b/lib/WebGUI/Shop/Transaction.pm @@ -633,7 +633,7 @@ sub sendNotifications { my $var = $self->getTransactionVars; # render - my $template = WebGUI::Asset::Template->new( $session, $session->setting->get("shopReceiptEmailTemplateId") ); + my $template = WebGUI::Asset::Template->newById( $session, $session->setting->get("shopReceiptEmailTemplateId") ); my $inbox = WebGUI::Inbox->new($session); my $receipt = $template->process( $var ); WebGUI::Macro::process($session, \$receipt); diff --git a/lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm b/lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm index 5f85b184e..56ee5a27e 100644 --- a/lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm +++ b/lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm @@ -164,7 +164,7 @@ exhausted the recurrence, false otherwise. sub processRecurrence { my ( $self, $recurId, $timeLimit ) = @_; my $eventId = $self->findLastEventId($recurId); - my $event = WebGUI::Asset::Event->new( $self->session, $eventId ); + my $event = WebGUI::Asset::Event->newById( $self->session, $eventId ); my $recur = $event->getRecurrence; my $start = $event->getDateTimeStart->truncate(to => 'day');