diff --git a/mocha-php/src/mocha-php/include/mochacommon.inc.php b/mocha-php/src/mocha-php/include/mochacommon.inc.php index 887840c..a5a87de 100644 --- a/mocha-php/src/mocha-php/include/mochacommon.inc.php +++ b/mocha-php/src/mocha-php/include/mochacommon.inc.php @@ -49,7 +49,18 @@ function mocha_get_oms() : Oms|null try { // $oms = new \Mocha\Oms\MySQLDatabaseOms(System::GetConfigurationValue("Database.ServerName"), System::GetConfigurationValue("Database.PortNumber"), System::GetConfigurationValue("Database.DatabaseName"), System::GetConfigurationValue("Database.UserName"), System::GetConfigurationValue("Database.Password")); - $oms = new \Mocha\Oms\HttpOmsClient("localhost", 4436); + $serverName = "localhost"; + if (isset($_ENV["OMS_SERVERNAME"])) + { + $serverName = $_ENV["OMS_SERVERNAME"]; + } + $portNumber = 4436; + if (isset($_ENV["OMS_SERVERPORT"])) + { + $portNumber = intval($_ENV["OMS_SERVERPORT"]); + } + + $oms = new \Mocha\Oms\HttpOmsClient($serverName, $portNumber); } catch (\PDOException $ex) { diff --git a/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer.inc.php b/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer.inc.php index 9c0a2eb..42febe1 100644 --- a/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer.inc.php +++ b/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer.inc.php @@ -2061,11 +2061,35 @@ EOF echo($title); $this->renderEndTag("title"); + $commonThemesPath = null; + if (isset($_ENV["COMMON_THEMES_PATH"])) + { + $commonThemesPath = $_ENV["COMMON_THEMES_PATH"]; + } + + if ($commonThemesPath != null) + { + + $this->renderTag("link", array + ( + "rel" => "stylesheet", + "type" => "text/css", + "href" => $commonThemesPath + )); + + } + + $themesPath = System::ExpandRelativePath("~/themes/" . System::GetConfigurationValue("Application.ThemeName") . "/theme.css", false, true); + if (isset($_ENV["THEMES_PATH"])) + { + $themesPath = str_replace("{ThemeName}", System::GetConfigurationValue("Application.ThemeName"), $_ENV["THEMES_PATH"]); + } + $this->renderTag("link", array ( "rel" => "stylesheet", "type" => "text/css", - "href" => System::ExpandRelativePath("~/themes/" . System::GetConfigurationValue("Application.ThemeName") . "/theme.css", false, true) + "href" => $themesPath )); $this->renderTag("link", array