[Rt-commit] rt branch, 4.2/warn-on-case-sensitive-searches, updated. rt-4.1.8-156-g7ffd86b
Ruslan Zakirov
ruz at bestpractical.com
Mon Apr 22 09:26:44 EDT 2013
The branch, 4.2/warn-on-case-sensitive-searches has been updated
via 7ffd86b394f0e083774b135bfb9352560aad0a33 (commit)
from 205a7bee6adee0b6b1e0a403f4f76dd403494711 (commit)
Summary of changes:
share/html/REST/1.0/Forms/queue/ns | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 7ffd86b394f0e083774b135bfb9352560aad0a33
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Mon Apr 22 17:17:33 2013 +0400
use LoadByCols instead of search
For backwards compatibility use LoadByCols
instead of Load, but really this comp should go away.
diff --git a/share/html/REST/1.0/Forms/queue/ns b/share/html/REST/1.0/Forms/queue/ns
index 3ea6bf2..c0f6b1e 100644
--- a/share/html/REST/1.0/Forms/queue/ns
+++ b/share/html/REST/1.0/Forms/queue/ns
@@ -53,10 +53,10 @@ $id
<%perl>
use RT::Queues;
-my $queues = RT::Queues->new($session{CurrentUser});
-$queues->Limit(FIELD => 'Name', OPERATOR => '=', VALUE => $id);
-if ($queues->Count == 0) {
+my $queue = RT::Queue->new($session{CurrentUser});
+$queue->LoadByCols( Name => $id );
+unless ($queue->id) {
return (0, "No queue named $id exists.");
}
-return $queues->Next->Id;
+return $queue->id;
</%perl>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list