aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/updates.class.php17
-rw-r--r--admin/themes/default/template/updates_pwg.tpl2
-rw-r--r--language/en_UK/admin.lang.php4
3 files changed, 17 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();
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index ec25e56bc..96d064893 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -860,4 +860,8 @@ $lang['Learn more'] = 'Learn more';
$lang['Select an album'] = 'Select an album';
$lang['By default, Piwigo will create a new websize from the HD (high definition) version of your photo.'] = 'By default, Piwigo will create a new websize from the HD (high definition) version of your photo.';
$lang['If no HD is available and if the current websize is bigger than resize dimensions, Piwigo will move it as HD and create a downsized websize photo from it.'] = 'If no HD is available and if the current websize is bigger than resize dimensions, Piwigo will move it as HD and create a downsized websize photo from it.';
+
+$lang['An error has occured during upgrade.'] = 'An error has occured during upgrade.';
+$lang['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>.'] = '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>.';
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo cannot retrieve upgrade file from server';
?>