Changeset 8167 for branches


Ignore:
Timestamp:
Dec 17, 2010, 1:09:34 AM (13 years ago)
Author:
plg
Message:

bug 2031 fixed: redirection after category deletion preserves the current
node in the category tree.

+ the confirmation message is displayed after redirect, thanks to session

Location:
branches/2.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/admin.php

    r6364 r8167  
    9090$page['errors'] = array();
    9191$page['infos']  = array();
     92
     93if (isset($_SESSION['page_infos']))
     94{
     95  $page['infos'] = array_merge($page['infos'], $_SESSION['page_infos']);
     96  unset($_SESSION['page_infos']);
     97}
    9298
    9399$link_start = PHPWG_ROOT_PATH.'admin.php?page=';
  • branches/2.1/admin/cat_list.php

    r6364 r8167  
    8888{
    8989  delete_categories(array($_GET['delete']));
    90   array_push($page['infos'], l10n('Virtual category deleted'));
     90  $_SESSION['page_infos'] = array(l10n('Virtual category deleted'));
    9191  update_global_rank();
    92   redirect(get_root_url().'admin.php?page=cat_list');
     92
     93  $redirect_url = get_root_url().'admin.php?page=cat_list';
     94  if (isset($_GET['parent_id']))
     95  {
     96    $redirect_url.= '&parent_id='.$_GET['parent_id'];
     97  } 
     98  redirect($redirect_url);
    9399}
    94100// request to add a virtual category
Note: See TracChangeset for help on using the changeset viewer.