Vergleich inc/class_language.php - 1.6.11 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 77Zeile 77
	 */
function set_language($language="english", $area="user")
{

	 */
function set_language($language="english", $area="user")
{

		global $settings;

		global $mybb;

		
$language = preg_replace("#[^a-z0-9\-_]#i", "", $language);


		
$language = preg_replace("#[^a-z0-9\-_]#i", "", $language);


Zeile 102Zeile 102
		{
if(!is_dir($this->path."/".$language."/{$area}"))
{

		{
if(!is_dir($this->path."/".$language."/{$area}"))
{

				if(!is_dir($this->path."/".$settings['cplanguage']."/{$area}"))

				if(!is_dir($this->path."/".$mybb->settings['cplanguage']."/{$area}"))

				{
if(!is_dir($this->path."/english/{$area}"))
{

				{
if(!is_dir($this->path."/english/{$area}"))
{

Zeile 115Zeile 115
				}
else
{

				}
else
{

					$language = $settings['cplanguage'];

					$language = $mybb->settings['cplanguage'];

				}
}
$this->language = $language."/{$area}";

				}
}
$this->language = $language."/{$area}";

Zeile 134Zeile 134
	{
// Assign language variables.
// Datahandlers are never in admin lang directory.

	{
// Assign language variables.
// Datahandlers are never in admin lang directory.

		if($isdatahandler)

		if($isdatahandler === true)

		{

		{

			$lfile = $this->path.'/'.str_replace('/admin', '', $this->language).'/'.$section.'.lang.php';

			$lfile = $this->path."/".str_replace('/admin', '', $this->language)."/".$section.".lang.php";

		}
else
{

		}
else
{

			$lfile = $this->path.'/'.$this->language.'/'.$section.'.lang.php';

			$lfile = $this->path."/".$this->language."/".$section.".lang.php";

		}

if(file_exists($lfile))

		}

if(file_exists($lfile))

Zeile 150Zeile 150
		elseif(file_exists($this->path."/".$this->fallback."/".$section.".lang.php"))
{
require_once $this->path."/".$this->fallback."/".$section.".lang.php";

		elseif(file_exists($this->path."/".$this->fallback."/".$section.".lang.php"))
{
require_once $this->path."/".$this->fallback."/".$section.".lang.php";

 
		}
// Deprecated! This fallback will be removed in future versions!
elseif(file_exists($this->path."/english/".$section.".lang.php"))
{
require_once $this->path."/english/".$section.".lang.php";

		}
else
{

		}
else
{