Changeset 18463


Ignore:
Timestamp:
10/04/12 18:03:25 (7 years ago)
Author:
mistic100
Message:

feature 2761: Pass all kind of messages through session on admin

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r17009 r18463  
    155155{ 
    156156  $page['page'] = 'intro'; 
    157 } 
    158  
    159 $page['errors'] = array(); 
    160 $page['infos']  = array(); 
    161 $page['warnings']  = array(); 
    162  
    163 if (isset($_SESSION['page_infos'])) 
    164 { 
    165   $page['infos'] = array_merge($page['infos'], $_SESSION['page_infos']); 
    166   unset($_SESSION['page_infos']); 
    167157} 
    168158 
     
    291281include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php'); 
    292282 
    293 // +-----------------------------------------------------------------------+ 
    294 // | Errors, Infos & Warnings                                              | 
    295 // +-----------------------------------------------------------------------+ 
    296  
    297283$template->assign('ACTIVE_MENU', get_active_menu($page['page'])); 
    298  
    299 if (count($page['errors']) != 0) 
    300 { 
    301   $template->assign('errors', $page['errors']); 
    302 } 
    303  
    304 if (count($page['infos']) != 0) 
    305 { 
    306   $template->assign('infos', $page['infos']); 
    307 } 
    308  
    309 if (count($page['warnings']) != 0) 
    310 { 
    311   $template->assign('warnings', $page['warnings']); 
    312 } 
    313284 
    314285// +-----------------------------------------------------------------------+ 
     
    323294trigger_action('loc_end_admin'); 
    324295 
     296include(PHPWG_ROOT_PATH.'include/page_messages.php'); 
     297 
    325298$template->pparse('admin'); 
    326299 
  • trunk/include/common.inc.php

    r17649 r18463  
    6565  'infos' => array(), 
    6666  'errors' => array(), 
     67  'warnings' => array(), 
    6768  ); 
    6869$user = array(); 
  • trunk/include/page_messages.php

    r15578 r18463  
    2525if ($template->get_template_vars('page_refresh') === null) 
    2626{ 
    27   foreach (array('errors','infos') as $mode) 
     27  foreach (array('errors','infos','warnings') as $mode) 
    2828  { 
    2929    if (isset($_SESSION['page_'.$mode])) 
Note: See TracChangeset for help on using the changeset viewer.