Don't allow underscores or dashes in application names (remove them).
authorRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 23:52:51 +0000 (01:52 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 23:52:51 +0000 (01:52 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/main/language/class_LanguageSystem.php

index ec094c9..ece1ad5 100644 (file)
@@ -78,7 +78,8 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
                        // 2) Try to build it
                        $languageBasePath = sprintf('%sapplication/%s/language/',
                                $langInstance->getConfigInstance()->getConfigEntry('base_path'),
                        // 2) Try to build it
                        $languageBasePath = sprintf('%sapplication/%s/language/',
                                $langInstance->getConfigInstance()->getConfigEntry('base_path'),
-                               $applicationInstance->getAppShortName()
+                               // Don't allow any underscores/dashes in application names
+                               str_replace(array('_', '-'), array('', ''), $applicationInstance->getAppShortName())
                        );
                } // END - if
 
                        );
                } // END - if