Changeset 13956 for trunk/plugins


Ignore:
Timestamp:
Apr 7, 2012, 11:00:51 PM (13 years ago)
Author:
plg
Message:

merge r13955 from branch 2.3 to trunk

bug 2610 fixed: make sure the $_GETlang or $_GETlanguage is in the
list of available languages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/language_switch/language_switch.inc.php

    r12922 r13956  
    4242    if (isset($_GET['lang']))
    4343    {
     44      include_once(PHPWG_ROOT_PATH . 'admin/include/languages.class.php');
     45      $languages = new languages();
     46      if (!in_array($_GET['lang'], array_keys($languages->fs_languages)))
     47      {
     48        $_GET['lang'] = PHPWG_DEFAULT_LANGUAGE;
     49      }
     50
    4451      if (!empty($_GET['lang']) and file_exists(PHPWG_ROOT_PATH.'language/'.$_GET['lang'].'/common.lang.php'))
    4552      {
Note: See TracChangeset for help on using the changeset viewer.