------------------------------------------------------------
revno: 1020
committer: Jakub Jankiewicz <[email protected]>
branch nick: aikiframework
timestamp: Wed 2012-01-11 20:42:11 +0100
message:
  Fix bug with fields in inline SQL
modified:
  libs/SqlMarkup.php


--
lp:aikiframework
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk

Your team Aiki Framework Developers is subscribed to branch lp:aikiframework.
To unsubscribe from this branch go to 
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'libs/SqlMarkup.php'
--- libs/SqlMarkup.php	2011-11-08 13:42:45 +0000
+++ libs/SqlMarkup.php	2012-01-11 19:42:11 +0000
@@ -95,6 +95,12 @@
 						if (!preg_match('/\(select(.*)/', $html)) {
 							$html = substr($html,0,-1);
 						}
+						//ez_SQL return array or Object not assoc
+						$result = get_object_vars($result);
+						foreach ($result as $k => $v) {
+							$html = str_replace("[-[".$k."]-]", $v,  $html);
+						}
+						/* just in case
 						$result = $aiki->AikiArray->object2array($result);
 						$result_key = @array_flip($result);
 
@@ -104,7 +110,7 @@
 											"]-]", $field,  $html);
 							}
 						}
-
+						*/
 						$match .= $html;
 						
 						/**

_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to