Switch the 'modify' code of admin/field.php to use templates
[bugdar.git] / help.php
index 82a6fdf75ec11a242dbf10d7bb22f82ed87dae7c..29ed753dfc49b9be02d9e7f07156b385a4d3f63e 100644 (file)
--- a/help.php
+++ b/help.php
@@ -1,39 +1,44 @@
 <?php
 /*=====================================================================*\
-|| ################################################################### ||
-|| # BugStrike [#]version[#]
-|| # --------------------------------------------------------------- # ||
-|| # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
-|| # This file may not be reproduced in any way without permission.  # ||
-|| # --------------------------------------------------------------- # ||
-|| # User License Agreement at http://www.iris-studios.com/license/  # ||
-|| ################################################################### ||
+|| ###################################################################
+|| # 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 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
+|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+|| # more details.
+|| #
+|| # You should have received a copy of the GNU General Public License along
+|| # with this program; if not, write to the Free Software Foundation, Inc.,
+|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+|| ###################################################################
 \*=====================================================================*/
 
 $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'] = $lang->string('Invalid');
-       $topic['body'] = $lang->string('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