]> git.wh0rd.org - tt-rss.git/blobdiff - install/index.php
further stylesheet simplification related fixes
[tt-rss.git] / install / index.php
index 7da311ffb832c2bbf65d6406529ed395d3b86e12..46a0fdecdfa6d3f146c130cd2b182e71c0f55cb6 100755 (executable)
@@ -2,13 +2,12 @@
 <head>
        <title>Tiny Tiny RSS - Installer</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-       <link rel="stylesheet" type="text/css" href="../css/utility.css">
-       <link rel="stylesheet" type="text/css" href="../css/dijit.css">
+       <link rel="stylesheet" type="text/css" href="../css/default.css">
        <style type="text/css">
        textarea { font-size : 12px; }
        </style>
 </head>
-<body class="claro">
+<body class="claro ttrss_utility">
 
 <?php
 
@@ -22,7 +21,7 @@
                $password = "";
                $possible = "0123456789abcdfghjkmnpqrstvwxyzABCDFGHJKMNPQRSTVWXYZ*%+^";
 
-       $i = 0;
+       $i = 0;
 
                while ($i < $length) {
                        $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);
                }
        }
 
+       function is_server_https() {
+               return (!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] != 'off')) || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https';
+       }
+
        function make_self_url_path() {
-               $url_path = ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http://' :  'https://') . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
+               $url_path = (is_server_https() ? 'https://' :  'http://') . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
 
                return $url_path;
        }