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 283f5558a469bc152fc95d779cdc808e18b35a07..c750238d5e36ca67bf34a160906b7eb7dcd85109 100644 (file)
@@ -85,7 +85,7 @@ class BaseCommandResolver extends BaseResolver {
 
                // Is the command empty? Then fall back to default command
                if (empty($commandName)) {
 
                // 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
                } // 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)) {
 
                // 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
                } // END - if
 
                // Check if command is valid