------------------------------------------------------------
revno: 1199
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Wed 2012-05-09 21:23:44 +0200
message:
  moving record hack form index to Record and engine
modified:
  index.php
  libs/Engine_aiki.php
  libs/Records.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-09 19:06:20 +0000
+++ index.php	2012-05-09 19:23:44 +0000
@@ -48,7 +48,6 @@
  */
 $html_cache_file = $aiki->Output->cache_file();
 
-
 $engineType = $aiki->site->engine();
 
 if  ( file_exists( "$AIKI_ROOT_DIR/libs/Engine_$engineType.php") ) {		
@@ -69,16 +68,6 @@
 	$custom_output = false;	
 }
 
-// move from $aiki->Records->edit_in_place
-if (isset($_POST['edit_form']) and
-	isset($_POST['form_id']) and
-	isset($_POST['record_id']) ) {
-	$serial_post = serialize($_POST);
-	$aiki->Records->edit_db_record_by_form_post($serial_post,
-												$_POST['form_id'],
-												$_POST['record_id']);
-}
-
 
 /**
  * Tidy html using libtidy, or output compressed output, or just output.

=== modified file 'libs/Engine_aiki.php'
--- libs/Engine_aiki.php	2012-05-09 19:06:20 +0000
+++ libs/Engine_aiki.php	2012-05-09 19:23:44 +0000
@@ -68,12 +68,21 @@
      */
     private $global_values = null;
 
+	public function __construct(){
+		global $aiki;
+		// this engine requires the load of this aiki module, first
+		// to save post form, before displaying results
+		$aiki->load("Records");
+	}
+
+
     /**
      * This is the basic Layout Creation method.
      * @global array  $db
      * @global aiki   $aiki
      * @TODO unusedParameters.
      */
+          
     public function render( $unusedParameters ) {
         global $aiki;
 

=== modified file 'libs/Records.php'
--- libs/Records.php	2012-04-24 08:39:24 +0000
+++ libs/Records.php	2012-05-09 19:23:44 +0000
@@ -94,6 +94,17 @@
 	private $allowed_extensions = "jpg|gif|png|jpeg|svg|pdf"; 
 
 
+	public function __construct(){	
+		if ( isset($_POST['edit_form']) && isset($_POST['form_id']) && isset($_POST['record_id']) ) {
+			$this->edit_db_record_by_form_post(
+				serialize($_POST),
+				$_POST['form_id'],
+				$_POST['record_id']);
+		}
+		
+	}
+
+
 	/**
 	 * Does a record exist.
 	 *

_______________________________________________
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