diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2012-02-21 12:49:06 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2012-02-21 12:49:06 -0500 |
commit | 4a9d06f66b095fde1f08da463c3d9999f0b6b345 (patch) | |
tree | 09cde7eb26eb4ca824668f976a4ae4c3f666f100 | |
parent | 82d0fb55180c3d3af17553d5cb45deb4e88b66e2 (diff) | |
download | ampache-4a9d06f66b095fde1f08da463c3d9999f0b6b345.tar.gz ampache-4a9d06f66b095fde1f08da463c3d9999f0b6b345.tar.bz2 ampache-4a9d06f66b095fde1f08da463c3d9999f0b6b345.zip |
Refactor switch statement in test.php
-rw-r--r-- | test.php | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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; |