Development

Changeset 21851

You must first sign up to be able to contribute.

Changeset 21851

Show
Ignore:
Timestamp:
09/10/09 17:33:13 (4 years ago)
Author:
agilbert
Message:

Improved readability.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/pkToolkitPlugin/trunk/lib/pkSubCrudTools.class.php

    r21798 r21851  
    4848  { 
    4949    sfContext::getInstance()->getLogger()->info('QQ getting users'); 
    50     $allMatches = Doctrine_Query::create()->from('sfGuardUser u')->leftJoin('u.Profile p')->leftJoin('u.' . $relation . ' e WITH e.id = ?', array($object->id))->addWhere('p.first_name LIKE ? OR p.last_name LIKE ? OR p.fullname LIKE ?', array("$name%", "$name%", "$name%"))->limit(sfConfig::get('app_searchusers_limit', 10))->execute();  
     50    $allMatches = Doctrine_Query::create() 
     51      ->from('sfGuardUser u') 
     52      ->leftJoin('u.Profile p') 
     53      ->leftJoin('u.' . $relation . ' e WITH e.id = ?', array($object->id)) 
     54      ->addWhere('p.first_name LIKE ? OR p.last_name LIKE ? OR p.fullname LIKE ?', array("$name%", "$name%", "$name%")) 
     55      ->limit(sfConfig::get('app_searchusers_limit', 10)) 
     56      ->execute(); 
     57        
    5158    $users = $object->getUsers(); 
    5259    // I should be able to do that without manually filtering, but my 'e.id IS NULL' logic didn't