A lot naming conventions applied:
[shipsimu.git] / inc / classes / main / commands / web / class_WebLoginAreaCommand.php
index 9f2c1cfa3390a2cf116b93569e205328ba2aabf3..3149a25d9f88930caedf713ffcf64fbba9049031 100644 (file)
@@ -152,8 +152,17 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
                // Default is no action
                $actionInstance = null;
 
+               // Get registry
+               $registryInstance = Registry::getRegistry();
+
+               // Get our application instance from the registry
+               $appInstance = $registryInstance->getInstance('application');
+
                // Default action is the one from configuration
-               $this->actionName = sprintf("login_%s", $this->getConfigInstance()->readConfig('login_default_action'));
+               $this->actionName = sprintf("%s_login_%s",
+                       str_replace("-", "_", $appInstance->getAppShortName()),
+                       $this->getConfigInstance()->readConfig('login_default_action')
+               );
 
                // Get "action" from request
                $actReq = $requestInstance->getRequestElement('action');
@@ -161,7 +170,10 @@ class WebLoginAreaCommand extends BaseCommand implements Commandable {
                // Do we have a "action" parameter set?
                if ((is_string($actReq)) && (!empty($actReq))) {
                        // Then use it with prefix
-                       $this->actionName = sprintf("login_%s", $actReq);
+                       $this->actionName = sprintf("%s_login_%s",
+                               str_replace("-", "_", $appInstance->getAppShortName()),
+                               $actReq
+                       );
                } // END - if
 
                // Get application instance