mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Display pre-release language packs.
This commit is contained in:
@@ -684,17 +684,7 @@ class lancheck
|
|||||||
|
|
||||||
$archive = new PclZip($newfile);
|
$archive = new PclZip($newfile);
|
||||||
|
|
||||||
$core = $this->getFilePaths(e_LANGUAGEDIR.$language."/", $language,''); // includes admin area.
|
$file = $this->getFileList($language);
|
||||||
// $core_admin = $this->getFilePaths(e_BASE.$LANGUAGES_DIRECTORY.$language."/admin/", $language,'');
|
|
||||||
$core_admin = array();
|
|
||||||
$plugs = $this->getFilePaths(e_BASE.$PLUGINS_DIRECTORY, $language, $this->core_plugins); // standardized path.
|
|
||||||
$theme = $this->getFilePaths(e_BASE.$THEMES_DIRECTORY, $language, $this->core_themes);
|
|
||||||
$docs = $this->getFilePaths(e_BASE.$HELP_DIRECTORY,$language);
|
|
||||||
$handlers = $this->getFilePaths(e_BASE.$HANDLERS_DIRECTORY,$language); // standardized path.
|
|
||||||
|
|
||||||
$file = array_merge($core,$core_admin, $plugs, $theme, $docs, $handlers);
|
|
||||||
|
|
||||||
$file = array_unique($file);
|
|
||||||
|
|
||||||
$data = implode(",", $file);
|
$data = implode(",", $file);
|
||||||
|
|
||||||
@@ -740,6 +730,45 @@ class lancheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function getFileList($language)
|
||||||
|
{
|
||||||
|
if(empty($language))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$PLUGINS_DIRECTORY = e107::getFolder('plugins');
|
||||||
|
$THEMES_DIRECTORY = e107::getFolder('themes');
|
||||||
|
$HELP_DIRECTORY = e107::getFolder('help');
|
||||||
|
$HANDLERS_DIRECTORY = e107::getFolder('handlers');
|
||||||
|
|
||||||
|
$core = $this->getFilePaths(e_LANGUAGEDIR.$language."/", $language,''); // includes admin area.
|
||||||
|
// $core_admin = $this->getFilePaths(e_BASE.$LANGUAGES_DIRECTORY.$language."/admin/", $language,'');
|
||||||
|
$core_admin = array();
|
||||||
|
$plugs = $this->getFilePaths(e_BASE.$PLUGINS_DIRECTORY, $language, $this->core_plugins); // standardized path.
|
||||||
|
$theme = $this->getFilePaths(e_BASE.$THEMES_DIRECTORY, $language, $this->core_themes);
|
||||||
|
$docs = $this->getFilePaths(e_BASE.$HELP_DIRECTORY,$language);
|
||||||
|
$handlers = $this->getFilePaths(e_BASE.$HANDLERS_DIRECTORY,$language); // standardized path.
|
||||||
|
|
||||||
|
$file = array_merge($core,$core_admin, $plugs, $theme, $docs, $handlers);
|
||||||
|
|
||||||
|
$file = array_unique($file);
|
||||||
|
|
||||||
|
return $file;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeLanguagePack($language)
|
||||||
|
{
|
||||||
|
$files = $this->getFileList($language);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $path
|
* @param $path
|
||||||
* @param $language
|
* @param $language
|
||||||
@@ -862,8 +891,18 @@ class lancheck
|
|||||||
{
|
{
|
||||||
$xml = e107::getXml();
|
$xml = e107::getXml();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$feed = 'https://e107.org/languagepacks.xml';
|
$feed = 'https://e107.org/languagepacks.xml';
|
||||||
|
|
||||||
|
if(!empty(e_VERSION))
|
||||||
|
{
|
||||||
|
$feed .= "?ver=". preg_replace('/[^\d\.]/','',e_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$languages = array();
|
$languages = array();
|
||||||
|
|
||||||
if($rawData = $xml -> loadXMLfile($feed, true))
|
if($rawData = $xml -> loadXMLfile($feed, true))
|
||||||
@@ -884,6 +923,7 @@ class lancheck
|
|||||||
'name' => $att['name'],
|
'name' => $att['name'],
|
||||||
'author' => $att['author'],
|
'author' => $att['author'],
|
||||||
'infoURL' => $att['infourl'],
|
'infoURL' => $att['infourl'],
|
||||||
|
'tag' => $att['tag'],
|
||||||
// 'folder' => $att['folder'],
|
// 'folder' => $att['folder'],
|
||||||
'version' => $att['version'],
|
'version' => $att['version'],
|
||||||
'date' => $att['date'],
|
'date' => $att['date'],
|
||||||
|
@@ -400,7 +400,15 @@ if(!empty($_GET['iframe']))
|
|||||||
|
|
||||||
|
|
||||||
$text .= "<tr>
|
$text .= "<tr>
|
||||||
<td><span class='language-name'><a rel='external' href='".$value['infoURL']."' title=\"".LAN_MOREINFO."\">".$value['name']."</a></span></td>";
|
<td><span class='language-name'><a rel='external' href='".$value['infoURL']."' title=\"".LAN_MOREINFO."\">".$value['name']."</a></span>";
|
||||||
|
|
||||||
|
if(strpos($value['tag'],'-') !==false)
|
||||||
|
{
|
||||||
|
$text .= " <span class='label label-warning'>Pre-release</span>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$text .= "</td>";
|
||||||
|
|
||||||
/* $text .= "
|
/* $text .= "
|
||||||
<td>".$value['version']."</td>
|
<td>".$value['version']."</td>
|
||||||
|
Reference in New Issue
Block a user