1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 11:36:08 +02:00

Display pre-release language packs.

This commit is contained in:
Cameron
2017-11-07 14:21:06 -08:00
parent c7c4ea6d51
commit e1b5dd9449
2 changed files with 60 additions and 12 deletions

View File

@@ -684,17 +684,7 @@ class lancheck
$archive = new PclZip($newfile);
$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);
$file = $this->getFileList($language);
$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 $language
@@ -862,8 +891,18 @@ class lancheck
{
$xml = e107::getXml();
$feed = 'https://e107.org/languagepacks.xml';
if(!empty(e_VERSION))
{
$feed .= "?ver=". preg_replace('/[^\d\.]/','',e_VERSION);
}
$languages = array();
if($rawData = $xml -> loadXMLfile($feed, true))
@@ -884,6 +923,7 @@ class lancheck
'name' => $att['name'],
'author' => $att['author'],
'infoURL' => $att['infourl'],
'tag' => $att['tag'],
// 'folder' => $att['folder'],
'version' => $att['version'],
'date' => $att['date'],