diff options
Diffstat (limited to 'installer')
-rw-r--r-- | installer/index.php | 6 | ||||
-rwxr-xr-x | installer/install.sql | 15 | ||||
-rw-r--r-- | installer/installer.php | 52 |
3 files changed, 41 insertions, 32 deletions
diff --git a/installer/index.php b/installer/index.php index 317f27b8..a11c0b02 100644 --- a/installer/index.php +++ b/installer/index.php @@ -30,10 +30,6 @@ require(DOCROOT . "installer/installer.php"); if (PHP_SAPI == "cli") { include("cli.php"); } else { - if (@$_GET["page"] == "check") { - include("check.html.php"); - } else { - include("web.php"); - } + include("web.php"); } diff --git a/installer/install.sql b/installer/install.sql index 1fe9b866..7da5fe68 100755 --- a/installer/install.sql +++ b/installer/install.sql @@ -32,6 +32,19 @@ CREATE TABLE {access_intents} ( ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; INSERT INTO {access_intents} VALUES (1,1,1,1,0,0,1,1,0,0); +DROP TABLE IF EXISTS {caches}; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +CREATE TABLE {caches} ( + `id` int(9) NOT NULL auto_increment, + `key` varchar(255) NOT NULL, + `tags` varchar(255) default NULL, + `expiration` int(9) NOT NULL, + `cache` longblob, + PRIMARY KEY (`id`), + KEY `tags` (`tags`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +SET character_set_client = @saved_cs_client; DROP TABLE IF EXISTS {comments}; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; @@ -208,7 +221,7 @@ CREATE TABLE {modules} ( UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -INSERT INTO {modules} VALUES (1,1,'gallery',3),(2,1,'user',1),(3,1,'comment',2),(4,1,'organize',1),(5,1,'info',1),(6,1,'rss',1),(7,1,'search',1),(8,1,'slideshow',1),(9,1,'tag',1); +INSERT INTO {modules} VALUES (1,1,'gallery',6),(2,1,'user',1),(3,1,'comment',2),(4,1,'organize',1),(5,1,'info',1),(6,1,'rss',1),(7,1,'search',1),(8,1,'slideshow',1),(9,1,'tag',1); DROP TABLE IF EXISTS {outgoing_translations}; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; diff --git a/installer/installer.php b/installer/installer.php index 9ba88bea..b0af561e 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -18,31 +18,6 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -// We know that we have either mysql or mysqli. By default we use mysql functions, so if they're -// not defined then do the simplest thing which will work: remap them to their mysqli -// counterparts. -if (!function_exists("mysql_query")) { - function mysql_connect($host, $user, $pass) { - installer::$mysqli = new mysqli($host, $user, $pass); - // http://php.net/manual/en/mysqli.connect.php says to use mysqli_connect_error() instead of - // $mysqli->connect_error because of bugs before PHP 5.2.9 - $error = mysqli_connect_error(); - return empty($error); - } - function mysql_query($query) { - return installer::$mysqli->query($query); - } - function mysql_num_rows($result) { - return $result->num_rows; - } - function mysql_error() { - return installer::$mysqli->error; - } - function mysql_select_db($db) { - return installer::$mysqli->select_db($db); - } -} - class installer { static $mysqli; @@ -92,7 +67,32 @@ class installer { } static function connect($config) { - return @mysql_connect($config["host"], $config["user"], $config["password"]); + // We know that we have either mysql or mysqli. By default we use mysql functions, so if + // they're not defined then do the simplest thing which will work: remap them to their mysqli + // counterparts. + if (!function_exists("mysql_query")) { + function mysql_connect($host, $user, $pass) { + installer::$mysqli = new mysqli($host, $user, $pass); + // http://php.net/manual/en/mysqli.connect.php says to use mysqli_connect_error() instead of + // $mysqli->connect_error because of bugs before PHP 5.2.9 + $error = mysqli_connect_error(); + return empty($error); + } + function mysql_query($query) { + return installer::$mysqli->query($query); + } + function mysql_num_rows($result) { + return $result->num_rows; + } + function mysql_error() { + return installer::$mysqli->error; + } + function mysql_select_db($db) { + return installer::$mysqli->select_db($db); + } + } + + return mysql_connect($config["host"], $config["user"], $config["password"]); } static function select_db($config) { |