]> git.wh0rd.org - tt-rss.git/blobdiff - install/index.php
Merge branch 'master' of github.com:gothfox/Tiny-Tiny-RSS
[tt-rss.git] / install / index.php
index efa917d95357373767b20ee44277a5f43dee9460..ec064c0a7055b48a9b17b41b0df4162246472cac 100644 (file)
                        if (!$result) {
                                $query = htmlspecialchars($query);
                                if ($die_on_error) {
-                                       die("Query <i>$query</i> failed: " . ($link ? mysql_error($link) : "No connection"));
+                                       die("Query <i>$query</i> failed: " . ($link ? function_exists("mysqli_connect") ? mysqli_error($link) : mysql_error($link) : "No connection"));
                                }
                        }
                        return $result;
 
                } else if ($op == 'installschema' || $op == 'skipschema') {
 
-                       $link = db_connect($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME, $DB_TYPE);
+                       $link = db_connect($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME, $DB_TYPE, $DB_PORT);
 
                        if (!$link) {
                                print_error("Unable to connect to database using specified parameters.");