[pLog-svn] r1978 - in plog/branches/plog-1.0.1: class/summary/view templates/summary

reto at devel.plogworld.net reto at devel.plogworld.net
Mon May 9 19:48:00 GMT 2005


Author: reto
Date: 2005-05-09 19:48:00 +0000 (Mon, 09 May 2005)
New Revision: 1978

Modified:
   plog/branches/plog-1.0.1/class/summary/view/doblogregistrationview.class.php
   plog/branches/plog-1.0.1/templates/summary/registerstep2.template
Log:
the dropdown in the registration process actually didn't take the default language into account. the "selected" was never chosen because of wrong vars used in the template. AFAIK the default language was never distributed from the view. doblogregistration now provides the template with the default language...

Modified: plog/branches/plog-1.0.1/class/summary/view/doblogregistrationview.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/summary/view/doblogregistrationview.class.php	2005-05-09 19:39:09 UTC (rev 1977)
+++ plog/branches/plog-1.0.1/class/summary/view/doblogregistrationview.class.php	2005-05-09 19:48:00 UTC (rev 1978)
@@ -19,6 +19,10 @@
 			// get the list of languages available, so that users can choose
 			$locales = Locales::getLocales();
 			$this->setValue( "locales", $locales );
+            
+            $config =& Config::getConfig();
+            // assign default Local to template
+            $this->setValue( "defaultLocale", $config->getValue("default_locale" ) );
 			
 			// and render the rest of the contents of the view
 			parent::render();

Modified: plog/branches/plog-1.0.1/templates/summary/registerstep2.template
===================================================================
--- plog/branches/plog-1.0.1/templates/summary/registerstep2.template	2005-05-09 19:39:09 UTC (rev 1977)
+++ plog/branches/plog-1.0.1/templates/summary/registerstep2.template	2005-05-09 19:48:00 UTC (rev 1978)
@@ -16,7 +16,7 @@
      <div class="formHelp">{$locale->tr("blog_language_help")}</div>
      <select name="blogLocale" id="blogLocale">
       {foreach from=$locales item=localeObject}
-        <option value="{$localeObject->getLocaleCode()}" {if $blogLocale == $localeObject->getLocaleCode()}selected="selected"{/if}>{$localeObject->getDescription()}</option>
+        <option value="{$localeObject->getLocaleCode()}" {if $defaultLocale == $localeObject->getLocaleCode()}selected="selected"{/if}>{$localeObject->getDescription()}</option>
       {/foreach}
      </select>
    </div>




More information about the pLog-svn mailing list