From 61f0f76ffa0345bb00a292feb060c26e7b4754a0 Mon Sep 17 00:00:00 2001
From: plegall {foreach from=$missing.themes item=theme}
+ +{if isset($forbid_upgrade_message)} + {$forbid_upgrade_message} +{else} {if !empty($missing.plugins) or !empty($missing.themes)}
{/if}+{/if} diff --git a/admin/updates_pwg.php b/admin/updates_pwg.php index 016deeecd..9b980d546 100644 --- a/admin/updates_pwg.php +++ b/admin/updates_pwg.php @@ -127,12 +127,39 @@ if ($step == 2 and is_webmaster()) // +-----------------------------------------------------------------------+ if ($step == 3 and is_webmaster()) { + // Remote sites are not compatible with Piwigo 2.4+ + $has_remote_site = false; + + $query = 'SELECT galleries_url FROM '.SITES_TABLE.';'; + $result = pwg_query($query); + while ($row = pwg_db_fetch_assoc($result)) + { + if (url_is_remote($row['galleries_url'])) + { + $has_remote_site = true; + } + } + + if ($has_remote_site) + { + $url = PHPWG_URL.'/download/messages/upgrade24-remote-sites.php'; + $url.= '?lang='.$user['language']; + $url.= '&rand='.md5(uniqid(rand(), true)); // Avoid server cache + + $result = null; + if (@fetchRemote($url, $result)) + { + $template->assign('forbid_upgrade_message', $result); + array_push($page['errors'], $result); + } + } + if (isset($_POST['dumpDatabase'])) { updates::dump_database(isset($_POST['includeHistory'])); } - if (isset($_POST['submit']) and isset($_POST['upgrade_to'])) + if (!$has_remote_site and isset($_POST['submit']) and isset($_POST['upgrade_to'])) { updates::upgrade_to($_POST['upgrade_to'], $step); } -- cgit v1.2.3