[pLog-svn] r1176 - plog/trunk/class/action

jondaley at devel.plogworld.net jondaley at devel.plogworld.net
Wed Feb 23 18:49:01 GMT 2005


Author: jondaley
Date: 2005-02-23 18:49:01 +0000 (Wed, 23 Feb 2005)
New Revision: 1176

Modified:
   plog/trunk/class/action/addcommentaction.class.php
Log:
don't fill in auto 'http://' if the user didn't even type in a URL

Modified: plog/trunk/class/action/addcommentaction.class.php
===================================================================
--- plog/trunk/class/action/addcommentaction.class.php	2005-02-23 17:12:22 UTC (rev 1175)
+++ plog/trunk/class/action/addcommentaction.class.php	2005-02-23 18:49:01 UTC (rev 1176)
@@ -74,8 +74,10 @@
                 $this->_parentId = 0;
             $this->_userEmail = trim($this->_request->getValue( "userEmail" ));
             $this->_userUrl   = trim($this->_request->getValue( "userUrl" ));
-			if( substr($this->_userUrl, 0, 7 ) != "http://" )
-				$this->_userUrl = "http://".$this->_userUrl;
+            if( (strlen($this->_userUrl) != 0) &&
+                  (substr($this->_userUrl, 0, 7 ) != "http://" )){
+                $this->_userUrl = "http://".$this->_userUrl;
+            }
             $this->_userName  = trim($this->_request->getValue( "userName" ));
             $this->_commentText = trim($this->_request->getValue( "commentText" ));
             $this->_commentTopic = trim($this->_request->getValue( "commentTopic" ));
@@ -210,4 +212,4 @@
 			return BlogController::setForwardAction( "ViewArticle" );
         }
     }
-?>
\ No newline at end of file
+?>




More information about the pLog-svn mailing list