Change BSApi::remove() to BSApi::delete()
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 6 Sep 2008 18:24:04 +0000 (14:24 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 6 Sep 2008 18:24:04 +0000 (14:24 -0400)
* Api.php:
(BSApi::remove): Renamed to delete()

Api.php
CHANGES

diff --git a/Api.php b/Api.php
index ea93263b406b863ef6b8e39b83bdbb10a27205a2..0e5ecd30a29b3b85d23b80f064b0396bbd11d170 100644 (file)
--- a/Api.php
+++ b/Api.php
@@ -62,7 +62,7 @@ if (!defined('REQ_AUTO'))
  * Abstract API
  *
  * Abstract class that is used as an API base for most common database interaction
- * schemes. Creates a simple structure that holds data and can update, remove, and
+ * schemes. Creates a simple structure that holds data and can update, delete, and
  * insert.
  * 
  * Life-cycle of a new object:
@@ -374,10 +374,10 @@ abstract class BSApi
        /**
         * Deletes a record
         *
-        * @param       bool    Run pre_remove()?
-        * @param       bool    Run post_remove()?
+        * @param       bool    Run pre_delete()?
+        * @param       bool    Run post_delete()?
         */
-       public function remove($doPre = true, $doPost = true)
+       public function delete($doPre = true, $doPost = true)
        {
                if (!$this->condition)
                {
@@ -386,11 +386,11 @@ abstract class BSApi
                
                $this->fetch();
                
-               $this->_runActionMethod('pre_remove', $doPre);
+               $this->_runActionMethod('pre_delete', $doPre);
                
                BSApp::$db->query("DELETE FROM {$this->prefix}{$this->table} WHERE {$this->condition}");
                
-               $this->_runActionMethod('post_remove', $doPost);
+               $this->_runActionMethod('post_delete', $doPost);
        }
        
        /**
diff --git a/CHANGES b/CHANGES
index 81fa2e26867d0cf8c5a895cb64cb6211168e5427..5ff97e894c2cd44516ee2687e14089ca79cfc3b3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 3.1.2
 ===================
 - Fixed: BSDb::query() would not generate a Result object for explain, show, and describe queries
+- Change: Change BSApi::remove() to be ::delete() again
 
 3.1.1
 ===================