diff options
author | patdenice <patdenice@piwigo.org> | 2008-11-15 21:10:05 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2008-11-15 21:10:05 +0000 |
commit | 59af44a8c2f4984e3d68321b5f4289833f8dddb1 (patch) | |
tree | d631241772ac50532f8329bbf1536110b857c7a7 /admin/intro.php | |
parent | 78edf1906c93af1bad409d4e7c59ab6921888f32 (diff) |
- Add fetchRemote function which allow to retrieve datas over HTTP protocol using cURL method, file_get_contents function or fsockopen method. This allow to retrieve datas or files even if allow_url_fopen is deactivated.
- Use fetchRemote function in plugins manager and in latest version checking.
- Add german translations for upgrade.lang.php.
- Remove empty line at the end of pclzip.lib.php.
- Change display of deactivated plugins after upgrade.
git-svn-id: http://piwigo.org/svn/trunk@2880 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/intro.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/admin/intro.php b/admin/intro.php index 1e1b75f45..f118aa678 100644 --- a/admin/intro.php +++ b/admin/intro.php @@ -42,17 +42,14 @@ check_status(ACCESS_ADMINISTRATOR); // Check for upgrade : code inspired from punbb if (isset($_GET['action']) and 'check_upgrade' == $_GET['action']) { - if (!ini_get('allow_url_fopen')) + if (!fetchRemote(PHPWG_URL.'/latest_version', $result)) { - array_push( - $page['errors'], - l10n('Unable to check for upgrade since allow_url_fopen is disabled.') - ); + array_push($page['errors'], l10n('Unable to check for upgrade.')); } else { $versions = array('current' => PHPWG_VERSION); - $lines = @file(PHPWG_URL.'/latest_version'); + $lines = @explode("\r\n", $result); // if the current version is a BSF (development branch) build, we check // the first line, for stable versions, we check the second line |