Switch the 'modify' code of admin/field.php to use templates
[bugdar.git] / editcomment.php
index efdf3298bfa9eb27c7c6827bd433c99a09d76ac4..205eded50c355994367fa0d43a5917c3ee0f272e 100644 (file)
@@ -2,7 +2,7 @@
 /*=====================================================================*\
 || ###################################################################
 || # Bugdar
-|| # Copyright ©2002-2007 Blue Static
+|| # 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
@@ -23,14 +23,12 @@ $fetchtemplates = array(
        'editcomment'
 );
 
-define('SVN', '$Id$');
 
 $focus['showreport'] = 'focus';
 
 require_once('./global.php');
 require_once('./includes/api_comment.php');
 
-require_once('./includes/class_api_error.php');
 
 $commentapi = new CommentAPI();
 $commentapi->set('commentid',  $input->in['commentid']);
@@ -142,11 +140,11 @@ if ($_POST['do'] == 'update')
                // setup logging
                require_once('./includes/class_logging.php');
                $log = new Logging;
-               $log->set_bugid($bug['bugid']);
-               $log->set_commentid($comment['commentid']);
+               $log->setBugId($bug['bugid']);
+               $log->setCommentId($comment['commentid']);
                
-               $log->add_data(true, $commentapi->record, array('comment', 'hidden'), false, 'comment');
-               $log->add_data(false, $commentapi->values, array('comment', 'hidden'), false, 'comment');
+               $log->addData(true, $commentapi->record, array('comment', 'hidden'), false, 'comment');
+               $log->addData(false, $commentapi->values, array('comment', 'hidden'), false, 'comment');
                
                $lastgood = $db->queryFirst("
                        SELECT comment.* AS comment, user.displayname AS username
@@ -164,7 +162,7 @@ if ($_POST['do'] == 'update')
                        WHERE bugid = $bug[bugid]"
                );
                
-               $log->update_history();
+               $log->updateHistory();
                
                $message->redirect(T('The comment was modified successfully.'), "showreport.php?bugid=$bug[bugid]");
        }
@@ -206,10 +204,4 @@ if ($_REQUEST['do'] == 'edit')
        $tpl->evaluate()->flush();
 }
 
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
 ?>
\ No newline at end of file