diff options
author | Erich Eckner <git@eckner.net> | 2019-11-22 14:13:20 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-11-22 14:13:20 +0100 |
commit | 3af2f7695baea8fff44455987d15f950217e4bc4 (patch) | |
tree | 4740c67981c9f10dfb3ec5b0d7d9e889fe85860d /lib/helper.php | |
parent | bf9d8b1e6cadf95b7c3ebc45767a55e6c197914f (diff) | |
download | archweb32-3af2f7695baea8fff44455987d15f950217e4bc4.tar.xz |
lib/helper.php: use site_is_reachable() instead of copying code
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/helper.php b/lib/helper.php index debfb06..a81eedf 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -89,9 +89,8 @@ function git_url($repository,$type,$commit,$path,$line = null,$commit_is_hash = $git_available = apcu_fetch('git_available', $apcu_success); if ($apcu_success == false) { $git_available = - preg_match( - "/ 200 OK$/", - get_headers("https://git.archlinux32.org/packages")[0] + site_is_reachable( + 'https://git.archlinux32.org/packages' ); apcu_store('git_available', $git_available, 120); }; |