Skip to content

Commit

Permalink
GH-230 Create galaxy (planet link) routing helper
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Jul 4, 2022
1 parent a5b523b commit a534f6c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/_includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

include($includePath . './modules/uni/utils/isEmailDomainBanned.util.php');

include($includePath . './utils/routing/galaxy.routing.php');

?>
5 changes: 5 additions & 0 deletions common/utils/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

header("Location: ../index.php");

?>
23 changes: 23 additions & 0 deletions common/utils/routing/galaxy.routing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace UniEngine\Engine\Common\Utils\Routing;

/**
* @param array $params
* @param number $params['galaxy']
* @param number $params['system']
* @param number $params['planet']
*/
function getGalaxyTargetUrl($params) {
return buildHref([
'path' => 'galaxy.php',
'query' => [
'mode' => '3',
'galaxy' => $params['galaxy'],
'system' => $params['system'],
'planet' => $params['planet'],
],
]);
}

?>
5 changes: 5 additions & 0 deletions common/utils/routing/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

header("Location: ../index.php");

?>

0 comments on commit a534f6c

Please sign in to comment.