------------------------------------------------------------
revno: 1196
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Tue 2012-05-08 23:34:14 +0200
message:
  all engines use output lib
modified:
  index.php
  libs/Engine_aiki.php
  libs/Engine_v2.php
  libs/Output.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 'index.php'
--- index.php	2012-05-07 12:05:01 +0000
+++ index.php	2012-05-08 21:34:14 +0000
@@ -21,9 +21,6 @@
     {
         $value = stripslashes($value);
     }
-    array_walk_recursive($_GET, 'stripslashes_gpc');
-    array_walk_recursive($_POST, 'stripslashes_gpc');
-    array_walk_recursive($_COOKIE, 'stripslashes_gpc');
     array_walk_recursive($_REQUEST, 'stripslashes_gpc');
 }
 

=== modified file 'libs/Engine_aiki.php'
--- libs/Engine_aiki.php	2012-05-07 11:48:22 +0000
+++ libs/Engine_aiki.php	2012-05-08 21:34:14 +0000
@@ -72,8 +72,9 @@
      * This is the basic Layout Creation method.
      * @global array  $db
      * @global aiki   $aiki
+     * @TODO unusedParameters.
      */
-    public function render() {
+    public function render( $unusedParameters ) {
         global $aiki;
 
         // Convert global_values to an object to cache the SOL results in parsDBpars function.
@@ -85,6 +86,7 @@
 			"css"=>array() );
 		
 		$aiki->widgets->render_site($this);
+		return $aiki->Output->render_output($this);
 					
     }
 

=== modified file 'libs/Engine_v2.php'
--- libs/Engine_v2.php	2012-03-29 21:18:15 +0000
+++ libs/Engine_v2.php	2012-05-08 21:34:14 +0000
@@ -41,6 +41,9 @@
 	private $parsers;        // all allowed parsers
 	private $simple_parsers; // list of simple parser.
 
+    public  $widget_custom_output; // boolean, true if output haven't head,css body.
+	
+
 	/*
 	 * Create layout
 	 */
@@ -57,10 +60,11 @@
 			"header"=>"",
 			"css"=>array() );
 
+		$this->widget_custom_output = false; // @TODO, this engine only generate HTML.
 		$aiki->widgets->render_site($this);
 
-        // finally make html.
-		return $this->render_html();
+        // finally make html.         
+		return $aiki->Output->render_output($this);
 	}
 
 

=== modified file 'libs/Output.php'
--- libs/Output.php	2012-04-25 20:27:14 +0000
+++ libs/Output.php	2012-05-08 21:34:14 +0000
@@ -297,6 +297,20 @@
 	} // end of headers function
 
 
+
+    public function render_output ($engine){	   
+		
+		if ( isset($_REQUEST['noheaders']) || $engine->widget_custom_output) {
+			return $this->custom_output($engine);		
+		} else {   	
+			return 
+			$this->header($engine->target['css'],  $engine->target['header']).
+			$this->body($engine->target['body']).
+			$this->end();
+		}
+    }
+
+
 	public function custom_output($engine){
 		global $aiki;
 		// @TODO will this work for images output (or a plugin)

_______________________________________________
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