Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/packages/pkginfo.php
diff options
context:
space:
mode:
Diffstat (limited to 'packages/pkginfo.php')
-rw-r--r--packages/pkginfo.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index d6d04fb..fb1b94f 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -5,25 +5,25 @@ require_once BASE . "/lib/helper.php";
require_once BASE . "/lib/mysql.php";
require_once BASE . "/lib/style.php";
- if (!$skip_json_checks) {
- $memcache = new Memcache;
- $memcache -> connect('localhost', 11211) or die ('Memcached Connection Error');
- $pkgapi_reachable = $memcache -> get('pkgapi_reachable');
- $tld = array_pop((explode('.', $_SERVER['HTTP_HOST'])));
- if (array_key_exists('HTTPS', $_SERVER) && ($_SERVER['HTTPS'] == 'on'))
- $protocol = 'https';
+ $memcache = new Memcache;
+ $memcache -> connect('localhost', 11211) or die ('Memcached Connection Error');
+ $pkgapi_reachable = $memcache -> get('pkgapi_reachable');
+ $tld = array_pop((explode('.', $_SERVER['HTTP_HOST'])));
+ if (array_key_exists('HTTPS', $_SERVER) && ($_SERVER['HTTPS'] == 'on'))
+ $protocol = 'https';
+ else
+ $protocol = 'http';
+ if ($pkgapi_reachable === false) {
+ if (site_is_reachable($protocol . '://pkgapi.archlinux32.' . $tld . '/'))
+ $pkgapi_reachable = 'YES';
else
- $protocol = 'http';
- if ($pkgapi_reachable === false) {
- if (site_is_reachable($protocol . '://pkgapi.archlinux32.' . $tld . '/'))
- $pkgapi_reachable = 'YES';
- else
- $pkgapi_reachable = 'NO';
- $memcache -> set('pkgapi_reachable', $pkgapi_reachable, 0, 300);
- }
- if ($pkgapi_reachable == 'NO')
- $skip_json_checks = true;
+ $pkgapi_reachable = 'NO';
+ $memcache -> set('pkgapi_reachable', $pkgapi_reachable, 0, 300);
}
+ if ($pkgapi_reachable == 'YES')
+ $skip_json_checks = false;
+ else
+ $skip_json_checks = true;
if (!$skip_json_checks) {
$json_content = json_decode(