Changeset 8168 for trunk


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

merge r8167 from branch 2.1 to trunk

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:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r6365 r8168  
    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=';
  • trunk/admin/cat_list.php

    r8131 r8168  
    107107{
    108108  delete_categories(array($_GET['delete']));
    109   array_push($page['infos'], l10n('Virtual album deleted'));
     109  $_SESSION['page_infos'] = array(l10n('Virtual album deleted'));
    110110  update_global_rank();
    111   redirect(get_root_url().'admin.php?page=cat_list');
     111
     112  $redirect_url = get_root_url().'admin.php?page=cat_list';
     113  if (isset($_GET['parent_id']))
     114  {
     115    $redirect_url.= '&parent_id='.$_GET['parent_id'];
     116  } 
     117  redirect($redirect_url);
    112118}
    113119// request to add a virtual category
Note: See TracChangeset for help on using the changeset viewer.