AntonLV há 7 anos atrás
pai
commit
451d5948d8

+ 2 - 0
inc/classes/BxDolGridConnections.php

@@ -22,6 +22,8 @@ class BxDolGridConnections extends BxTemplGrid
         parent::__construct ($aOptions, $oTemplate);
         $this->_sDefaultSortingOrder = 'DESC';
 
+        $this->_aQueryAppendExclude[] = 'join_connections';
+
         if(($iProfileId = bx_get('profile_id')) !== false)
             $this->setProfile($iProfileId);
     }

+ 2 - 0
inc/classes/BxDolGridSubscribedMe.php

@@ -25,6 +25,8 @@ class BxDolGridSubscribedMe extends BxTemplGrid
         parent::__construct ($aOptions, $oTemplate);
         $this->_sDefaultSortingOrder = 'DESC';
 
+        $this->_aQueryAppendExclude[] = 'join_connections';
+
         if(($iProfileId = bx_get('profile_id')) !== false)
             $this->setProfileId($iProfileId);   
     }

+ 7 - 0
template/scripts/BxBaseGrid.php

@@ -16,6 +16,7 @@ class BxBaseGrid extends BxDolGrid
     protected $_oTemplate;
     protected $_aPopupOptions = false;
     protected $_aQueryAppend = false;
+    protected $_aQueryAppendExclude = false; // an array of keys which shouldn't be pathed in http requests, but can be stored (used) in 'Query Append' array.
     protected $_aQueryReset = false;
     protected $_aConfirmMessages = false;
     protected $_bSelectAll = false;
@@ -30,6 +31,9 @@ class BxBaseGrid extends BxDolGrid
         else
             $this->_oTemplate = BxDolTemplate::getInstance();
 
+        $this->_aQueryAppend = array();
+        $this->_aQueryAppendExclude = array();
+
         $this->_aQueryReset = array($this->_aOptions['filter_get'], $this->_aOptions['order_get_field'], $this->_aOptions['order_get_dir'], $this->_aOptions['paginate_get_start'], $this->_aOptions['paginate_get_per_page']);
     }
 
@@ -174,6 +178,9 @@ class BxBaseGrid extends BxDolGrid
             $sPopupOptions = json_encode($this->_aPopupOptions);
 
         $aQueryAppend = array_merge(is_array($this->_aQueryAppend) ? $this->_aQueryAppend : array(), is_array($this->_aMarkers) ? $this->_aMarkers : array());
+        if(!empty($this->_aQueryAppendExclude) && is_array($this->_aQueryAppendExclude))
+            $aQueryAppend = array_diff_key($aQueryAppend, array_flip($this->_aQueryAppendExclude));
+
         $sQueryAppend = '{}';
         if (!empty($aQueryAppend) && is_array($aQueryAppend))
             $sQueryAppend = json_encode($aQueryAppend);