diff --git a/web/includes/Filter.php b/web/includes/Filter.php index f2a8f5b9f..97088498b 100644 --- a/web/includes/Filter.php +++ b/web/includes/Filter.php @@ -90,9 +90,12 @@ class Filter extends ZM_Object { $this->_querystring .= $term->querystring($objectname, $separator); } # end foreach term $this->_querystring .= $separator.urlencode($objectname.'[Query][sort_asc]').'='.$this->sort_asc(); - $this->_querystring .= $separator.urlencode($objectname.'[Query][sort_field]').'='.$this->sort_field(); - $this->_querystring .= $separator.urlencode($objectname.'[Query][skip_locked]').'='.$this->skip_locked(); - $this->_querystring .= $separator.urlencode($objectname.'[Query][limit]').'='.$this->limit(); + if ($this->sort_field()) + $this->_querystring .= $separator.urlencode($objectname.'[Query][sort_field]').'='.$this->sort_field(); + 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() ) { $this->_querystring .= $separator.$objectname.urlencode('[Id]').'='.$this->Id(); }