setPreferredSortOrder() public static method

Saves the sort order to the preferences backend.
public static setPreferredSortOrder ( Horde_Variables $vars, string $source )
$vars Horde_Variables Variables object.
$source string Source.
示例#1
0
             break;
         }
         if (!strlen($criteria)) {
             /* Searching all fields in basic search. */
             $criteria = array_combine(array_filter(array_keys($allCriteria[$source])), array_fill(0, count($allCriteria[$source]) - 1, $val));
         } else {
             $criteria = array($criteria => $val);
         }
         $do_search = true;
         break;
     case 'duplicate':
         $do_search = $vars->search || $vars->dupe || count($addressBooks) == 1;
         break;
 }
 /* Check for updated sort criteria */
 Turba::setPreferredSortOrder($vars, $source);
 /* Only try to perform a search if we actually have search criteria. */
 if ($do_search) {
     if ($vars->save_vbook) {
         try {
             $session->checkToken($vars->token);
         } catch (Horde_Exception $e) {
             $notification->push($e);
             Horde::url('search.php', true)->redirect();
         }
         /* We create the vbook and redirect before we try to search
          * since we are not displaying the search results on this page
          * anyway. */
         $vname = $vars->vbook_name;
         if (empty($vname)) {
             $notification->push(_("You must provide a name for virtual address books."), 'horde.error');
示例#2
0
文件: Browse.php 项目: horde/horde
 public function updateSortOrderFromVars()
 {
     extract($this->_params, EXTR_REFS);
     Turba::setPreferredSortOrder($vars, $source);
 }