Changeset 15737 for branches/2.3/admin/updates_pwg.php
- Timestamp:
- Jun 15, 2012, 11:17:55 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/admin/updates_pwg.php
r10511 r15737 128 128 if ($step == 3 and is_webmaster()) 129 129 { 130 // Remote sites are not compatible with Piwigo 2.4+ 131 $has_remote_site = false; 132 133 $query = 'SELECT galleries_url FROM '.SITES_TABLE.';'; 134 $result = pwg_query($query); 135 while ($row = pwg_db_fetch_assoc($result)) 136 { 137 if (url_is_remote($row['galleries_url'])) 138 { 139 $has_remote_site = true; 140 } 141 } 142 143 if ($has_remote_site) 144 { 145 $url = PHPWG_URL.'/download/messages/upgrade24-remote-sites.php'; 146 $url.= '?lang='.$user['language']; 147 $url.= '&rand='.md5(uniqid(rand(), true)); // Avoid server cache 148 149 $result = null; 150 if (@fetchRemote($url, $result)) 151 { 152 $template->assign('forbid_upgrade_message', $result); 153 array_push($page['errors'], $result); 154 } 155 } 156 130 157 if (isset($_POST['dumpDatabase'])) 131 158 { … … 133 160 } 134 161 135 if ( isset($_POST['submit']) and isset($_POST['upgrade_to']))162 if (!$has_remote_site and isset($_POST['submit']) and isset($_POST['upgrade_to'])) 136 163 { 137 164 updates::upgrade_to($_POST['upgrade_to'], $step);
Note: See TracChangeset
for help on using the changeset viewer.