Fixes for installation
authorRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2009 16:50:18 +0000 (16:50 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2009 16:50:18 +0000 (16:50 +0000)
inc/mysql-connect.php
inc/stats-functions.php

index aa7df75574a5dc4d8808687d9c10f676b7e8a10e..96a0d9c60be079c8c1bfbd3ff0e8fd74d40d96b2 100644 (file)
@@ -147,6 +147,9 @@ if (!isInstalling()) {
                setConfigEntry('OUTPUT_MODE', 'render');
        } // END - if
 
                setConfigEntry('OUTPUT_MODE', 'render');
        } // END - if
 
+       // CFG: DATABASE-TYPE
+       setConfigEntry('_DB_TYPE', 'mysql3');
+
        // Include more
        foreach (array('inc/databases.php','inc/versions.php','inc/db/lib.php','inc/session.php','inc/install-functions.php','inc/load_config.php') as $inc) {
                // Load the include
        // Include more
        foreach (array('inc/databases.php','inc/versions.php','inc/db/lib.php','inc/session.php','inc/install-functions.php','inc/load_config.php') as $inc) {
                // Load the include
index baa0b130b1f0f24714685c12fa1bc650fba7308a..44256ff3dbb444876695c733154cf16ad56e0cfc 100644 (file)
@@ -99,6 +99,9 @@ function setStatsEntry ($entry, $value) {
 
 // Loads stats table
 function loadStatsTable () {
 
 // Loads stats table
 function loadStatsTable () {
+       // Check if the link is up
+       if (!SQL_IS_LINK_UP()) return false;
+
        // Do we have it there for today?
        if (!isStatsTableCreated()) {
                // Then create a default one
        // Do we have it there for today?
        if (!isStatsTableCreated()) {
                // Then create a default one
@@ -120,6 +123,9 @@ function loadStatsTable () {
 
 // Checks if the the statistics table is created
 function isStatsTableCreated () {
 
 // Checks if the the statistics table is created
 function isStatsTableCreated () {
+       // Check if the link is up
+       if (!SQL_IS_LINK_UP()) return false;
+
        // Ask for it
        $result = SQL_QUERY_ESC("SHOW TABLES LIKE '{?_MYSQL_PREFIX?}_stats_%s'",
                array(date('Ymd', time())), __FUNCTION__, __LINE__);
        // Ask for it
        $result = SQL_QUERY_ESC("SHOW TABLES LIKE '{?_MYSQL_PREFIX?}_stats_%s'",
                array(date('Ymd', time())), __FUNCTION__, __LINE__);
@@ -130,6 +136,9 @@ function isStatsTableCreated () {
 
 // Create the dummy table
 function createStatsTable () {
 
 // Create the dummy table
 function createStatsTable () {
+       // Check if the link is up
+       if (!SQL_IS_LINK_UP()) return false;
+
        // Create it here
        $result = SQL_QUERY_ESC("CREATE TABLE IF NOT EXISTS `{?_MYSQL_PREFIX?}_stats_%s` (
 `stats_entry` VARCHAR(100) NOT NULL DEFAULT '',
        // Create it here
        $result = SQL_QUERY_ESC("CREATE TABLE IF NOT EXISTS `{?_MYSQL_PREFIX?}_stats_%s` (
 `stats_entry` VARCHAR(100) NOT NULL DEFAULT '',
@@ -141,6 +150,9 @@ PRIMARY KEY (`stats_entry`)
 
 // Write all entries to the table
 function writeStatsTable () {
 
 // Write all entries to the table
 function writeStatsTable () {
+       // Check if the link is up
+       if (!SQL_IS_LINK_UP()) return false;
+
        // Empty the table first
        SQL_QUERY_ESC("TRUNCATE `{?_MYSQL_PREFIX?}_stats_%s`",
                array(date('Ymd', time())), __FUNCTION__, __LINE__);
        // Empty the table first
        SQL_QUERY_ESC("TRUNCATE `{?_MYSQL_PREFIX?}_stats_%s`",
                array(date('Ymd', time())), __FUNCTION__, __LINE__);