Dotclear

Changeset 2888:ca28beb81838


Ignore:
Timestamp:
12/29/14 09:19:15 (9 years ago)
Author:
Dsls
Branch:
2.7
Message:

Reverted changeset 2887 (the problem was in the parent class).
Fixed redirection parameters, fixes #2036

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/comments.php

    r2887 r2888  
    5555/* Get comments 
    5656-------------------------------------------------------- */ 
    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'] : ''; 
    6363 
    6464$with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip; 
     
    6666$show_filters = false; 
    6767 
    68 $page = !empty($_REQUEST['page']) ? max(1,(integer) $_REQUEST['page']) : 1; 
     68$page = !empty($_GET['page']) ? max(1,(integer) $_GET['page']) : 1; 
    6969$nb_per_page =  30; 
    7070 
    71 if (!empty($_REQUEST['nb']) && (integer) $_REQUEST['nb'] > 0) { 
    72      if ($nb_per_page != $_REQUEST['nb']) { 
     71if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) { 
     72     if ($nb_per_page != $_GET['nb']) { 
    7373          $show_filters = true; 
    7474     } 
    75      $nb_per_page = (integer) $_REQUEST['nb']; 
     75     $nb_per_page = (integer) $_GET['nb']; 
    7676} 
    7777 
     
    136136} 
    137137 
    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")); 
    166139 
    167140if ($comments_actions_page->process()) { 
     
    201174          )) 
    202175); 
    203 if (!empty($_REQUEST['upd'])) { 
     176if (!empty($_GET['upd'])) { 
    204177     dcPage::success(__('Selected comments have been successfully updated.')); 
    205 } elseif (!empty($_REQUEST['del'])) { 
     178} elseif (!empty($_GET['del'])) { 
    206179     dcPage::success(__('Selected comments have been successfully deleted.')); 
    207180} 
  • inc/admin/actions/class.dcaction.php

    r2566 r2888  
    223223          foreach ($this->redirect_fields as $p) { 
    224224               if (isset($from[$p])) { 
    225                     $redir_args[$p] = $from[$p]; 
     225                    $this->redir_args[$p] = $from[$p]; 
    226226               } 
    227227          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map