bug fix redirect url with docker installation
This commit is contained in:
committed by
giandonato.inverso@edempg.it
parent
c9fa6abf06
commit
b52a61ca40
+12
-7
@@ -117,11 +117,16 @@ function paginationLinks($current_page, $total_pages, $base_url) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
function base_url(){
|
||||
return sprintf(
|
||||
"%s://%s:%s",
|
||||
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
|
||||
$_SERVER['SERVER_NAME'],
|
||||
$_SERVER['SERVER_PORT']
|
||||
);
|
||||
function base_url() {
|
||||
require_once(__DIR__ . '/../config/environment.php');
|
||||
if (defined('BASE_URL') && BASE_URL !== null) {
|
||||
return BASE_URL;
|
||||
} else {
|
||||
return sprintf(
|
||||
"%s://%s:%s",
|
||||
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http',
|
||||
$_SERVER['SERVER_NAME'],
|
||||
$_SERVER['SERVER_PORT']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user