aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-09-29 14:52:06 +0000
committerpatdenice <patdenice@piwigo.org>2011-09-29 14:52:06 +0000
commitd3a81948e775603283985bd5eea91c3e7ca1f6c2 (patch)
tree6586818e6251e6801bcd0b20e67cee7a25ab873c /admin
parent347fb6e3213f2b8429b5fbfd4a850b16c56a282d (diff)
Add missing language keys for auto-upgrade (only error keys).
git-svn-id: http://piwigo.org/svn/trunk@12261 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/include/updates.class.php17
-rw-r--r--admin/themes/default/template/updates_pwg.tpl2
2 files changed, 13 insertions, 6 deletions
diff --git a/admin/include/updates.class.php b/admin/include/updates.class.php
index 1586df8c3..71ce1ca5a 100644
--- a/admin/include/updates.class.php
+++ b/admin/include/updates.class.php
@@ -38,7 +38,7 @@ class updates
$_SESSION['need_update'] = null;
if (preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches)
- and @fetchRemote(PHPWG_URL.'/download/all_versions.php', $result))
+ and @fetchRemote(PHPWG_URL.'/download/all_versions.php?rand='.md5(uniqid(rand(), true)), $result))
{
$all_versions = @explode("\n", $result);
$new_version = trim($all_versions[0]);
@@ -136,7 +136,7 @@ class updates
if (!$this->get_server_extensions())
{
- autoupdate_error();
+ return false;
}
$_SESSION['extensions_need_update'] = array();
@@ -393,6 +393,7 @@ class updates
$chunk_num = 0;
$end = false;
$zip = @fopen($filename, 'w');
+
while (!$end)
{
$chunk_num++;
@@ -454,7 +455,7 @@ class updates
unset($_SESSION['need_update']);
if ($step == 2)
{
- array_push($page['infos'], sprintf(l10n('autoupdate_success'), $upgrade_to));
+ array_push($page['infos'], l10n('Update Complete'), $upgrade_to);
$step = -1;
}
else
@@ -466,13 +467,19 @@ class updates
{
file_put_contents($conf['local_data_dir'].'/update/log_error.txt', $error);
$relative_path = trim(str_replace(dirname(dirname(dirname(dirname(__FILE__)))), '', $conf['local_data_dir']), '/\\');
- array_push($page['errors'], sprintf(l10n('autoupdate_extract_fail'), PHPWG_ROOT_PATH.$relative_path.'/update/log_error.txt'));
+ array_push(
+ $page['errors'],
+ sprintf(
+ l10n('An error has occured during extract. Please check files permissions of your piwigo installation.<br><a href="%s">Click here to show log error</a>.'),
+ PHPWG_ROOT_PATH.$relative_path.'/update/log_error.txt'
+ )
+ );
}
}
else
{
self::deltree($conf['local_data_dir'].'/update');
- array_push($page['errors'], l10n('autoupdate_fail'));
+ array_push($page['errors'], l10n('An error has occured during upgrade.'));
}
}
else
diff --git a/admin/themes/default/template/updates_pwg.tpl b/admin/themes/default/template/updates_pwg.tpl
index c85e1fb6b..5b1bf3238 100644
--- a/admin/themes/default/template/updates_pwg.tpl
+++ b/admin/themes/default/template/updates_pwg.tpl
@@ -1,7 +1,7 @@
{footer_script}
jQuery(document).ready(function() {ldelim}
jQuery('input[name="submit"]').click(function() {ldelim}
- if(!confirm('{'autoupdate_alert'|@translate}'))
+ if(!confirm('{'Are you sure?'|@translate}'))
return false;
jQuery(this).hide();
jQuery('.autoupdate_bar').show();