File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55tasK ('feature:urlshortener ' , function () {
66
7- if (!input ()->getOption ('feature ' )) return ;
8- if (!isUrlShortener ()) return ;
7+ if (!input ()->getOption ('feature ' )) {
8+ return ;
9+ }
10+ if (!isUrlShortener ()) {
11+ return ;
12+ }
913
1014 $ symlinkDir = get ('deploy_path ' ) . "/current/ " . get ('web_path ' );
1115
@@ -35,15 +39,17 @@ function isUrlShortener(): bool
3539 */
3640function initUrlShortener (?string $ feature = null ): void
3741{
38- if (!isUrlShortener ()) return ;
42+ if (!isUrlShortener ()) {
43+ return ;
44+ }
3945
4046 debug ('Adjust host configuration because of url shortener function ' );
4147 set ('deploy_path_url_shortener ' , get ('deploy_path ' ));
4248 set ('deploy_path ' , get ('deploy_path ' ) . '/ ' . get ('feature_url_shortener_path ' ) . $ feature );
4349
4450 $ publicUrls = [];
4551 foreach (get ('public_urls ' ) as $ publicUrl ) {
46- $ publicUrls [] = $ publicUrl . $ feature ;
52+ $ publicUrls [] = rtrim ( $ publicUrl, ' / ' ) . ' / ' . $ feature . ' / ' ;
4753 }
4854 set ('public_urls ' , $ publicUrls );
4955}
You can’t perform that action at this time.
0 commit comments