Improvements to test script output
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 13 Jan 2010 22:55:18 +0000 (15:55 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 13 Jan 2010 23:59:27 +0000 (16:59 -0700)
horde/templates/test/footer.inc
horde/templates/test/version.inc
horde/test.php

index 308b1d0..6a1c963 100644 (file)
@@ -1,2 +1,5 @@
+<?php if ($app != 'horde'): ?>
+<a href="<?php echo $url ?>">Return to Main Horde Test Page</a>
+<?php endif; ?>
 </body>
 </html>
index 59d7461..9bfdde3 100644 (file)
@@ -1,4 +1,4 @@
-<h1><?php echo $app_name ?> Version</h1>
+<h1><?php echo ucfirst($app) ?> Version</h1>
 <ul>
- <li><?php echo $app_name ?>: <?php echo $app_version ?></li>
+ <li><?php echo $app_version ?></li>
 </ul>
index 5b05ff4..fe7d097 100644 (file)
@@ -45,10 +45,11 @@ $app_version = $registry->getVersion($app);
  * tests. Create the testing object. */
 if ($app != 'horde') {
     $registry->pushApp($app, array('check_perms' => false));
+    print "C";
 }
 $classname = ucfirst($app) . '_Test';
 if (!class_exists($classname)) {
-    echo '<h2 style="color:red">No tests found for ' . $app . ' [' . $app_name . '].</h2>';
+    echo '<h2 style="color:red">No tests found for ' . ucfirst($app) . ' [' . $app_name . '].</h2>';
     exit;
 }
 $test_ob = new $classname();
@@ -93,10 +94,7 @@ case 'unregister':
 }
 
 /* Get the status output now. */
-$module_output = $test_ob->phpModuleCheck();
-$setting_output = $test_ob->phpSettingCheck();
 $pear_output = $test_ob->pearModuleCheck();
-$config_output = $test_ob->requiredFileCheck();
 
 require $test_templates . '/header.inc';
 require $test_templates . '/version.inc';
@@ -119,11 +117,11 @@ if ($app == 'horde') {
 ?>
 </ul>
 <?php
-} else {
+} elseif ($output = $test_ob->requiredAppCheck()) {
 ?>
 <h1>Other Horde Applications</h1>
 <ul>
- <?php echo $test_ob->requiredAppCheck(); ?>
+ <?php echo $output ?>
 </ul>
 <?php
 }
@@ -132,22 +130,33 @@ if ($app == 'horde') {
 $php_info = $test_ob->getPhpVersionInformation();
 require $test_templates . '/php_version.inc';
 
+if ($module_output = $test_ob->phpModuleCheck()) {
 ?>
-
 <h1>PHP Module Capabilities</h1>
 <ul>
  <?php echo $module_output ?>
 </ul>
+<?php
+}
 
+if ($setting_output = $test_ob->phpSettingCheck()) {
+?>
 <h1>Miscellaneous PHP Settings</h1>
 <ul>
  <?php echo $setting_output ?>
 </ul>
+<?php
+}
 
-<h1>Required Horde Configuration Files</h1>
+if ($config_output = $test_ob->requiredFileCheck()) {
+?>
+<h1>Required Configuration Files</h1>
 <ul>
     <?php echo $config_output ?>
 </ul>
+<?php
+}
+?>
 
 <h1>PHP Sessions</h1>
 <?php $_SESSION['horde_test_count']++; ?>