[pLog-svn] r5377 - in plugins/branches/lifetype-1.2/ayearago: . class/action

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed May 2 23:53:29 EDT 2007


Author: jondaley
Date: 2007-05-02 23:53:28 -0400 (Wed, 02 May 2007)
New Revision: 5377

Modified:
   plugins/branches/lifetype-1.2/ayearago/class/action/pluginayearagoupdateconfigaction.class.php
   plugins/branches/lifetype-1.2/ayearago/pluginayearago.class.php
   plugins/branches/lifetype-1.2/ayearago/readme.txt
Log:
updates from the author

Modified: plugins/branches/lifetype-1.2/ayearago/class/action/pluginayearagoupdateconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/ayearago/class/action/pluginayearagoupdateconfigaction.class.php	2007-05-03 03:42:16 UTC (rev 5376)
+++ plugins/branches/lifetype-1.2/ayearago/class/action/pluginayearagoupdateconfigaction.class.php	2007-05-03 03:53:28 UTC (rev 5377)
@@ -38,7 +38,7 @@
             // // update the plugin configurations to blog setting
 			$blogSettings = $this->_blogInfo->getSettings();
             $blogSettings->setValue( "plugin_ayearago_enabled", $this->_pluginEnabled );
-            $blogSettings->setValue( "plugin_ayearago_maxcomments", $this->_maxPosts );
+            $blogSettings->setValue( "plugin_ayearago_maxposts", $this->_maxPosts );
             $this->_blogInfo->setSettings( $blogSettings ); 
 		
 			// save the blogs settings

Modified: plugins/branches/lifetype-1.2/ayearago/pluginayearago.class.php
===================================================================
--- plugins/branches/lifetype-1.2/ayearago/pluginayearago.class.php	2007-05-03 03:42:16 UTC (rev 5376)
+++ plugins/branches/lifetype-1.2/ayearago/pluginayearago.class.php	2007-05-03 03:53:28 UTC (rev 5377)
@@ -16,7 +16,7 @@
             $this->id        = "ayearago";
             $this->author    = "Mariano Draghi (cHagHi)";
             $this->desc      = "This plugin offers various methods to get a list of posts written a year before a given post, or based on the current date.";
-            $this->version   = '20070302';
+            $this->version   = '20070502';
 			$this->locales   = Array( "en_UK", "es_ES" );
 
 			if( $source == "admin" )
@@ -79,6 +79,9 @@
             
             // Now check that the retrieved posts don't get overlaped with the previous post
             $prevArticle = $post->getPrevArticle();
+            if(!is_object($prevArticle))
+                return( $posts );
+
             $prevTimestamp = $this->_getAYearAgoTimestamp( $prevArticle->getDateObject(), true );
             $validPosts = Array();
             foreach ( $posts as $post )
@@ -139,5 +142,15 @@
 
             return $day;
         }
+
+        function getPluginConfigurationKeys(){
+            lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+            return( Array(
+                        Array( "name" => "plugin_ayearago_enabled", "type" => "boolean" ),
+                        Array( "name" => "plugin_ayearago_maxposts",
+                               "validator" => new IntegerValidator(), "type" => "integer", "allowEmpty" => true ),
+                        ));
+        }
+        
     }
 ?>

Modified: plugins/branches/lifetype-1.2/ayearago/readme.txt
===================================================================
--- plugins/branches/lifetype-1.2/ayearago/readme.txt	2007-05-03 03:42:16 UTC (rev 5376)
+++ plugins/branches/lifetype-1.2/ayearago/readme.txt	2007-05-03 03:53:28 UTC (rev 5377)
@@ -1,7 +1,7 @@
 Plugin: A Year Ago
 Author: Mariano Draghi
 Release Date: 2006/11/02
-Version: 1.0
+Current Version: 20070502
 
 This plugin offers various methods to get a list of posts written a year
 before a given post, or a year before based on the current date.
@@ -49,3 +49,8 @@
 </div>
 {/if}
 {/if}
+
+Changelog
+=========
+20070502 - Migrated to LifeType 1.2 and minor bugfixing
+1.0      - Initial version



More information about the pLog-svn mailing list