SF.net SVN: phpwiki:[10666] trunk/lib/WikiTheme.php

vargenau--- via phpwiki-checkins <[email protected]>
Newsgroups gmane.comp.web.wiki.phpwiki.checkins
Message-ID <[email protected]>
Revision: 10666
          http://sourceforge.net/p/phpwiki/code/10666
Author:   vargenau
Date:     2021-11-21 17:48:24 +0000 (Sun, 21 Nov 2021)
Log Message:
-----------
Get language from preferences if possible

Modified Paths:
--------------
    trunk/lib/WikiTheme.php

Modified: trunk/lib/WikiTheme.php
===================================================================
--- trunk/lib/WikiTheme.php	2021-11-21 17:20:48 UTC (rev 10665)
+++ trunk/lib/WikiTheme.php	2021-11-21 17:48:24 UTC (rev 10666)
@@ -1618,7 +1618,12 @@
 
         $dbi = $request->getDbh();
         // display flat calender dhtml in the sidebar
-        $jslang = @$GLOBALS['LANG'];
+        if (isset($request->_prefs)) {
+            $pref = $request->_prefs;
+            $jslang = $pref->get('lang');
+        } else {
+            $jslang = "en";
+        }
         $this->addMoreHeaders(
                 $this->_CSSlink(0,
                     $this->_findFile('jscalendar/calendar-phpwiki.css'), 'all'));

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.