Mercurial > hg > rc1
comparison plugins/rc_foldersort/rc_foldersort.php @ 42:db1e51c59ddc
various small fixes from upgrades to PHP and/or hangover from fix to apt-get overwrite at beginning of the year somehow
author | Charlie Root |
---|---|
date | Sun, 26 Jan 2025 13:12:28 -0500 |
parents | d41c01c5c933 |
children |
comparison
equal
deleted
inserted
replaced
41:d2414df68d78 | 42:db1e51c59ddc |
---|---|
170 } | 170 } |
171 | 171 |
172 public function preferences_save_hook($args) | 172 public function preferences_save_hook($args) |
173 { | 173 { |
174 if ($args['section'] == 'mailbox') { | 174 if ($args['section'] == 'mailbox') { |
175 $folder_sort_col = rcube_utils::get_input_value('_default_sort_col', RCUBE_INPUT_POST); | 175 $folder_sort_col = rcube_utils::get_input_value('_default_sort_col', rcube_utils::INPUT_POST); |
176 $folder_sort_order = rcube_utils::get_input_value('_default_sort_order', RCUBE_INPUT_POST); | 176 $folder_sort_order = rcube_utils::get_input_value('_default_sort_order', rcube_utils::INPUT_POST); |
177 $folder_sort = $folder_sort_col . '_' . $folder_sort_order; | 177 $folder_sort = $folder_sort_col . '_' . $folder_sort_order; |
178 $folder_sorts = $this->sort_order; | 178 $folder_sorts = $this->sort_order; |
179 $folder_sorts['default'] = $folder_sort; | 179 $folder_sorts['default'] = $folder_sort; |
180 $args['prefs']['per_folder_sort'] = $folder_sorts; | 180 $args['prefs']['per_folder_sort'] = $folder_sorts; |
181 } | 181 } |
183 return $args; | 183 return $args; |
184 } | 184 } |
185 | 185 |
186 public function sort_json_action() | 186 public function sort_json_action() |
187 { | 187 { |
188 $cmd = rcube_utils::get_input_value('cmd', RCUBE_INPUT_POST); | 188 $cmd = rcube_utils::get_input_value('cmd', rcube_utils::INPUT_POST); |
189 $folder = rcube_utils::get_input_value('folder', RCUBE_INPUT_POST); | 189 $folder = rcube_utils::get_input_value('folder', rcube_utils::INPUT_POST); |
190 $col = rcube_utils::get_input_value('col', RCUBE_INPUT_POST); | 190 $col = rcube_utils::get_input_value('col', rcube_utils::INPUT_POST); |
191 $order = rcube_utils::get_input_value('order', RCUBE_INPUT_POST); | 191 $order = rcube_utils::get_input_value('order', rcube_utils::INPUT_POST); |
192 | 192 |
193 switch ($cmd) { | 193 switch ($cmd) { |
194 case 'change_session': { | 194 case 'change_session': { |
195 $_SESSION['sort_col'] = $col; | 195 $_SESSION['sort_col'] = $col; |
196 $_SESSION['sort_order'] = $order; | 196 $_SESSION['sort_order'] = $order; |