First batch of removal of the headers needed for revision-functions.php
[mailer.git] / inc / db / lib.php
index 4384bfea813a58fa0e813a765fa08055e6f6d573..41c725852ce066b0114d943e68888b37f6f8bde4 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 01/31/2004 *
- * ===============                              Last change: 08/29/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 01/31/2004 *
+ * ===================                          Last change: 08/29/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : lib.php                                          *
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : SQL-Typ auswaehlen                               *
  * -------------------------------------------------------------------- *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
-       require($INC);
-}
-
-// Select MySQL 3 as default database type
-if (_DB_TYPE == "_DB_TYPE") define('_DB_TYPE', "mysql3");
+       die();
+} // END - if
 
 // Create include file name
-$INC = sprintf("%sinc/db/lib-%s.php", PATH, _DB_TYPE);
+$inc = sprintf('inc/db/lib-%s.php', getConfig('_DB_TYPE'));
 
-if ((file_exists($INC)) && (is_readable($INC))) {
-       // Include abstraction layer
-       require_once($INC);
-} else {
+// Is the database library available?
+if (!isIncludeReadable($inc)) {
        // Bye, bye...
-       die("Cannot load database abstraction layer! R.I.P.");
-}
+       reportBug(__FILE__, __LINE__, 'Cannot load database library <u>' . getConfig('_DB_TYPE') . '</u> -&gt; R.I.P.');
+} // END - if
+
+// Include abstraction layer
+loadIncludeOnce($inc);
 
-// Remove this globally used variable
-unset($INC);
+// Initialize it
+initDatabaseLayer();
 
-//
+// [EOF]
 ?>