]> src.bluestatic.org Git - bugdar.git/blob - includes/api_resolution.php
Fix the password reset email system
[bugdar.git] / includes / api_resolution.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar
5 || # Copyright ©2002-2007 Blue Static
6 || #
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version 2 of the License.
10 || #
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 || # more details.
15 || #
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
21
22 $GLOBALS['isso:callback']->load('api', null);
23
24 require_once('./includes/functions_datastore.php');
25
26 /**
27 * API: Resolution
28 *
29 * @author Blue Static
30 * @copyright Copyright ©2002 - 2007, Blue Static
31 * @version $Revision$
32 * @package Bugdar
33 *
34 */
35 class ResolutionAPI extends API
36 {
37 /**
38 * Fields
39 * @var array
40 * @access private
41 */
42 var $fields = array(
43 'resolutionid' => array(TYPE_UINT, REQ_AUTO, 'verify_nozero'),
44 'resolution' => array(TYPE_STR, REQ_YES, 'verify_noempty'),
45 'displayorder' => array(TYPE_INT, REQ_NO)
46 );
47
48 /**
49 * Database table
50 * @var string
51 * @access private
52 */
53 var $table = 'resolution';
54
55 /**
56 * Table prefix
57 * @var string
58 * @access private
59 */
60 var $prefix = TABLE_PREFIX;
61
62 // ###################################################################
63 /**
64 * Post-insert
65 *
66 * @access protected
67 */
68 function post_insert()
69 {
70 build_resolutions();
71 }
72
73 // ###################################################################
74 /**
75 * Post-update
76 *
77 * @access protected
78 */
79 function post_update()
80 {
81 build_resolutions();
82 }
83
84 // ###################################################################
85 /**
86 * Post-delete
87 *
88 * @access protected
89 */
90 function post_delete()
91 {
92 build_resolutions();
93 $this->registry->db->query("UPDATE " . TABLE_PREFIX . "bug SET resolution = " . $this->registry->clean(bugdar::$options['defaultresolve'], TYPE_UINT) . " WHERE resolution = " . $this->values['resolutionid']);
94 }
95 }
96
97 /*=====================================================================*\
98 || ###################################################################
99 || # $HeadURL$
100 || # $Id$
101 || ###################################################################
102 \*=====================================================================*/
103 ?>