[ghelda-devel] [66] Correct current/end glitch. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/ghelda-devel Archives
]
Revision: 66
Author: odyx
Date: 2009-07-24 23:18:38 +0200 (Fri, 24 Jul 2009)
Log Message:
-----------
Correct current/end glitch.
Modified Paths:
--------------
trunk/plugins/Address.php
trunk/plugins/People.php
Modified: trunk/plugins/Address.php
===================================================================
--- trunk/plugins/Address.php 2009-07-24 21:18:37 UTC (rev 65)
+++ trunk/plugins/Address.php 2009-07-24 21:18:38 UTC (rev 66)
@@ -195,9 +195,9 @@
if(PEAR::isError($queryR))
return false;
// Get the just produced ID (per client => thread-safe)
- $query = "SELECT LAST_INSERT_ID()";
+ $query = "SELECT LAST_INSERT_ID();";
$queryR =& $this->db->query($query);
- $id =& current($queryR->fetchRow());
+ $id =& end($queryR->fetchRow());
// Success => mode = 'edit'
$this->mode = 'edit';
}
@@ -385,4 +385,4 @@
return $to_return;
}
}
-?>
\ No newline at end of file
+?>
Modified: trunk/plugins/People.php
===================================================================
--- trunk/plugins/People.php 2009-07-24 21:18:37 UTC (rev 65)
+++ trunk/plugins/People.php 2009-07-24 21:18:38 UTC (rev 66)
@@ -185,7 +185,7 @@
if(PEAR::isError($queryR))
return false;
$result =& $queryR->fetchRow();
- if(current($result) <> 0) { // If the only result (the counting) is different from zero, we already have something
+ if(end($result) <> 0) { // If the only result (the counting) is different from zero, we already have something
// Error
$fieldsSpec[$fieldName_]['error'] = true;
// Warning
@@ -367,4 +367,4 @@
return $to_return;
}
}
-?>
\ No newline at end of file
+?>