Use getResponseTypeFromSystem() to get 'html' or 'console', what is really needed.
authorRoland Haeder <roland@mxchange.org>
Mon, 6 Apr 2015 00:03:06 +0000 (02:03 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 6 Apr 2015 00:03:06 +0000 (02:03 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/main/resolver/command/class_BaseCommandResolver.php

index 283f555..c750238 100644 (file)
@@ -85,7 +85,7 @@ class BaseCommandResolver extends BaseResolver {
 
                // Is the command empty? Then fall back to default command
                if (empty($commandName)) {
-                       $commandName = $this->getConfigInstance()->getConfigEntry('default_html_command');
+                       $commandName = $this->getConfigInstance()->getConfigEntry('default_' . self::getResponseTypeFromSystem() . '_command');
                } // END - if
 
                // Check if command is valid
@@ -123,7 +123,7 @@ class BaseCommandResolver extends BaseResolver {
 
                // Is the command empty? Then fall back to default command
                if (empty($commandName)) {
-                       $commandName = $this->getConfigInstance()->getConfigEntry('default_html_command');
+                       $commandName = $this->getConfigInstance()->getConfigEntry('default_' . self::getResponseTypeFromSystem() . '_command');
                } // END - if
 
                // Check if command is valid