[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [555] trunk/bin



Revision: 555
          http://svn.sourceforge.net/ledger-smb/?rev=555&view=rev
Author:   tetragon
Date:     2006-11-12 21:58:32 -0800 (Sun, 12 Nov 2006)

Log Message:
-----------
Set default language code for selection

Modified Paths:
--------------
    trunk/bin/admin.pl
    trunk/bin/am.pl

Modified: trunk/bin/admin.pl
===================================================================
--- trunk/bin/admin.pl	2006-11-13 05:53:45 UTC (rev 554)
+++ trunk/bin/admin.pl	2006-11-13 05:58:32 UTC (rev 555)
@@ -336,9 +336,11 @@
 
 	%countrycodes = LedgerSMB::User->country_codes;
 	$countrycodes = "";
+	my $selectedcode = ($myconfig->{countrycode}) ? 
+		$myconfig->{countrycode} : 'en';
 
 	foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } keys %countrycodes) {
-		$countrycodes .= ($myconfig->{countrycode} eq $key) ? qq|<option selected value="$key">$countrycodes{$key}</option>|
+		$countrycodes .= ($selectedcode eq $key) ? qq|<option selected value="$key">$countrycodes{$key}</option>|
 															: qq|<option value="$key">$countrycodes{$key}</option>|;
 	}
 

Modified: trunk/bin/am.pl
===================================================================
--- trunk/bin/am.pl	2006-11-13 05:53:45 UTC (rev 554)
+++ trunk/bin/am.pl	2006-11-13 05:58:32 UTC (rev 555)
@@ -2046,9 +2046,10 @@
 
   %countrycodes = LedgerSMB::User->country_codes;
   $countrycodes = '';
+  my $selectedcode = ($myconfig{countrycode}) ? $myconfig{countrycode} : 'en';
   
   foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } keys %countrycodes) {
-    $countrycodes .= ($myconfig{countrycode} eq $key) ? "<option selected value=$key>$countrycodes{$key}\n" : "<option value=$key>$countrycodes{$key}\n";
+    $countrycodes .= ($selectedcode eq $key) ? "<option selected value=$key>$countrycodes{$key}\n" : "<option value=$key>$countrycodes{$key}\n";
   }
 
   opendir CSS, "css/.";


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.