tablesort_get_querystring

Versions
4.6 – 6
tablesort_get_querystring()

Compose a query string to append to table sorting requests.

Return value

A query string that consists of all components of the current page request except for those pertaining to table sorting.

Code

includes/tablesort.inc, line 136

<?php
function tablesort_get_querystring() {
  $cgi = $_SERVER['REQUEST_METHOD'] == 'GET' ? $_GET : $_POST;
  $query_string = '';
  foreach ($cgi as $key => $val) {
    if ($key != 'order' && $key != 'sort' && $key != 'q') {
      $query_string .= '&'. $key .'='. $val;
    }
  }
  return $query_string;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.