Switch the 'modify' code of admin/field.php to use templates
[bugdar.git] / newreport.php
index 02cc8825718aecb8a9f6ce3f5bc0c05eda7c75c1..d4c9d3865c8ba5acf503175cd22891496395fc50 100755 (executable)
@@ -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,7 +23,6 @@ $fetchtemplates = array(
        'newreport',
 );
 
-define('SVN', '$Id$');
 
 $focus['newreport'] = 'focus';
 
@@ -33,7 +32,6 @@ require_once('./includes/class_notification.php');
 require_once('./includes/api_bug.php');
 require_once('./includes/api_comment.php');
 
-require_once('./includes/class_api_error.php');
 
 $product = explode(',', $input->in['product']);
 if (!can_perform('cansubmitbugs', $product[0]))
@@ -104,7 +102,7 @@ if ($_POST['do'] == 'insert')
                $comment->set('bugid',                  $bug->insertid);
                $comment->insert();
                
-               $notif->send_new_bug_notice($bug->values, $comment->values);
+               $notif->sendNewBugNotice($bug->values, $comment->values);
                
                $bug = new BugAPI(); // need to destroy because update will think the insert fields need to be changed, too
                $bug->set('bugid',                                      $comment->values['bugid']);
@@ -119,7 +117,7 @@ if ($_POST['do'] == 'insert')
                $bug->set('hiddenlastpostbyname',       bugdar::$userinfo['displayname']);
                $bug->update();
                
-               $notif->set_bug_data($bug->record);
+               $notif->setBugData($bug->record);
                
                $notif->finalize();
                
@@ -173,7 +171,7 @@ if ($_REQUEST['do'] == 'add')
        }
        
        // custom fields
-       $fields = construct_custom_fields($bugsys->in, true);           
+       $fields = construct_custom_fields($input->in, true);            
        $i = 0;
        foreach ($fields AS $field)
        {
@@ -191,17 +189,11 @@ if ($_REQUEST['do'] == 'add')
        $tpl = new BSTemplate('newreport');
        $tpl->vars = array(
                'reporter'              => construct_user_display(bugdar::$userinfo),
-               'productSelect' => ConstructProductSelect('cansubmitbugs', $input->in['product'], false),
+               'productSelect' => construct_product_select('cansubmitbugs', $input->in['product'], false),
                'select'                => $select,
                'customfields'  => $customfields
        );
        $tpl->evaluate()->flush();
 }
 
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
 ?>
\ No newline at end of file