Skip to content

Commit

Permalink
🔤 refatorando
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinaldo Araujo Barreto Junior committed Jul 6, 2022
1 parent fbc3984 commit 4a125b9
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions base/classes/helpers/UrlHelper.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,13 @@

class UrlHelper
{

static public function curPageURL()

static public function curPageURL()
{
$pageURL = 'http';
$https = ServerHelper::get('HTTPS');
if ($https == "on") {$pageURL .= "s";
}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
return ServerHelper::getCurrentUrl();
}

static public function homeUrl()

static public function homeUrl()
{
$curPageURL = self::curPageURL();
$res = explode('index.php', $curPageURL);
Expand Down

0 comments on commit 4a125b9

Please sign in to comment.