From 09dc9f8d2ae8fe21e1a115d400db023b16ff8347 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 5 Oct 2016 23:28:01 +0200 Subject: Load check's dependencies.rss asynchronously to avoid hangs The synchronous load was hanging pkgsubmit load in case alamut was down. --- themes/mageia/page_header.php | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/themes/mageia/page_header.php b/themes/mageia/page_header.php index 5cb0885..eb0f835 100644 --- a/themes/mageia/page_header.php +++ b/themes/mageia/page_header.php @@ -13,21 +13,17 @@ /m", file_get_contents("http://check.mageia.org/cauldron/dependencies.rss"), $matches); $unmaintained_file = $g_webapp_dir . '/data/unmaintained.txt'; $unmaintained_count = file_exists($unmaintained_file) ? count(file($unmaintained_file)) : 0; - if ($missing_deps_count > 0) { - $figures_list[] = sprintf('%d broken deps.', - $missing_deps_count, + $missing_deps = sprintf('', 'http://check.mageia.org/cauldron/dependencies.html' ); - } if ($unmaintained_count > 0) { $figures_list[] = sprintf('%d unmaintained', @@ -48,10 +44,7 @@ if (!isset($_GET['package'])) { 'YES you can help!', 'see how' ); - $html_figures = null; - if (count($figures_list) > 0) { - $html_figures = 'Packages: ' . implode(', ', $figures_list) . '.'; - } + $html_figures = 'Packages: ' . $missing_deps . implode($separator, $figures_list) . '.'; ?>
@@ -61,6 +54,17 @@ if (!isset($_GET['package'])) {
  • +