Dotclear

Changeset 1876:8da345a51989


Ignore:
Timestamp:
08/15/13 00:21:08 (12 years ago)
Author:
Lepeltier kévin
Branch:
Ticket #1527
Children:
1877:6e090b31f96d, 1907:d82b43aae156
Message:

Ticket #1527
Les variables $action et $redir sont initialisé avec les valeurs reçut par POST
La variable posts et initialisé avec un params vide.
On doit pouvoir faire mieux pour cette dernière.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/posts_actions.php

    r1179 r1876  
    1616 
    1717$params = array(); 
     18$action = $_POST['action']; 
     19$posts = $core->blog->getPosts($params); 
     20 
     21 
     22if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false) 
     23{ 
     24     $redir = $_POST['redir']; 
     25} 
     26else 
     27{ 
     28     $redir = 
     29     'posts.php?user_id='.$_POST['user_id']. 
     30     '&cat_id='.$_POST['cat_id']. 
     31     '&status='.$_POST['status']. 
     32     '&selected='.$_POST['selected']. 
     33     '&month='.$_POST['month']. 
     34     '&lang='.$_POST['lang']. 
     35     '&sortby='.$_POST['sortby']. 
     36     '&order='.$_POST['order']. 
     37     '&page='.$_POST['page']. 
     38     '&nb='.$_POST['nb']; 
     39} 
    1840 
    1941/* Actions 
    2042-------------------------------------------------------- */ 
    21 if (!empty($_POST['action']) && !empty($_POST['entries'])) 
     43if (!empty($action) && !empty($_POST['entries'])) 
    2244{ 
    2345     $entries = $_POST['entries']; 
    24      $action = $_POST['action']; 
    25       
    26      if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false) 
    27      { 
    28           $redir = $_POST['redir']; 
    29      } 
    30      else 
    31      { 
    32           $redir = 
    33           'posts.php?user_id='.$_POST['user_id']. 
    34           '&cat_id='.$_POST['cat_id']. 
    35           '&status='.$_POST['status']. 
    36           '&selected='.$_POST['selected']. 
    37           '&month='.$_POST['month']. 
    38           '&lang='.$_POST['lang']. 
    39           '&sortby='.$_POST['sortby']. 
    40           '&order='.$_POST['order']. 
    41           '&page='.$_POST['page']. 
    42           '&nb='.$_POST['nb']; 
    43      } 
    4446      
    4547     foreach ($entries as $k => $v) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map