[pLog-svn] r630 - plog/trunk/class/action
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Thu Dec 30 16:57:46 GMT 2004
Author: oscar
Date: 2004-12-30 16:57:46 +0000 (Thu, 30 Dec 2004)
New Revision: 630
Modified:
plog/trunk/class/action/addcommentaction.class.php
Log:
fixed a very strange bug, because AddCommentAction and ViewArticleAction were sharing a parameter called "userName", so when AddCommentAction was forwarding the execution flow to ViewArticleAction, the second was was picking the userName parameter thinking that the user wanted to see an article posted by the user whose user name was specified in the userName parameter. Quite a nasty and stupid bug but very annoying to find... Thanks Baochen for reporting it!!
Modified: plog/trunk/class/action/addcommentaction.class.php
===================================================================
--- plog/trunk/class/action/addcommentaction.class.php 2004-12-30 16:46:05 UTC (rev 629)
+++ plog/trunk/class/action/addcommentaction.class.php 2004-12-30 16:57:46 UTC (rev 630)
@@ -205,6 +205,13 @@
// but let's leave it as it is for the time being...
//
CacheControl::resetBlogCache( $this->_blogInfo->getId());
+
+ // clean up the request, there's a parameter called 'userName' also used by
+ // ViewArticleAction but that doesn't have the same meaning so we better remove it
+ // before it's too late!
+ $request = HttpVars::getRequest();
+ $request["userName"] = "";
+ HttpVars::setRequest( $request );
// forward the action to ViewArticleAction
return BlogController::setForwardAction( "ViewArticle" );
More information about the pLog-svn
mailing list