PluginProbe
Welcart e-Commerce / 2.12.4
Welcart e-Commerce v2.12.4
2.12.4 2.12.3 2.11.35 2.12.2 2.12.1 2.11.34 2.11.33 2.11.32 2.11.31 2.11.30 1.3.16 1.3.17 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 All 292 releases
← All changes | classes/dataList.class.php +13 -1 2.11.302.12.4 View file →
@@ -96,14 +96,26 @@
96 96 $this->sortColumn = (isset($this->data_cookie['sortColumn'])) ? $this->data_cookie['sortColumn'] :'ID';
97 97 $this->searchSql = (isset($this->data_cookie['searchSql'])) ? $this->data_cookie['searchSql'] :'';
98 98 $this->searchSwitchStatus = (isset($this->data_cookie['searchSwitchStatus'])) ? $this->data_cookie['searchSwitchStatus'] :'OFF';
99 99 if (isset($this->data_cookie['arr_search'])) {
100 - $this->arr_search = $this->data_cookie['arr_search'];
100 + $this->arr_search = wp_parse_args(
101 + $this->data_cookie['arr_search'],
102 + array(
103 + 'period' => '3',
104 + 'column' => '',
105 + 'word' => '',
106 + )
107 + );
101 108 } else {
102 109 $this->arr_search = array('period'=>'3', 'column'=>'', 'word'=>'');
103 110 }
104 111 if (isset($this->data_cookie['sortSwitchs'])) {
105 112 $this->sortSwitchs = $this->data_cookie['sortSwitchs'];
113 + foreach ( $this->columns as $key => $value ) {
114 + if ( ! isset( $this->sortSwitchs[ $value ] ) ) {
115 + $this->sortSwitchs[ $value ] = 'DESC';
116 + }
117 + }
106 118 } else {
107 119 foreach($this->columns as $key => $value ){
108 120 $this->sortSwitchs[$value] = 'DESC';
109 121 }