Don't include empty fields in filter query string, just to shorten it a bit

pull/4131/merge
Isaac Connor 2024-12-21 14:34:35 -05:00
parent 27dfdd1b4e
commit 24ad12fa22
1 changed files with 6 additions and 3 deletions

View File

@ -90,9 +90,12 @@ class Filter extends ZM_Object {
$this->_querystring .= $term->querystring($objectname, $separator); $this->_querystring .= $term->querystring($objectname, $separator);
} # end foreach term } # end foreach term
$this->_querystring .= $separator.urlencode($objectname.'[Query][sort_asc]').'='.$this->sort_asc(); $this->_querystring .= $separator.urlencode($objectname.'[Query][sort_asc]').'='.$this->sort_asc();
$this->_querystring .= $separator.urlencode($objectname.'[Query][sort_field]').'='.$this->sort_field(); if ($this->sort_field())
$this->_querystring .= $separator.urlencode($objectname.'[Query][skip_locked]').'='.$this->skip_locked(); $this->_querystring .= $separator.urlencode($objectname.'[Query][sort_field]').'='.$this->sort_field();
$this->_querystring .= $separator.urlencode($objectname.'[Query][limit]').'='.$this->limit(); if ($this->skip_locked())
$this->_querystring .= $separator.urlencode($objectname.'[Query][skip_locked]').'='.$this->skip_locked();
if ($this->limit())
$this->_querystring .= $separator.urlencode($objectname.'[Query][limit]').'='.$this->limit();
if ( $this->Id() ) { if ( $this->Id() ) {
$this->_querystring .= $separator.$objectname.urlencode('[Id]').'='.$this->Id(); $this->_querystring .= $separator.$objectname.urlencode('[Id]').'='.$this->Id();
} }