summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2012-02-21 12:49:06 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2012-02-21 12:49:06 -0500
commit4a9d06f66b095fde1f08da463c3d9999f0b6b345 (patch)
tree09cde7eb26eb4ca824668f976a4ae4c3f666f100
parent82d0fb55180c3d3af17553d5cb45deb4e88b66e2 (diff)
downloadampache-4a9d06f66b095fde1f08da463c3d9999f0b6b345.tar.gz
ampache-4a9d06f66b095fde1f08da463c3d9999f0b6b345.tar.bz2
ampache-4a9d06f66b095fde1f08da463c3d9999f0b6b345.zip
Refactor switch statement in test.php
-rw-r--r--test.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/test.php b/test.php
index 7659f835..30ea28b1 100644
--- a/test.php
+++ b/test.php
@@ -48,15 +48,14 @@ Dba::_auto_init();
switch ($_REQUEST['action']) {
case 'config':
+ // Check to see if the config file is working now, if so fall
+ // through to the default, else show the appropriate template
$configfile = "$prefix/config/ampache.cfg.php";
-
- // On every load of the config file check and see if it's working now
- if (count(parse_ini_file($configfile))) {
- require_once $prefix . '/templates/show_test.inc.php';
+
+ if (!count(parse_ini_file($configfile))) {
+ require_once $prefix . '/templates/show_test_config.inc.php';
break;
}
- require_once $prefix . '/templates/show_test_config.inc.php';
- break;
default:
require_once $prefix . '/templates/show_test.inc.php';
break;