Changeset 13955


Ignore:
Timestamp:
04/07/12 22:59:33 (7 years ago)
Author:
plg
Message:

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

Location:
branches/2.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/install.php

    r12103 r13955  
    179179{ 
    180180  $language = strip_tags($_GET['language']); 
     181   
     182  if (!in_array($language, array_keys($languages->fs_languages))) 
     183  { 
     184    $language = PHPWG_DEFAULT_LANGUAGE; 
     185  } 
    181186} 
    182187else 
  • branches/2.3/plugins/language_switch/language_switch.inc.php

    r12342 r13955  
    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      { 
  • branches/2.3/upgrade.php

    r12296 r13955  
    155155{ 
    156156  $language = strip_tags($_GET['language']); 
     157 
     158  if (!in_array($language, array_keys($languages->fs_languages))) 
     159  { 
     160    $language = PHPWG_DEFAULT_LANGUAGE; 
     161  } 
    157162} 
    158163else 
Note: See TracChangeset for help on using the changeset viewer.