From 6557d3005ca187912cf053f3897c43a991916e56 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Wed, 20 Feb 2008 19:02:52 -0500 Subject: [PATCH] Added environment checks from check.php-dist --- installer/rcube_install.php | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/installer/rcube_install.php b/installer/rcube_install.php index eee0fb7..2e1df00 100644 --- a/installer/rcube_install.php +++ b/installer/rcube_install.php @@ -124,8 +124,7 @@ function pass($name, $message = '') { echo Q($name) . ': <span class="success">OK</span>'; - if ($message) - echo '<span class="indent">' . Q($name) . '</span>'; + $this->_showhint($message); } @@ -141,10 +140,7 @@ $this->failures++; echo Q($name) . ': <span class="fail">NOT OK</span>'; - if ($message) - echo '<span class="indent">' . Q($name) . '</span>'; - if ($url) - echo '<span class="indent">(See <a href="' . Q($url) . '" target="_blank">' . Q($url) . '</a>)</span>'; + $this->_showhint($message, $url); } @@ -155,13 +151,22 @@ * @param string Warning message * @param string URL for details */ - function warning($name, $message = '', $url = '') + function na($name, $message = '', $url = '') { - echo Q($name) . ': <span class="warning">NOT AVAILABLE</span>'; - if ($message) - echo '<span class="indent">' . Q($name) . '</span>'; + echo Q($name) . ': <span class="na">NOT AVAILABLE</span>'; + $this->_showhint($message, $url); + } + + + function _showhint($message, $url = '') + { + $hint = Q($message); + if ($url) - echo '<span class="indent">(See <a href="' . Q($url) . '" target="_blank">' . Q($url) . '</a>)</span>'; + $hint .= ($hint ? '; ' : '') . 'See <a href="' . Q($url) . '" target="_blank">' . Q($url) . '</a>'; + + if ($hint) + echo '<span class="indent">(' . $hint . ')</span>'; } -- Gitblit v1.9.1