[pLog-svn] r5536 - in plog/branches/lifetype-1.2: class/dao templates/admin

oscar at devel.lifetype.net oscar at devel.lifetype.net
Tue Jun 12 16:54:22 EDT 2007


Author: oscar
Date: 2007-06-12 16:54:21 -0400 (Tue, 12 Jun 2007)
New Revision: 5536

Modified:
   plog/branches/lifetype-1.2/class/dao/blogsettings.class.php
   plog/branches/lifetype-1.2/templates/admin/blogsettings.template
Log:
Fix for issue http://bugs.lifetype.net/view.php?id=1334 -- articles_order wasn't initialized anywhere, so I don't even know what value it was getting. Now the most common option ("newest post first") appears as the first option in the select list in the blog settings page, so that people don't change the article sorting options by mistake when they update their blog settings for the first time.


Modified: plog/branches/lifetype-1.2/class/dao/blogsettings.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/blogsettings.class.php	2007-06-12 19:07:20 UTC (rev 5535)
+++ plog/branches/lifetype-1.2/class/dao/blogsettings.class.php	2007-06-12 20:54:21 UTC (rev 5536)
@@ -45,6 +45,7 @@
 			$this->setValue( "categories_order", 0 );
 			$this->setValue( "comments_order", $config->getValue( "comments_order" ));
 			$this->setValue( "time_offset", $config->getValue( "default_time_offset", DEFAULT_TIME_OFFSET ));
+			$this->setValue( "articles_order", 2 );  // :TODO: we should be using a constant here
 		}
 		
 		function getValue( $key, $defaultValue = null, $filterClass = null )

Modified: plog/branches/lifetype-1.2/templates/admin/blogsettings.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/blogsettings.template	2007-06-12 19:07:20 UTC (rev 5535)
+++ plog/branches/lifetype-1.2/templates/admin/blogsettings.template	2007-06-12 20:54:21 UTC (rev 5536)
@@ -183,8 +183,8 @@
       <label for="blogArticlesOrder">{$locale->tr("articles_order")}</label>
       <div class="formHelp">{$locale->tr("articles_order_help")}</div>
       <select name="blogArticlesOrder" id="blogArticlesOrder">
+        <option value="2" {if $blogArticlesOrder == 2 } selected="selected" {/if}>{$locale->tr("newest_first")}</option>	
         <option value="1" {if $blogArticlesOrder == 1 } selected="selected" {/if}>{$locale->tr("oldest_first")}</option>
-        <option value="2" {if $blogArticlesOrder == 2 } selected="selected" {/if}>{$locale->tr("newest_first")}</option>
       </select>
     </div>
 



More information about the pLog-svn mailing list