------------------------------------------------------------
revno: 1212
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Wed 2012-07-04 21:56:41 +0200
message:
header convert in array
modified:
libs/Engine_v2.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/Engine_v2.php'
--- libs/Engine_v2.php 2012-05-08 21:34:14 +0000
+++ libs/Engine_v2.php 2012-07-04 19:56:41 +0000
@@ -57,7 +57,7 @@
// @TODO javascript? id for some elements?
$this->target = array(
"body"=>"" ,
- "header"=>"",
+ "header"=>array(),
"css"=>array() );
$this->widget_custom_output = false; // @TODO, this engine only generate HTML.
@@ -427,15 +427,17 @@
return t("Not valid SQL. Must be SELECT, SHOW, DESCRIBE, or retrieve a value for a previuos query");
}
- $pagination = (bool) $parameters["pagination"];
- if ($pagination ){
+ $pagination = (bool) $parameters["pagination"] ;
+ if ( preg_match('/LIMIT [0-9]+([ ]*,[ ]*[0-9]+)?$/ui',$SQL) ){ // not ending LIMIT number[,number] in SQL.
+ $page=false;
+ } elseif ($pagination){
$page = isset($_GET[ $parameters["pagination-var"]]) ?
- $_GET[ $parameters["pagination-var"]]:1;
+ $_GET[ $parameters["pagination-var"]]:1;
$SQL .= " LIMIT ". ($page-1)*$parameters["records-per-page"].",". ($parameters["records-per-page"]+1);
- } elseif ( isset($parameters["limit"]) ){
+ } elseif ( isset($parameters["limit"]) ){
$SQL .= " LIMIT ". $parameters["limit"];
}
-
+
// launch the query and prepare errors-debug.
$db->last_error= false;
$results = $db->get_results($SQL);
@@ -594,7 +596,7 @@
*/
function parse_noaiki($text){
- return $text; //noaki can't contain any markup
+ return $text; //noaiki can't contain any markup
}
function parse_nl2br ($text){
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp