]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-connect.php
Filter support added to template engine, functions renamed
[mailer.git] / inc / mysql-connect.php
index d29d479a65eca35f0e4805e32c009356c8f1c965..8619a8510926b6439da01c74ad2093d1f9fd4cbf 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 11/16/2003 *
- * ===============                              Last change: 12/13/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 11/16/2003 *
+ * ===================                          Last change: 12/13/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : mysql-connect.php                                *
@@ -59,8 +59,11 @@ initErrorHandler();
 // Init request
 initRequest();
 
+// Init userid
+initMemberId();
+
 // Set important header_sent
-if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = 0;
+if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = '0';
 
 // Init fatal messages
 initFatalMessages();
@@ -68,21 +71,14 @@ initFatalMessages();
 // Init message system
 initMessages();
 
-// Check if this file is writeable or read-only and warn the user
+// Are we in installation phase?
 if ((!isInstalling()) && (!isInstallationPhase())) {
-       // Load "databases" aka static arrays
-       loadIncludeOnce('inc/databases.php');
+       // Load configuration file(s) here
+       loadIncludeOnce('inc/load_config.php');
 
        // Load database layer here
        loadIncludeOnce('inc/db/lib.php');
 
-       // Set missing module
-       if ((!isModuleSet()) && (isGetRequestElementSet('module'))) setModule(getRequestElement('module'));
-       if (!isModuleSet()) setModule('index');
-
-       // Load configuration file(s) here
-       loadIncludeOnce('inc/load_config.php');
-
        // CSS array
        initExtensionCssFiles();
 
@@ -106,9 +102,6 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
                                // Load cache
                                loadIncludeOnce('inc/load_cache.php');
 
-                               // Init filter system
-                               initFilterSystem();
-
                                // Run the init filter chain
                                runFilterChain('init');
 
@@ -151,11 +144,11 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
                setConfigEntry('OUTPUT_MODE', 'render');
        } // END - if
 
-       // Set other missing variables
-       if (!isOutputModeSet()) setOutputMode(0);
+       // CFG: DATABASE-TYPE
+       setConfigEntry('_DB_TYPE', 'mysql3');
 
        // Include more
-       foreach (array('inc/databases.php','inc/db/lib.php','inc/session.php','inc/versions.php','inc/install-functions.php','inc/load_config.php') as $inc) {
+       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
                loadIncludeOnce($inc);
        } // END - foreach
@@ -163,15 +156,15 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
        // Load config
        loadIncludeOnce('inc/load_config.php');
 
+       // Init filter system here
+       initFilterSystem();
+
        // Are we installation routine?
        if ((!isInstalling()) && (getOutputMode() != 1) && (getOutputMode() != -1)) {
                // You have to install first!
                redirectToUrl('install.php');
        } // END - if
 
-       // Init filter system here
-       initFilterSystem();
-
        // Load cache
        loadIncludeOnce('inc/load_cache.php');