From a5f3a36fa4a9776b9b1139e53e27c626e729cdd5 Mon Sep 17 00:00:00 2001 From: Date: Thu, 12 May 2011 12:32:34 -0700 Subject: [PATCH 1/9] fix for mySQL>5.1 - should remain compatible with versions prior to 5.1 --- core/database.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/database.class.php b/core/database.class.php index e3ed4105..69d54e9e 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -80,7 +80,7 @@ class MySQL extends DBEngine { public function create_table_sql($name, $data) { $data = $this->scoreql_to_sql($data); - $ctes = "TYPE=InnoDB DEFAULT CHARSET='utf8'"; + $ctes = "ENGINE=InnoDB DEFAULT CHARSET='utf8'"; return "CREATE TABLE $name ($data) $ctes"; } } From 98e170cd866cfa8469c0c3894a7958901292d65b Mon Sep 17 00:00:00 2001 From: Justin Brewer Date: Wed, 27 Jul 2011 22:38:02 -0500 Subject: [PATCH 2/9] Fixed Nice URL test for servers not running on port 80. HTTP_HOST will contain the full host name used to access the site, including the optional port number. However, on some misconfigured servers, HTTP_HOST will not be defined, in which case the script will attempt to reconstruct the host name from SERVER_NAME, and if necessary, SERVER_PORT. --- ext/setup/main.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ext/setup/main.php b/ext/setup/main.php index 9a815515..efedd1a0 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -216,7 +216,15 @@ class Setup extends SimpleExtension { $themes[$human] = $name; } - $full = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"]; + if(isset($_SERVER["HTTP_HOST"])) { + $host = $_SERVER["HTTP_HOST"]; + } else { + $host = $_SERVER["SERVER_NAME"]; + if($_SERVER["SERVER_PORT"] != "80") { + $host .= ":" . $_SERVER["SERVER_PORT"]; + } + } + $full = "http://" . $host . $_SERVER["PHP_SELF"]; $test_url = str_replace("/index.php", "/nicetest", $full); $nicescript = "