diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index fa981b571..f5334e483 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -195,7 +195,7 @@ sub getNextThread { ) group by assetData.assetId order by ".$sortBy." asc - ",$self->session->db->getSlave); + ",$self->session->dbSlave); $self->{_next} = WebGUI::Asset->new($id,$class,$version); # delete $self->{_next} unless ($self->{_next}->{_properties}{className} =~ /Thread/); }; @@ -232,7 +232,7 @@ sub getPreviousThread { or (assetData.ownerUserId=".$self->session->db->quote($self->session->user->userId)." and assetData.ownerUserId<>'1') ) group by assetData.assetId - order by ".$sortBy." desc, assetData.revisionDate desc ",$self->session->db->getSlave); + order by ".$sortBy." desc, assetData.revisionDate desc ",$self->session->dbSlave); $self->{_previous} = WebGUI::Asset::Post::Thread->new($id,$class,$version); # delete $self->{_previous} unless ($self->{_previous}->{_properties}{className} =~ /Thread/); }; diff --git a/lib/WebGUI/Asset/Template.pm b/lib/WebGUI/Asset/Template.pm index a58ab1d42..052d255ee 100644 --- a/lib/WebGUI/Asset/Template.pm +++ b/lib/WebGUI/Asset/Template.pm @@ -204,7 +204,7 @@ sub getList { my $session = shift; my $namespace = shift; my $sql = "select asset.assetId, 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=".$session->db->quote($namespace)." and template.showInForms=1 and asset.state='published' and assetData.revisionDate=(SELECT max(revisionDate) from assetData where assetData.assetId=asset.assetId and (assetData.status='approved' or assetData.tagId=".$session->db->quote($session->scratch->get("versionTag")).")) order by assetData.title"; - my $sth = $session->db->read($sql,$session->db->getSlave); + my $sth = $session->db->read($sql,$session->dbSlave); my %templates; tie %templates, 'Tie::IxHash'; while (my ($id, $version) = $sth->array) { diff --git a/lib/WebGUI/Asset/Wobject.pm b/lib/WebGUI/Asset/Wobject.pm index 0f24061e2..920862d53 100644 --- a/lib/WebGUI/Asset/Wobject.pm +++ b/lib/WebGUI/Asset/Wobject.pm @@ -233,7 +233,7 @@ sub getCollateral { if ($keyValue eq "new" || $keyValue eq "") { return {$keyName=>"new"}; } else { - return $self->session->db->quickHashRef("select * from $table where $keyName=".$self->session->db->quote($keyValue),$self->session->db->getSlave); + return $self->session->db->quickHashRef("select * from $table where $keyName=".$self->session->db->quote($keyValue),$self->session->dbSlave); } } diff --git a/lib/WebGUI/Form/FilterContent.pm b/lib/WebGUI/Form/FilterContent.pm index 2d7b26b0a..c34c0a4c3 100644 --- a/lib/WebGUI/Form/FilterContent.pm +++ b/lib/WebGUI/Form/FilterContent.pm @@ -116,7 +116,7 @@ sub toHtml { 'most'=>$i18n->get(421), 'all'=>$i18n->get(419) ); - $self->get("options") = \%filter; + $self->set("options", \%filter); return $self->SUPER::toHtml(); } diff --git a/lib/WebGUI/Form/LdapLink.pm b/lib/WebGUI/Form/LdapLink.pm index 9a7e075f5..efbbf3956 100644 --- a/lib/WebGUI/Form/LdapLink.pm +++ b/lib/WebGUI/Form/LdapLink.pm @@ -114,7 +114,7 @@ Renders a database connection picker control. sub toHtml { my $self = shift; - $self->get("options") = WebGUI::LDAPLink->getList($self->session,); + $self->set("options", WebGUI::LDAPLink->getList($self->session)); return $self->SUPER::toHtml(); } @@ -128,7 +128,7 @@ Creates a series of hidden fields representing the data in the list. sub toHtmlAsHidden { my $self = shift; - $self->get("options") = WebGUI::LDAPLink->getList($self->session,); + $self->set("options", WebGUI::LDAPLink->getList($self->session)); return $self->SUPER::toHtmlAsHidden(); } @@ -148,7 +148,7 @@ sub toHtmlWithWrapper { $subtext = $self->session->icon->edit("op=editLDAPLink;llid=".$self->get("value").";afterEdit=".$self->session->url->escape($self->get("afterEdit"))); } $subtext .= $self->session->icon->manage("op=listLDAPLinks"); - $self->get("subtext") = $subtext . $self->get("subtext"); + $self->set("subtext", $subtext . $self->get("subtext")); } return $self->SUPER::toHtmlWithWrapper; } diff --git a/lib/WebGUI/Form/Template.pm b/lib/WebGUI/Form/Template.pm index 401576c94..b3fbc2ebb 100644 --- a/lib/WebGUI/Form/Template.pm +++ b/lib/WebGUI/Form/Template.pm @@ -93,15 +93,15 @@ Renders a template picker control. sub toHtml { my $self = shift; - my $templateList = WebGUI::Asset::Template->getList($self->get("namespace")); + my $templateList = WebGUI::Asset::Template->getList($self->session, $self->get("namespace")); #Remove entries from template list that the user does not have permission to view. for my $assetId ( keys %{$templateList} ) { - my $asset = WebGUI::Asset::Template->new($assetId); + my $asset = WebGUI::Asset::Template->new($self->session, $assetId); if (!$asset->canView($self->session->user->userId)) { delete $templateList->{$assetId}; } } - $self->get("options") = $templateList; + $self->set("options", $templateList); $self->setManageIcons(); return $self->SUPER::toHtml(); } diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index 238045e5d..1ad38a2b4 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -330,7 +330,7 @@ sub processReplacements { $content =~ s/\Q$searchFor/$replaceWith/gs; } } else { - my $sth = $session->db->read("select searchFor,replaceWith from replacements",$session->db->getSlave); + my $sth = $session->db->read("select searchFor,replaceWith from replacements",$session->dbSlave); while (my ($searchFor,$replaceWith) = $sth->array) { $replacements->{$searchFor} = $replaceWith; $content =~ s/\Q$searchFor/$replaceWith/gs; diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm index f4e09234b..cdc0a5183 100644 --- a/lib/WebGUI/Paginator.pm +++ b/lib/WebGUI/Paginator.pm @@ -536,7 +536,7 @@ A value to match the dynamicPageNumberKey. sub setDataByQuery { my ($sth, $rowCount, @row); my ($self, $sql, $dbh, $unconditional, $placeholders, $dynamicPageNumberKey, $dynamicPageNumberValue) = @_; - $dbh ||= $self->session->db->getSlave; + $dbh ||= $self->session->dbSlave; if ($unconditional) { $sth = $dbh->unconditionalRead($sql,$placeholders); return $sth->errorMessage if ($sth->errorCode > 0); diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index 3d6b8208c..d7cba5e92 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -55,8 +55,6 @@ Package for interfacing with SQL databases. This package implements Perl DBI fun $hashRef = $db->quickHashRef($sql); $text = $db->quickTab($sql); - $dbh = $db->getSlave; - $id = $db->getNextId("someId"); $string = $db->quote($string); $string = $db->quoteAndJoin(\@array);