Switch the 'modify' code of admin/field.php to use templates
[bugdar.git] / help.php
index a45ced5afab4dbe228989f6c2c78825d9fad3ba2..29ed753dfc49b9be02d9e7f07156b385a4d3f63e 100644 (file)
--- a/help.php
+++ b/help.php
@@ -1,12 +1,12 @@
 <?php
 /*=====================================================================*\
 || ###################################################################
-|| # Bugdar [#]version[#]
-|| # Copyright ©2002-[#]year[#] Blue Static
+|| # Bugdar
+|| # Copyright (c)2004-2009 Blue Static
 || #
 || # This program is free software; you can redistribute it and/or modify
 || # it under the terms of the GNU General Public License as published by
-|| # the Free Software Foundation; version [#]gpl[#] of the License.
+|| # the Free Software Foundation; version 2 of the License.
 || #
 || # This program is distributed in the hope that it will be useful, but
 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -23,27 +23,22 @@ $fetchtemplates = array(
        'help_window'
 );
 
-define('SVN', '$Id$');
 
 require_once('./global.php');
 
-if (!$bugsys->in['topic'] OR !isset($bugsys->datastore['help'][ $bugsys->in['topic'] ]))
+if (!$input->in['topic'] OR !isset(bugdar::$datastore['help'][ $input->in['topic'] ]))
 {
-       $topic['title'] = _('Invalid');
-       $topic['body'] = _('That help topic does not exist in the system.');
+       $topic['title'] = T('Invalid');
+       $topic['body'] = T('That help topic does not exist in the system.');
 }
 else
 {
-       $topic = $bugsys->datastore['help'][ $bugsys->in['topic'] ];
+       $topic = bugdar::$datastore['help'][ $input->in['topic'] ];
        $topic['body'] = nl2br($topic['body']);
 }
 
-eval('$template->flush("' . $template->fetch('help_window') . '");');
+$tpl = new BSTemplate('help_window');
+$tpl->vars = array('topic' => $topic);
+$tpl->evaluate()->flush();
 
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
 ?>
\ No newline at end of file