Added a parameter in API->delete() to optionally stop the running of API->set_existin...
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 17 Jul 2006 20:16:07 +0000 (20:16 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 17 Jul 2006 20:16:07 +0000 (20:16 +0000)
api.php
dev/changes.txt

diff --git a/api.php b/api.php
index 4dbbf1faa9dd506625178b98701504bc3070c79c..68eb613ccb263128d411315e77d2b8283bd576d2 100644 (file)
--- a/api.php
+++ b/api.php
@@ -484,15 +484,20 @@ class API
        * Deletes a record
        *
        * @access       public
+       *
+       * @param        bool    Run API->set_existing()?
        */
-       function delete()
+       function delete($runset = true)
        {
                if ($this->condition == '')
                {
                        trigger_error('Condition is empty: cannot fetch', E_USER_ERROR);
                }
                
-               $this->set_existing();
+               if ($runset)
+               {
+                       $this->set_existing();
+               }
                
                $this->run_action_method('pre_delete');
                
index 33a7c81b4f6416cda723722024e8f3a3a1e8b5f0..e5a92c0fbf2772e40a35ebcf7f59934ba806e822 100644 (file)
@@ -5,6 +5,7 @@
 - DB_MySQL can now properly escape binary
 - No longer populate API->values[] when calling API->fetch() [api.php]
 - Added a parameter in Mail->send() to optionally clear the to list after sending [mail.php]
+- Added a parameter in API->delete() to optionally stop the running of API->set_existing() [api.php]
 
 2.0.0
 ===============