diff --git a/e107_admin/db.php b/e107_admin/db.php
index cdd9bda27..9389dbe18 100644
--- a/e107_admin/db.php
+++ b/e107_admin/db.php
@@ -359,89 +359,18 @@ class system_tools
// Developer Mode ONly.. No LANS.
private function githubSyncProcess()
{
+ $result = e107::getFile()->unzipGithubArchive('core');
- // Delete any existing file.
- if(file_exists(e_TEMP."e107-master.zip"))
- {
- unlink(e_TEMP."e107-master.zip");
- }
-
- $result = e107::getFile()->getRemoteFile('https://codeload.github.com/e107inc/e107/zip/master', 'e107-master.zip', 'temp');
-
- if($result == false)
+ if($result === false)
{
e107::getMessage()->addError( DBLAN_118 );
+ return null;
}
+ $success = $result['success'];
+ $error = $result['error'];
- $localfile = 'e107-master.zip';
-
- chmod(e_TEMP.$localfile, 0755);
- require_once(e_HANDLER."pclzip.lib.php");
-
-// $base = realpath(dirname(__FILE__));
-
-
- $newFolders = array(
- 'e107-master/e107_admin/' => e_BASE.e107::getFolder('ADMIN'),
- 'e107-master/e107_core/' => e_BASE.e107::getFolder('CORE'),
- 'e107-master/e107_docs/' => e_BASE.e107::getFolder('DOCS'),
- 'e107-master/e107_handlers/' => e_BASE.e107::getFolder('HANDLERS'),
- 'e107-master/e107_images/' => e_BASE.e107::getFolder('IMAGES'),
- 'e107-master/e107_languages/' => e_BASE.e107::getFolder('LANGUAGES'),
- 'e107-master/e107_media/' => e_BASE.e107::getFolder('MEDIA'),
- 'e107-master/e107_plugins/' => e_BASE.e107::getFolder('PLUGINS'),
- 'e107-master/e107_system/' => e_BASE.e107::getFolder('SYSTEM'),
- 'e107-master/e107_themes/' => e_BASE.e107::getFolder('THEMES'),
- 'e107-master/e107_web/' => e_BASE.e107::getFolder('WEB'),
- 'e107-master/' => e_BASE
- );
-
- $srch = array_keys($newFolders);
- $repl = array_values($newFolders);
-
- $archive = new PclZip(e_TEMP.$localfile);
- $unarc = ($fileList = $archive -> extract(PCLZIP_OPT_PATH, e_TEMP, PCLZIP_OPT_SET_CHMOD, 0755)); // Store in TEMP first.
-
- $error = array();
- $success = array();
- $skipped = array();
-// print_a($unarc);
-
-
- $excludes = array('e107-master/','e107-master/install.php','e107-master/favicon.ico');
-
- foreach($unarc as $k=>$v)
- {
- if(in_array($v['stored_filename'],$excludes))
- {
- continue;
- }
-
- $oldPath = $v['filename'];
- $newPath = str_replace($srch,$repl, $v['stored_filename']);
-
- $message = e107::getParser()->lanVars(DBLAN_121, array('x'=>$oldPath, 'y'=>$newPath));
-
- if($v['folder'] ==1 && is_dir($newPath))
- {
- // $skipped[] = $newPath. " (already exists)";
- continue;
- }
-
- if(!rename($oldPath,$newPath))
- {
- $error[] = $message;
- }
- else
- {
- $success[] = $message;
- }
-
-
- // echo $message."
";
-
- }
+ // $message = e107::getParser()->lanVars(DBLAN_121, array('x'=>$oldPath, 'y'=>$newPath));
if(!empty($success))
{
@@ -458,9 +387,6 @@ class system_tools
e107::getMessage()->addError(print_a($error,true));
}
-
-
-
e107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_112, e107::getMessage()->render());
}
diff --git a/e107_admin/lancheck.php b/e107_admin/lancheck.php
index 97c6ae494..f406794b4 100644
--- a/e107_admin/lancheck.php
+++ b/e107_admin/lancheck.php
@@ -314,6 +314,7 @@ class lancheck
private $deprecatedFiles = array('lan_download.php', 'lan_parser_functions.php', 'lan_prefs.php', 'admin/lan_download.php', 'admin/lan_modcomment.php');
+ private $installed_languages = array();
function __construct()
{
@@ -346,8 +347,12 @@ class lancheck
$pref = e107::getPref();
// Check current theme also (but do NOT add to generated zip)
- $this->core_themes[] = $pref['sitetheme'];
- $this->core_themes = array_unique($this->core_themes);
+
+ if(deftrue('e_DEBUG'))
+ {
+ $this->core_themes[] = $pref['sitetheme'];
+ $this->core_themes = array_unique($this->core_themes);
+ }
if(E107_DEBUG_LEVEL > 0)
{
@@ -791,63 +796,34 @@ class lancheck
return $pzip;
}
-
-
/**
- * List the installed language packs.
- * @return
+ * Get Installed Language-Pack Meta Data.
+ * @return array
*/
- function showLanguagePacks()
+ function getLocalLanguagePacks()
{
- $frm = e107::getForm();
- $ns = e107::getRender();
- $tp = e107::getParser();
+ $this->installed_languages = e107::getLanguage()->installed();
- if(is_readable(e_ADMIN."ver.php"))
- {
- include(e_ADMIN."ver.php");
- list($ver, $tmp) = explode(" ", $e107info['e107_version']);
- }
+ $xml = e107::getXml();
- $lans = e107::getLanguage()->installed();
+ $arr = array();
- $release_diz = defined("LANG_LAN_30") ? LANG_LAN_30 : "Release Date";
- $compat_diz = defined("LANG_LAN_31") ? LANG_LAN_31 : "Compatibility";
- $lan_pleasewait = (deftrue('LAN_PLEASEWAIT')) ? $tp->toJS(LAN_PLEASEWAIT) : "Please Wait";
-
-
-
- $text = "
".LAN_NAME." | -".LAN_VERSION." | -".LAN_AUTHOR." | -".LANG_LAN_111." | -".LANG_LAN_112." | -".LAN_DOWNLOAD." | -
---|---|---|---|---|---|
".$value['name']." | -".$value['version']." | -".$value['author']." | -".$value['date']." | -".$value['compatibility']." | - -".LANG_LAN_114." | -