------------------------------------------------------------
revno: 986
committer: Jakub Jankiewicz <[email protected]>
branch nick: aikiframework
timestamp: Mon 2011-12-26 21:34:56 +0100
message:
  Fix issue with nested select and pagination
modified:
  libs/widgets.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/widgets.php'
--- libs/widgets.php	2011-12-26 19:37:07 +0000
+++ libs/widgets.php	2011-12-26 20:34:56 +0000
@@ -670,9 +670,9 @@
 		// calculate the number of pages and prepare the sql 
 		// to extract this rows
 		$numpages=0;
-		if ( $widget->link_example and 
-			$widget->records_in_page and 
-			$widget->normal_select )	{
+		if ( $widget->link_example and
+			$widget->records_in_page and
+			$widget->normal_select ) {
 			if ( $records_num >= $widget->records_in_page ) {
 				$numpages = ceil($records_num / $widget->records_in_page);
 			} else {
@@ -1268,7 +1268,7 @@
 				$mysql_count = ' count(*) ';
 			}
 			$new_sql = preg_replace(
-				"/^select.*? from /Usi",
+				"/^select.*from /Usi",
 				"SELECT $mysql_count FROM ",
 				$sql);
 			// if there is a unique 'ORDER BY', try remove it.	

_______________________________________________
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