CVS update: /cowiki/includes/cowiki/class/dao/

[email protected] 12 May 2005 19:48:06 -0000
Newsgroups gmane.comp.php.cowiki.cvs
Message-ID <[email protected]>
User: dgorski 
Date: 2005/05/12 12:48:06

Modified:
   cowiki/includes/cowiki/class/dao/class.StorageMySQLi.php

Log:
 Addded getLastInsertId() that overwrites the parent method

File Changes:

Directory: /cowiki/includes/cowiki/class/dao/
=============================================

File [changed]: class.StorageMySQLi.php
Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/class/dao/class.StorageMySQLi.php?r1=1.16&r2=1.17
Delta lines:  +17 -4
--------------------
--- class.StorageMySQLi.php	7 May 2005 00:30:53 -0000	1.16
+++ class.StorageMySQLi.php	12 May 2005 19:48:04 -0000	1.17
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.StorageMySQLi.php,v 1.16 2005/05/07 00:30:53 dgorski Exp $
+ * $Id: class.StorageMySQLi.php,v 1.17 2005/05/12 19:48:04 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -17,7 +17,7 @@
  * @author      Daniel T. Gorski, <[email protected]>
  * @copyright   (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license     http://www.gnu.org/licenses/gpl.html
- * @version     $Revision: 1.16 $
+ * @version     $Revision: 1.17 $
  *
  */
 
@@ -234,8 +234,21 @@
 
     // --------------------------------------------------------------------
 
-    protected function setLastInsertId() {
-        $this->sLastId = @mysqli_insert_id($this->rLink);
+    /**
+     * Get last insert id
+     *
+     * @access  public
+     * @param   string
+     * @return  mixed
+     *
+     * @author  Daniel T. Gorski, <[email protected]>
+     * @since   coWiki 0.4.0
+     *
+     * @todo    [D11N]  Check description
+     * @todo    [D11N]  Check return type
+     */
+    public function getLastInsertId($sTableName) {
+        return @mysqli_insert_id($this->rLink);
     }
     
     // --------------------------------------------------------------------