Ignore:
Timestamp:
Feb 7, 2013, 10:17:08 PM (11 years ago)
Author:
rvelices
Message:

replaced page_messages.php with a function to call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_html.inc.php

    r20516 r20609  
    615615}
    616616
     617
     618function flush_page_messages()
     619{
     620  global $template, $page;
     621  if ($template->get_template_vars('page_refresh') === null)
     622  {
     623    foreach (array('errors','infos','warnings') as $mode)
     624    {
     625      if (isset($_SESSION['page_'.$mode]))
     626      {
     627        $page[$mode] = array_merge($page[$mode], $_SESSION['page_'.$mode]);
     628        unset($_SESSION['page_'.$mode]);
     629      }
     630
     631      if (count($page[$mode]) != 0)
     632      {
     633        $template->assign($mode, $page[$mode]);
     634      }
     635    }
     636  }
     637}
     638
    617639?>
Note: See TracChangeset for help on using the changeset viewer.