optimize customer list, RT#20173
[freeside.git] / FS / FS / Msgcat.pm
index 2406e8d..b6f36bf 100644 (file)
@@ -61,7 +61,7 @@ sub _gettext {
   return '' unless defined($msgcode) && length($msgcode) > 0;
 
   my $locale =  (@_ && shift)
-             || $FS::CurrentUser::CurrentUser->option('locale')
+             || $FS::CurrentUser::CurrentUser->locale
              || $def_locale;
 
   return $cache{$locale}->{$msgcode} if exists $cache{$locale}->{$msgcode};
@@ -87,8 +87,8 @@ sub _gettext {
                                        });
         warn "WARNING: auto-inserting message for msgcode $msgcode in locale $locale";
         $newmsgcat->insert;
-        return $msgcode; # or maybe this should be below the next bracket?
     }
+    return $msgcode;
   }
 
 }