Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Fixed language install message and javascript save code

givanz602a14ad3087
diff --git a/admin/controller/localization/language.php b/admin/controller/localization/language.php
index fff130d..7561498 100755
--- a/admin/controller/localization/language.php
+++ b/admin/controller/localization/language.php
@@ -47,8 +47,9 @@ class Language extends Crud {
}
function install() {
- $code = filter('/[-\w]+/', $this->request->post['code']);
- $url = str_replace('{code}', $code, $this->installUrl);
+ $code = filter('/[-\w]+/', $this->request->post['code']);
+ $url = str_replace('{code}', $code, $this->installUrl);
+ $available = false;
require DIR_SYSTEM . 'functions' . DS . 'php-mo.php';
@@ -56,6 +57,7 @@ class Language extends Crud {
$translations = download($url . $file);
if ($translations) {
+ $available = true;
$folder = DIR_ROOT . 'locale' . DS . $code . DS . 'LC_MESSAGES';
$poFile = $folder . DS . $file;
@mkdir($folder, 0755 & ~umask(), true);
@@ -74,12 +76,14 @@ class Language extends Crud {
break;
}
} else {
- $this->view->errors[] = __('Language pack not available!');
- $this->view->info[] = sprintf(__('Check available translations at %s'), '<a href="' . $this->listUrl . '" target="_blank">' . $this->listUrl . '</a>');
-
break;
}
}
+
+ if (!$available) {
+ $this->view->errors[] = __('Language pack not available!');
+ $this->view->info[] = sprintf(__('Check available translations at %s'), '<a href="' . $this->listUrl . '" target="_blank">' . $this->listUrl . '</a>');
+ }
return $this->index();
}
diff --git a/public/admin/default b/public/admin/default
index 749d517..6046d70 160000
--- a/public/admin/default
+++ b/public/admin/default
@@ -1 +1 @@
-Subproject commit 749d5178065e8e541544c8d1471499ff4cf053af
+Subproject commit 6046d701a1e18b5091dc8b20ffaf210e62dc13af