[pLog-svn] r4242 - plugins/branches/lifetype-1.1/shoutbox/class/action

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sun Nov 5 19:30:01 GMT 2006


Author: oscar
Date: 2006-11-05 19:30:00 +0000 (Sun, 05 Nov 2006)
New Revision: 4242

Modified:
   plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxnewshoutaction.class.php
Log:

one last fix, the view is redirected back where we came from.


Modified: plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxnewshoutaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxnewshoutaction.class.php	2006-11-05 19:22:36 UTC (rev 4241)
+++ plugins/branches/lifetype-1.1/shoutbox/class/action/pluginshoutboxnewshoutaction.class.php	2006-11-05 19:30:00 UTC (rev 4242)
@@ -5,6 +5,7 @@
 
 include_once( PLOG_CLASS_PATH."plugins/shoutbox/class/dao/shoutbox.class.php" );
 include_once( PLOG_CLASS_PATH."class/view/errorview.class.php" );
+include_once( PLOG_CLASS_PATH."class/view/redirectview.class.php" );
 
 /**
   * shows a form with the current configuration
@@ -100,9 +101,14 @@
     $this->_view = new PluginTemplatedView($this->_blogInfo, "shoutbox", "shoutbox_newshout" );
     $this->_view->setValue("returnPage", $_POST['shoutbox_return']);
     */
-    
-    $this->_view = new InfoView($this->_blogInfo );
-    $this->_view->setInfoMessage("shout_added");
+
+    if (array_key_exists( 'HTTP_REFERER', $_SERVER )) {
+		$this->_view = new RedirectView( $_SERVER['HTTP_REFERER'] );
+	}
+    else {
+    	$this->_view = new InfoView($this->_blogInfo );
+    	$this->_view->setInfoMessage("shout_added");
+	}
       
     
     $this->setCommonData();



More information about the pLog-svn mailing list