Changeset 2888:ca28beb81838
- Timestamp:
- 12/29/14 09:19:15 (9 years ago)
- Branch:
- 2.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/comments.php
r2887 r2888 55 55 /* Get comments 56 56 -------------------------------------------------------- */ 57 $author = isset($_ REQUEST['author']) ? $_REQUEST['author'] : '';58 $status = isset($_ REQUEST['status']) ? $_REQUEST['status'] : '';59 $type = !empty($_ REQUEST['type']) ? $_REQUEST['type'] : '';60 $sortby = !empty($_ REQUEST['sortby']) ? $_REQUEST['sortby'] : 'comment_dt';61 $order = !empty($_ REQUEST['order']) ? $_REQUEST['order'] : 'desc';62 $ip = !empty($_ REQUEST['ip']) ? $_REQUEST['ip'] : '';57 $author = isset($_GET['author']) ? $_GET['author'] : ''; 58 $status = isset($_GET['status']) ? $_GET['status'] : ''; 59 $type = !empty($_GET['type']) ? $_GET['type'] : ''; 60 $sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'comment_dt'; 61 $order = !empty($_GET['order']) ? $_GET['order'] : 'desc'; 62 $ip = !empty($_GET['ip']) ? $_GET['ip'] : ''; 63 63 64 64 $with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip; … … 66 66 $show_filters = false; 67 67 68 $page = !empty($_ REQUEST['page']) ? max(1,(integer) $_REQUEST['page']) : 1;68 $page = !empty($_GET['page']) ? max(1,(integer) $_GET['page']) : 1; 69 69 $nb_per_page = 30; 70 70 71 if (!empty($_ REQUEST['nb']) && (integer) $_REQUEST['nb'] > 0) {72 if ($nb_per_page != $_ REQUEST['nb']) {71 if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) { 72 if ($nb_per_page != $_GET['nb']) { 73 73 $show_filters = true; 74 74 } 75 $nb_per_page = (integer) $_ REQUEST['nb'];75 $nb_per_page = (integer) $_GET['nb']; 76 76 } 77 77 … … 136 136 } 137 137 138 # Les paramètres à conserver d’une action à l’autre. Évite par exemple de revenir sur la liste des commentaires après une action sur les indésirables. 139 $action_page_params = array(); 140 if($type) { 141 $action_page_params['type'] = $type; 142 } 143 if($author) { 144 $action_page_params['author'] = $author; 145 } 146 if($status) { 147 $action_page_params['status'] = $status; 148 } 149 if($sortby != 'comment_dt') { // 'comment_dt' par défaut. 150 $action_page_params['sortby'] = $sortby; 151 } 152 if($ip) { 153 $action_page_params['ip'] = $ip; 154 } 155 if($order && $order != 'desc') { // Desc par défaut 156 $action_page_params['order'] = $order; 157 } 158 if($page > 1) { // Page 1 par défaut 159 $action_page_params['page'] = $page; 160 } 161 if($nb_per_page != 30) { //30 par défaut 162 $action_page_params['nb'] = $nb_per_page; 163 } 164 165 $comments_actions_page = new dcCommentsActionsPage($core,$core->adminurl->get("admin.comments"), $action_page_params); 138 $comments_actions_page = new dcCommentsActionsPage($core,$core->adminurl->get("admin.comments")); 166 139 167 140 if ($comments_actions_page->process()) { … … 201 174 )) 202 175 ); 203 if (!empty($_ REQUEST['upd'])) {176 if (!empty($_GET['upd'])) { 204 177 dcPage::success(__('Selected comments have been successfully updated.')); 205 } elseif (!empty($_ REQUEST['del'])) {178 } elseif (!empty($_GET['del'])) { 206 179 dcPage::success(__('Selected comments have been successfully deleted.')); 207 180 } -
inc/admin/actions/class.dcaction.php
r2566 r2888 223 223 foreach ($this->redirect_fields as $p) { 224 224 if (isset($from[$p])) { 225 $ redir_args[$p] = $from[$p];225 $this->redir_args[$p] = $from[$p]; 226 226 } 227 227 }
Note: See TracChangeset
for help on using the changeset viewer.