[pLog-svn] r7140 - in plugins/branches/lifetype-1.2/secretblog: . class/security

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Oct 26 15:08:29 EDT 2011


Author: jondaley
Date: 2011-10-26 15:08:29 -0400 (Wed, 26 Oct 2011)
New Revision: 7140

Modified:
   plugins/branches/lifetype-1.2/secretblog/class/security/secretblogfilter.class.php
   plugins/branches/lifetype-1.2/secretblog/pluginsecretblog.class.php
Log:
fixes undefined references.  Thanks raciloni.  http://bugs.lifetype.net/view.php?id=1655

Modified: plugins/branches/lifetype-1.2/secretblog/class/security/secretblogfilter.class.php
===================================================================
--- plugins/branches/lifetype-1.2/secretblog/class/security/secretblogfilter.class.php	2011-10-04 14:19:58 UTC (rev 7139)
+++ plugins/branches/lifetype-1.2/secretblog/class/security/secretblogfilter.class.php	2011-10-26 19:08:29 UTC (rev 7140)
@@ -74,22 +74,14 @@
          * @private
          * Returns true if the user has already been authenticated for this session
          */
-        function isUserAuthenticated( $blogInfo )
-        {
-		// Get the password from the cookie
-		$sessionPassword = $_COOKIE["blogPassword"];
-
-        	if( $sessionPassword ) {        	
-        		$blogSettings = $blogInfo->getSettings();
-        		$blogPassword = $blogSettings->getValue( "plugin_secretblog_password" );
-        		if( $sessionPassword == $blogPassword )
-        			return true;
-        		else
-        			return false;
-        	}
-        	
-        	else       		
-        		return false;
+        function isUserAuthenticated( $blogInfo ){
+			if(!isset($_COOKIE["blogPassword"]) || $_COOKIE["blogPassword"] == '')
+                return false;
+            
+            $sessionPassword = $_COOKIE["blogPassword"];
+            $blogSettings = $blogInfo->getSettings();
+            $blogPassword = $blogSettings->getValue( "plugin_secretblog_password" );
+            return ($sessionPassword == $blogPassword);
         }
         
         /**
@@ -102,7 +94,6 @@
 			$ts = new TemplateService();
 			$t = $ts->PluginTemplate( "secretblog", "passwordform" );
 			$t->assign( "locale", $blogInfo->getLocale() );
-			$t->assign( "articleId", $articleId );
 			$t->assign( "url", $blogInfo->getBlogRequestGenerator());
 			$t->assign( "blog", $blogInfo );
 			return( $t->fetch());

Modified: plugins/branches/lifetype-1.2/secretblog/pluginsecretblog.class.php
===================================================================
--- plugins/branches/lifetype-1.2/secretblog/pluginsecretblog.class.php	2011-10-04 14:19:58 UTC (rev 7139)
+++ plugins/branches/lifetype-1.2/secretblog/pluginsecretblog.class.php	2011-10-26 19:08:29 UTC (rev 7140)
@@ -12,7 +12,7 @@
 			
 			$this->id = "secretblog";
 			$this->author = "The LifeType Project";
-            $this->version = "20070522";
+            $this->version = "20111026";
 			
 			// we only need to register a filter
             $this->registerFilter( "SecretBlogFilter" );



More information about the pLog-svn mailing list