From e98f8b98227618f066c95637937387c6181581b5 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 17 Oct 2005 04:34:33 +0000 Subject: [PATCH] Added REQ_SET constant to allow an API to set a field --- api.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api.php b/api.php index 595d08f..867e854 100644 --- a/api.php +++ b/api.php @@ -42,6 +42,11 @@ if (!defined('REQ_YES')) * Auto-increasing value */ define('REQ_AUTO', -1); + + /** + * Set by a cusotm set_*() function + */ + define('REQ_SET', 2); } /** @@ -324,6 +329,10 @@ class API trigger_error('Field `' . $name . '` was not set', E_USER_ERROR); } } + else if ($options[1] == REQ_SET) + { + $this->{"set_$name"}(); + } } } -- 2.22.5