includes/paths.php
changeset 344 be6c5fdd9203
parent 343 eefe9ab7fe7c
child 345 4ccdfeee9a11
equal deleted inserted replaced
341:1e3b55a591d1 344:be6c5fdd9203
   448   }
   448   }
   449   
   449   
   450   function sysmsg($n)
   450   function sysmsg($n)
   451   {
   451   {
   452     global $db, $session, $paths, $template, $plugins; // Common objects
   452     global $db, $session, $paths, $template, $plugins; // Common objects
   453     $q = $db->sql_query('SELECT page_text, char_tag FROM '.table_prefix.'page_text WHERE page_id=\''.$db->escape($n).'\' AND namespace=\'System\'');
   453     $q = $db->sql_query('SELECT page_text, char_tag FROM '.table_prefix.'page_text WHERE page_id=\''.$db->escape(sanitize_page_id($n)).'\' AND namespace=\'System\'');
   454     if( !$q )
   454     if( !$q )
   455     {
   455     {
   456       $db->_die('Error during generic selection of system page data.');
   456       $db->_die('Error during generic selection of system page data.');
   457     }
   457     }
   458     if($db->numrows() < 1)
   458     if($db->numrows() < 1)
   463     $r = $db->fetchrow();
   463     $r = $db->fetchrow();
   464     $db->free_result();
   464     $db->free_result();
   465     $message = $r['page_text'];
   465     $message = $r['page_text'];
   466     
   466     
   467     $message = preg_replace('/<noinclude>(.*?)<\/noinclude>/is', '', $message);
   467     $message = preg_replace('/<noinclude>(.*?)<\/noinclude>/is', '', $message);
       
   468     $message = preg_replace('/<nodisplay>(.*?)<\/nodisplay>/is', '\\1', $message);
   468     
   469     
   469     return $message;
   470     return $message;
   470   }
   471   }
   471   function get_pageid_from_url()
   472   function get_pageid_from_url()
   472   {
   473   {