Esempio n. 1
0
 /**
  * Add username order to a query instance, with differences between
  * mgd1 and mgd2 abstracted away.
  *
  * Note that it actually does nothing under mgd2 right now, because it's still
  * unclear how this could be implemented
  *
  * @param midcom_core_query &$query The QB or MC instance to work on
  * @param string $direction The value for the username constraint
  */
 public static function add_username_order(midcom_core_query &$query, $direction)
 {
     if (method_exists('midgard_user', 'login')) {
         debug_add('Ordering persons by username is not yet implemented for Midgard2', MIDCOM_LOG_ERROR);
         //@todo Find a way to do this
     } else {
         $query->add_order('username', $direction);
     }
 }