Remove includes/class_api_error.php and all of the places we require() it
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 23 Aug 2008 19:31:51 +0000 (15:31 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 23 Aug 2008 19:31:51 +0000 (15:31 -0400)
19 files changed:
admin/automation.php
admin/field.php
admin/language.php
admin/priority.php
admin/resolution.php
admin/severity.php
admin/status.php
admin/user.php
admin/usergroup.php
admin/userhelp.php
attachment.php
editcomment.php
editreport.php
includes/class_api_error.php [deleted file]
login.php
newreport.php
register.php
search.php
userctrl.php

index 99e4d072f25f7e04070536daa1d526e43cca8036..e65594080a822a3b6cb9cd648fab7c94ed29e658 100644 (file)
@@ -22,7 +22,6 @@
 require_once('./global.php');
 require_once('./includes/api_automation.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::fieldsPages();
index d903c0ef8b0568ce2bd4fd154be917b10bf0908a..c8d2a82ea16bdddb5aa760dd6ac6a21f97f11179 100644 (file)
@@ -22,7 +22,6 @@
 require_once('./global.php');
 require_once('./includes/api_field.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::fieldsPages();
index 9d945ecd109b5b6582c3d98ee4eb81c6eafb702d..c2799eacbf31a050b9b49d95aefd0f841fbecd7f 100644 (file)
@@ -22,7 +22,6 @@
 require_once('./global.php');
 require_once('./includes/api_language.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::optionsPages();
index 5439bf84fd949b7764b3c2f5ff5c7b7516306d92..a938c2bbd92dc9cd851bbf20532f41867c2d3cf4 100755 (executable)
@@ -22,7 +22,6 @@
 require_once('./global.php');
 require_once('./includes/api_priority.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::fieldsPages();
index f616a2abe99c7a06eb4e5e444b037062166dcf36..6eebab523496808314cd2fcfc1a723ca9cc5e243 100755 (executable)
@@ -22,7 +22,6 @@
 require_once('./global.php');
 require_once('./includes/api_resolution.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::fieldsPages();
index 390771d674a7d1ace96c8d6e842271268ce40279..cd84bb163d3fab7483a3079c6e1da813bf144e9f 100755 (executable)
@@ -22,7 +22,6 @@
 require_once('./global.php');
 require_once('./includes/api_severity.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::fieldsPages();
index f2c07c812bbc4eae10adcae100c0ce3b43528872..9d1c56f4ac9124368b98476f57aa84f53f3030db 100755 (executable)
@@ -22,7 +22,6 @@
 require_once('./global.php');
 require_once('./includes/api_status.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::fieldsPages();
index 0040f4bec42124b57b64cca109dd75a6f1bb3eb5..012cc77715c47544384008b1e0b33aada27c643e 100644 (file)
@@ -23,7 +23,6 @@ require_once('./global.php');
 require_once('./includes/api_user.php');
 require_once('./includes/class_sort.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::usersPages();
index 868dc17344e9718e2450e4046b4eb2fe1c5fc1bf..e995b18493e0ee542ffa3bbcdfeb0307243b7d00 100755 (executable)
@@ -22,7 +22,6 @@
 require_once('./global.php');
 require_once('./includes/api_usergroup.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::usersPages();
index 8de665273685078c52a13ed95b489e5b05d44232..9e4d80ebf72d1ed65378ff70e647adc697365bfa 100755 (executable)
@@ -23,7 +23,6 @@ require_once('./global.php');
 require_once('./includes/api_userhelp.php');
 require_once('./includes/functions_datastore.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($admin), 'admin_error'));
 
 NavLinks::optionsPages();
index e6e506cbb9453f9c2c7bb38d9ecb498b5512cb74..91ea31d2565ac4e7fa7626f68cb4f523a6f6e509 100755 (executable)
@@ -29,7 +29,6 @@ define('SVN', '$Id$');
 $focus['showreport'] = 'focus';
 
 require_once('./global.php');
-require_once('./includes/class_api_error.php');
 require_once('./includes/class_notification.php');
 require_once('./includes/api_attachment.php');
 require_once('./includes/api_comment.php');
index efdf3298bfa9eb27c7c6827bd433c99a09d76ac4..7fd16a81d345bcc273b4e1a4c55f0f6ffc25a21f 100644 (file)
@@ -30,7 +30,6 @@ $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']);
index ea84e938f33f86ce788e11887a4046c4733ab779..ada44ad334d37f7ccc03e0102c5182f5aef770be 100644 (file)
@@ -29,7 +29,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');
 APIError(array(new API_Error_Handler($message), 'user_cumulative'));
 
 $bug = $db->queryFirst("
diff --git a/includes/class_api_error.php b/includes/class_api_error.php
deleted file mode 100644 (file)
index 9615c50..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-/*=====================================================================*\
-|| ###################################################################
-|| # Bugdar
-|| # Copyright ©2002-2007 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
-|| ###################################################################
-\*=====================================================================*/
-
-/**
-* API Error Handler
-*
-* This class is used to catch different kinds of API errors and throw the
-* appropriate front-size error depending on the context. Unlike normal
-* handlers, this class can be both instantiated and used statically: check
-* the method documentation for more information.
-*
-* @author              Blue Static
-* @copyright   Copyright ©2002 - 2007, Blue Static
-* @version             $Revision$
-* @package             Bugdar
-* 
-*/
-class API_Error_Handler
-{
-       /**
-       * Instance of an object that can run erros
-       * @var  object
-       * @access       private
-       */
-       var $object = null;
-       
-       // ###################################################################
-       /**
-       * Constructor: set the actionable object
-       *
-       * @access       public
-       *
-       * @param        object  Actionable object
-       */
-       function API_Error_Handler(&$obj)
-       {
-               $this->object =& $obj;
-       }
-       
-       // ###################################################################
-       /**
-       * The user-end cumulative reporter requires that the class be
-       * instantiated. This collects messages in the set message reporting
-       * object, but never throws the error. It is the caller's responsibility
-       * to check for the presence of errors and to throw the front-end
-       * warning using the message object.
-       *
-       * @access       public
-       *
-       * @param        string  Error message
-       */
-       function user_cumulative($error)
-       {
-               $this->object->addError($error);
-       }
-       
-       // ###################################################################
-       /**
-       * This calls the simple ISSO.Printer error message for the
-       * administrative-side errors.
-       *
-       * @access       public
-       *
-       * @param        string  Error message
-       */
-       function admin_error($error)
-       {
-               $this->object->error($error);
-       }
-}
-
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
-?>
\ No newline at end of file
index 0d7bd7fe2392856bcc769ffc6771694993cb18dc..80af05541bd7f6283c4715f3e94b62801479ba46 100755 (executable)
--- a/login.php
+++ b/login.php
@@ -31,7 +31,6 @@ $focus['user'] = 'focus';
 
 require_once('./global.php');
 require_once('./includes/api_user.php');
-require_once('./includes/class_api_error.php');
 
 // ###################################################################
 
index 02cc8825718aecb8a9f6ce3f5bc0c05eda7c75c1..c339a2b80b5f6726d1a188a1dc998b1fe05ddd26 100755 (executable)
@@ -33,7 +33,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]))
index c662ccf113698b52d1c10c940c80957542b20ada..550101e83aa8bae5cadd8fb8fa01225222082950 100755 (executable)
@@ -30,7 +30,6 @@ $focus['user'] = 'focus';
 require_once('./global.php');
 require_once('./includes/api_user.php');
 
-require_once('./includes/class_api_error.php');
 APIError(array(new API_Error_Handler($message), 'user_cumulative'));
 
 // ###################################################################
index 98d6801f7c8a1372bed3138be9f58db1c5af14cf..e10608bdd66aa81a4f29318e39170c54cc4e7fc9 100644 (file)
@@ -39,7 +39,6 @@ require_once('./includes/functions_product.php');
 require_once('./includes/class_sort.php');
 require_once('./includes/class_logging.php');
 require_once('./includes/api_bug.php');
-require_once('./includes/class_api_error.php');
 
 if (!can_perform('cansearch'))
 {
index 3b02a1342c5d763ce05996892375f9b63f5c08b5..2ab798ce95e6c6815fb7d4f3b04620b985c8259b 100644 (file)
@@ -30,7 +30,6 @@ define('SVN', '$Id$');
 $focus['user'] = 'focus';
 
 require_once('./global.php');
-require_once('./includes/class_api_error.php');
 require_once('./includes/api_user.php');
 
 if (!bugdar::$userinfo['userid'])