Skip to content

Commit ff3caba

Browse files
author
janatzend
committed
better application name processing
1 parent e920b39 commit ff3caba

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ZendServer/DepH/Params/Custom.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ public function getApplicationName() {
1717
// @todo do we need event manager in this class?
1818
#$this->getEventManager()->trigger(__FUNCTION__, $this, array('name' => 'ZS_CUSTOM_APPLICATION_NAME'));
1919
$url = getenv('ZS_BASE_URL');
20-
// @todo doesn't work properly when installing from command line, produces sth. like http\\://hostname
21-
$url = str_replace(array('http\\:', 'https\\:'), array('http:', 'https:'), $url);
22-
$serverName = str_replace('http://', '', $url);
23-
return str_replace('/', '_', rtrim($serverName, '/'));
20+
$urlParts = explode(':', $url);
21+
return str_replace('/', '_', trim($urlParts[1], '/'));
2422
}
2523

2624
/**

0 commit comments

Comments
 (0)