includes/namespaces/template.php
changeset 1227 bdac73ed481e
parent 1081 745200a9cc2a
equal deleted inserted replaced
1226:de56132c008d 1227:bdac73ed481e
    11  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    11  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    12  */
    12  */
    13 
    13 
    14 class Namespace_Template extends Namespace_Default
    14 class Namespace_Template extends Namespace_Default
    15 {
    15 {
    16   function send()
    16 	function send()
    17   {
    17 	{
    18     global $output;
    18 		global $output;
    19     
    19 		
    20     $output->add_before_footer($this->display_categories());
    20 		$output->add_before_footer($this->display_categories());
    21     $output->header();
    21 		$output->header();
    22     
    22 		
    23     if ( $this->exists )
    23 		if ( $this->exists )
    24     {
    24 		{
    25       $text = $this->fetch_text();
    25 			$text = $this->fetch_text();
    26       $text = preg_replace('/<noinclude>(.*?)<\/noinclude>/is', '\\1', $text);
    26 			$text = preg_replace('/<noinclude>(.*?)<\/noinclude>/is', '\\1', $text);
    27       $text = preg_replace('/<nodisplay>(.*?)<\/nodisplay>/is', '', $text);
    27 			$text = preg_replace('/<nodisplay>(.*?)<\/nodisplay>/is', '', $text);
    28       
    28 			
    29       $text = RenderMan::render( $text );
    29 			$text = RenderMan::render( $text );
    30       
    30 			
    31       eval( '?>' . $text );
    31 			eval( '?>' . $text );
    32     }
    32 		}
    33     else
    33 		else
    34     {
    34 		{
    35       $this->error_404();
    35 			$this->error_404();
    36     }
    36 		}
    37     
    37 		
    38     $output->footer();
    38 		$output->footer();
    39   }
    39 	}
    40 }
    40 }