Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5 from inclusive-design/master
Browse files Browse the repository at this point in the history
ACHECKER-8: Merge
  • Loading branch information
VictorAlagwu committed Jun 5, 2018
2 parents cf84a9e + 3dedb8d commit 57ca13d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5,219 deletions.
14 changes: 9 additions & 5 deletions include/classes/Language/LanguageManager.class.php
Expand Up @@ -260,13 +260,17 @@ function exists($code) {
// import language pack from specified file
// return imported AChecker version if it does not match with the current version
function import($filename, $ignore_version = false) {
require_once(AC_INCLUDE_PATH . 'lib/pclzip.lib.php');

global $msg;
$import_path = AC_TEMP_DIR . 'import/';

$archive = new PclZip($filename);
if ($archive->extract(PCLZIP_OPT_PATH, $import_path) == 0) {
exit('Error : ' . $archive->errorInfo(true));
$zip = new ZipArchive();

if ($zip->open($filename) === TRUE) {
$zip->extractTo($import_path);
$zip->close();
} else {
$msg->addError('CANNOT_UNZIP');
return false;
}

// import
Expand Down

0 comments on commit 57ca13d

Please sign in to comment.