mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Fixes Issue #4229 - Online language packs not displaying if version contains "-rc1"
This commit is contained in:
@@ -292,10 +292,10 @@ if(isset($_POST['language_sel']) && isset($_POST['language']))
|
|||||||
|
|
||||||
class lancheck
|
class lancheck
|
||||||
{
|
{
|
||||||
|
|
||||||
var $core_plugins = array();
|
|
||||||
|
|
||||||
var $core_themes = array("bootstrap3", "voux");
|
public $core_plugins = array();
|
||||||
|
|
||||||
|
public $core_themes = array("bootstrap3", "voux");
|
||||||
|
|
||||||
private $errorsOnly = false;
|
private $errorsOnly = false;
|
||||||
|
|
||||||
@@ -345,12 +345,12 @@ class lancheck
|
|||||||
{
|
{
|
||||||
$this->core_themes[] = $pref['sitetheme'];
|
$this->core_themes[] = $pref['sitetheme'];
|
||||||
$this->core_themes = array_unique($this->core_themes);
|
$this->core_themes = array_unique($this->core_themes);
|
||||||
}
|
}/*
|
||||||
|
|
||||||
if(E107_DEBUG_LEVEL > 0)
|
if(E107_DEBUG_LEVEL > 0)
|
||||||
{
|
{
|
||||||
// print_a($this->core_plugins);
|
print_a($this->core_plugins);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
$acceptedLans = explode(",",e_LANLIST);
|
$acceptedLans = explode(",",e_LANLIST);
|
||||||
|
|
||||||
@@ -418,11 +418,11 @@ class lancheck
|
|||||||
$key = key($val);
|
$key = key($val);
|
||||||
$this->coreImage[$key] = $val;
|
$this->coreImage[$key] = $val;
|
||||||
}
|
}
|
||||||
elseif($val)
|
/* elseif($val)
|
||||||
{
|
{
|
||||||
// $this->totalFiles++;
|
$this->totalFiles++;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -631,18 +631,6 @@ class lancheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if(!is_writable(e_FILE."public"))
|
|
||||||
// {
|
|
||||||
// $ret['error'] = TRUE;
|
|
||||||
// $ret['message'] = LAN_UPLOAD_777 . " ".e_FILE."public";
|
|
||||||
// return $ret;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if(is_readable(e_ADMIN."ver.php"))
|
|
||||||
{
|
|
||||||
// include(e_ADMIN."ver.php");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once(e_HANDLER.'pclzip.lib.php');
|
require_once(e_HANDLER.'pclzip.lib.php');
|
||||||
list($ver, $tmp) = explode(" ", e_VERSION);
|
list($ver, $tmp) = explode(" ", e_VERSION);
|
||||||
if(!$locale = $this->findLocale($language))
|
if(!$locale = $this->findLocale($language))
|
||||||
@@ -743,13 +731,14 @@ class lancheck
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeLanguagePack($language)
|
/** todo */
|
||||||
|
/*function removeLanguagePack($language)
|
||||||
{
|
{
|
||||||
$files = $this->getFileList($language);
|
$files = $this->getFileList($language);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -875,18 +864,18 @@ class lancheck
|
|||||||
{
|
{
|
||||||
$xml = e107::getXml();
|
$xml = e107::getXml();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$feed = 'https://e107.org/languagepacks.xml';
|
$feed = 'https://e107.org/languagepacks.xml';
|
||||||
|
|
||||||
$version = e_VERSION;
|
$version = e_VERSION;
|
||||||
|
|
||||||
if(!empty($version))
|
if(!empty($version))
|
||||||
{
|
{
|
||||||
$feed .= "?ver=". preg_replace('/[^\d\.]/','',e_VERSION);
|
list($ver,$tmp) = explode("-", $version);
|
||||||
|
$feed .= "?ver=". preg_replace('/[^\d\.]/','', $ver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e107::getDebug()->log("Language Pack Feed: ".$feed);
|
||||||
|
|
||||||
$languages = array();
|
$languages = array();
|
||||||
|
|
||||||
if($rawData = $xml -> loadXMLfile($feed, true))
|
if($rawData = $xml -> loadXMLfile($feed, true))
|
||||||
@@ -956,7 +945,6 @@ class lancheck
|
|||||||
{
|
{
|
||||||
// global $ns,$tp;
|
// global $ns,$tp;
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
$ns = e107::getRender();
|
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
if(empty($lan))
|
if(empty($lan))
|
||||||
@@ -1022,14 +1010,14 @@ class lancheck
|
|||||||
|
|
||||||
if($mode != 'render')
|
if($mode != 'render')
|
||||||
{
|
{
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$message = "
|
$message = "
|
||||||
<form id='lancheck' method='post' action='".e_ADMIN."language.php?mode=main&action=tools'>
|
<form id='lancheck' method='post' action='".e_ADMIN."language.php?mode=main&action=tools'>
|
||||||
<div>\n";
|
<div>\n";
|
||||||
|
|
||||||
$icon = ($_SESSION['lancheck'][$lan]['total']>0) ? ADMIN_FALSE_ICON : ADMIN_TRUE_ICON;
|
// $icon = ($_SESSION['lancheck'][$lan]['total']>0) ? ADMIN_FALSE_ICON : ADMIN_TRUE_ICON;
|
||||||
|
|
||||||
|
|
||||||
$errors_diz = (deftrue('LAN_CHECK_23')) ? LAN_CHECK_23 : "Errors Found";
|
$errors_diz = (deftrue('LAN_CHECK_23')) ? LAN_CHECK_23 : "Errors Found";
|
||||||
@@ -1765,10 +1753,10 @@ class lancheck
|
|||||||
if($lan == '')
|
if($lan == '')
|
||||||
{
|
{
|
||||||
echo "Language selection was lost. ";
|
echo "Language selection was lost. ";
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ns = e107::getRender();
|
// $ns = e107::getRender();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
|
|
||||||
|
|
||||||
@@ -1798,7 +1786,7 @@ class lancheck
|
|||||||
|
|
||||||
$this->newFile($dir2.$f2,$lan);
|
$this->newFile($dir2.$f2,$lan);
|
||||||
|
|
||||||
$writable = (is_writable($dir2)) ? TRUE : FALSE;
|
$writable = is_writable($dir2);
|
||||||
$trans = $this->get_lan_file_phrases($dir1,$dir2,$f1,$f2);
|
$trans = $this->get_lan_file_phrases($dir1,$dir2,$f1,$f2);
|
||||||
$keys = array_keys($trans);
|
$keys = array_keys($trans);
|
||||||
sort($keys);
|
sort($keys);
|
||||||
|
@@ -379,6 +379,11 @@ if(!empty($_GET['iframe']))
|
|||||||
|
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
|
if(empty($this->onlinePacks))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach($this->onlinePacks as $lan=>$value)
|
foreach($this->onlinePacks as $lan=>$value)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user