← Back to team overview

anewt-developers team mailing list archive

[Branch ~uws/anewt/anewt.uws] Rev 1752: [autorecord] Fix broken db_find_{one, all}_by_id()

 

------------------------------------------------------------
revno: 1752
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Tue 2010-02-16 00:50:48 +0100
message:
  [autorecord] Fix broken db_find_{one,all}_by_id()
  
  Oops, the internal API recently changed and this method had
  not been updated for the "only one primary key value
  specified" case.
modified:
  autorecord/autorecord.lib.php


--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws

Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.
=== modified file 'autorecord/autorecord.lib.php'
--- autorecord/autorecord.lib.php	2010-02-15 23:40:39 +0000
+++ autorecord/autorecord.lib.php	2010-02-15 23:50:48 +0000
@@ -764,8 +764,8 @@
 		if (count($values) == 1)
 		{
 			/* Simple lookup by column */
-			return AnewtAutoRecord::_db_find_by_column(
-				$class, $just_one_result, $primary_key_column, $values[0], $connection);
+			return AnewtAutoRecord::_db_find_by_columns(
+				$class, $just_one_result, array($primary_key_column => $values[0]), $connection);
 		}
 		else
 		{