[Mageia-sysadm] [244] fix string substitution, this emptied the searchfilter, leading to a catdap error page

root at mageia.org root at mageia.org
Fri Jan 7 02:39:36 CET 2011


Revision: 244
Author:   misc
Date:     2011-01-07 02:39:35 +0100 (Fri, 07 Jan 2011)
Log Message:
-----------
fix string substitution, this emptied the searchfilter, leading to a catdap error page

Modified Paths:
--------------
    identity/CatDap/trunk/lib/CatDap/Controller/user.pm

Modified: identity/CatDap/trunk/lib/CatDap/Controller/user.pm
===================================================================
--- identity/CatDap/trunk/lib/CatDap/Controller/user.pm	2011-01-07 00:59:10 UTC (rev 243)
+++ identity/CatDap/trunk/lib/CatDap/Controller/user.pm	2011-01-07 01:39:35 UTC (rev 244)
@@ -241,8 +241,7 @@
     $attr = $c->req->param('attribute');
     $value = $c->req->param('value');
     $user = $c->user->username;
-    $userfilter = $c->user->store->user_filter;
-    $userfilter = s/%s/$c->user->username/g;
+    $userfilter = sprintf($c->user->store->user_filter ,$c->user->username);
     $c->log->debug("Searching for user $user with $userfilter");
     $mesg = $c->model('User')->search($userfilter);
     $entry = $mesg->entry;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110107/93a7101d/attachment.html>


More information about the Mageia-sysadm mailing list