------------------------------------------------------------
revno: 1139
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Tue 2012-03-13 20:39:08 +0100
message:
  fixed bug  953060 Structure button in Admin Panel doesn't work
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	2012-03-12 14:54:48 +0000
+++ libs/widgets.php	2012-03-13 19:39:08 +0000
@@ -159,8 +159,21 @@
 	
 	// the widget is given directly or
 	if (isset($_GET["widget"])) {
-		$this->render_widget($engine, $_GET['widget']);
-		return; //all work is done
+		$widget= $this->get_widget($_GET["widget"]);
+		if ( is_null($widget) ){
+			$content=  sprintf( t("No valid widget %s"), strip_tags($_GET["widget"]));
+		} else {
+			$content = $engine->parseWidget($widget);
+		}
+		
+		if ( $content !== false ){ 				
+			if ( is_array ($content) ){
+				$engine->target[$widget->widget_target] .= $content[0].$content[1];	
+			} else {
+				$engine->target[$widget->widget_target] .= $content;
+			}
+		}		
+		return; 
 	}
 
 	// or in url,

_______________________________________________
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