load('api', null); require_once('./includes/functions_datastore.php'); /** * API: Priority * * @author Blue Static * @copyright Copyright ©2002 - 2007, Blue Static * @version $Revision$ * @package Bugdar * */ class PriorityAPI extends API { /** * Fields * @var array * @access private */ var $fields = array( 'priorityid' => array(TYPE_UINT, REQ_AUTO, 'verify_nozero'), 'priority' => array(TYPE_STR, REQ_YES, 'verify_noempty'), 'displayorder' => array(TYPE_INT, REQ_NO) ); /** * Database table * @var string * @access private */ var $table = 'priority'; /** * Table prefix * @var string * @access private */ var $prefix = TABLE_PREFIX; // ################################################################### /** * Post-insert * * @access protected */ function post_insert() { build_priorities(); } // ################################################################### /** * Post-update * * @access protected */ function post_update() { build_priorities(); } // ################################################################### /** * Post-delete * * @access protected */ function post_delete() { build_priorities(); $this->registry->db->query("UPDATE " . TABLE_PREFIX . "bug SET priority = " . bugdar::$options['defaultpriority'] . " WHERE priority = " . $this->values['priorityid']); } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>