Changeset 20609


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

replaced page_messages.php with a function to call

Location:
trunk
Files:
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/about.php

    r19703 r20609  
    5858
    5959include(PHPWG_ROOT_PATH.'include/page_header.php');
    60 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     60flush_page_messages();
    6161$template->pparse('about');
    6262include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/admin.php

    r19703 r20609  
    293293trigger_action('loc_end_admin');
    294294
    295 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     295flush_page_messages();
    296296
    297297$template->pparse('admin');
  • trunk/comments.php

    r19703 r20609  
    610610include(PHPWG_ROOT_PATH.'include/page_header.php');
    611611trigger_action('loc_end_comments');
    612 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     612flush_page_messages();
    613613$template->pparse('comments');
    614614include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/identification.php

    r19703 r20609  
    111111include(PHPWG_ROOT_PATH.'include/page_header.php');
    112112trigger_action('loc_end_identification');
    113 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     113flush_page_messages();
    114114$template->pparse('identification');
    115115include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • 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?>
  • trunk/index.php

    r19703 r20609  
    334334include(PHPWG_ROOT_PATH.'include/page_header.php');
    335335trigger_action('loc_end_index');
    336 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     336flush_page_messages();
    337337$template->parse_index_buttons();
    338338$template->pparse('index');
  • trunk/nbm.php

    r19703 r20609  
    7777// +-----------------------------------------------------------------------+
    7878include(PHPWG_ROOT_PATH.'include/page_header.php');
    79 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     79flush_page_messages();
    8080$template->parse('nbm');
    8181include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/notification.php

    r19703 r20609  
    116116include(PHPWG_ROOT_PATH.'include/page_header.php');
    117117trigger_action('loc_end_notification');
    118 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     118flush_page_messages();
    119119$template->pparse('notification');
    120120include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/password.php

    r19703 r20609  
    358358include(PHPWG_ROOT_PATH.'include/page_header.php');
    359359trigger_action('loc_end_password');
    360 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     360flush_page_messages();
    361361$template->pparse('password');
    362362include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/picture.php

    r19703 r20609  
    991991include(PHPWG_ROOT_PATH.'include/page_header.php');
    992992trigger_action('loc_end_picture');
    993 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     993flush_page_messages();
    994994if ($page['slideshow'] and $conf['light_slideshow'])
    995995{
  • trunk/profile.php

    r19703 r20609  
    8686  include(PHPWG_ROOT_PATH.'include/page_header.php');
    8787  trigger_action('loc_end_profile');
    88   include(PHPWG_ROOT_PATH.'include/page_messages.php');
     88  flush_page_messages();
    8989  $template->pparse('profile');
    9090  include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/register.php

    r19703 r20609  
    132132include(PHPWG_ROOT_PATH.'include/page_header.php');
    133133trigger_action('loc_end_register');
    134 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     134flush_page_messages();
    135135$template->parse('register');
    136136include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/search.php

    r19703 r20609  
    235235include(PHPWG_ROOT_PATH.'include/page_header.php');
    236236trigger_action('loc_end_search');
    237 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     237flush_page_messages();
    238238$template->pparse('search');
    239239include(PHPWG_ROOT_PATH.'include/page_tail.php');
  • trunk/tags.php

    r19703 r20609  
    204204include(PHPWG_ROOT_PATH.'include/page_header.php');
    205205trigger_action('loc_end_tags');
    206 include(PHPWG_ROOT_PATH.'include/page_messages.php');
     206flush_page_messages();
    207207$template->pparse('tags');
    208208include(PHPWG_ROOT_PATH.'include/page_tail.php');
Note: See TracChangeset for help on using the changeset viewer.