WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 22dd22d

Browse files
Fix for #54
1 parent 9a5304c commit 22dd22d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/templates.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@
4848
require_once "helpers.php";
4949
5050
//Get current URL and parameters for correct pagination
51-
$protocol = $_SERVER['SERVER_PROTOCOL'];
52-
$domain = $_SERVER['HTTP_HOST'];
51+
$domain = $_SERVER['HTTP_HOST'];
5352
$script = $_SERVER['SCRIPT_NAME'];
5453
$parameters = $_GET ? $_SERVER['QUERY_STRING'] : "" ;
55-
$protocol=strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https')
5654
=== FALSE ? 'http' : 'https';
55+
$protocol=($_SERVER['HTTPS'] == "on" ? "https" : "http");
5756
$currenturl = $protocol . '://' . $domain. $script . '?' . $parameters;
5857
5958
//Pagination

0 commit comments

Comments
 (0)