X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fdb%2Flib.php;h=217d7681b042081a783791c3b3aa665800b2efba;hb=d1637dad0b2ca0e5fb411ee0843f01bfb4cc94e0;hp=d461ebf1e174eb229e8b28c4e7e7f9a272e1ac3a;hpb=58b29a924c48e7c1ce38c435c92e541b53984c56;p=mailer.git diff --git a/inc/db/lib.php b/inc/db/lib.php index d461ebf1e1..217d7681b0 100644 --- a/inc/db/lib.php +++ b/inc/db/lib.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : SQL-Typ auswaehlen * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -32,23 +37,23 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; +if (!defined('__SECURITY')) { + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); -} +} // END - if -// Select MySQL 3 as default database type -if (_DB_TYPE == "_DB_TYPE") define('_DB_TYPE', "mysql3"); +// Is it not set? +if (!isConfigEntrySet('_DB_TYPE')) setConfigEntry('_DB_TYPE', 'mysql3'); // Create include file name -$INC = PATH."inc/db/lib-"._DB_TYPE.".php"; +$INC = sprintf("inc/db/lib-%s.php", getConfig('_DB_TYPE')); -if ((file_exists($INC)) && (is_readable($INC))) { +if (isIncludeReadable($INC)) { // Include abstraction layer - require_once($INC); + loadIncludeOnce($INC); } else { // Bye, bye... - die("Cannot load database abstraction layer! R.I.P."); + die('Cannot load database abstraction layer ' . getConfig('_DB_TYPE') . ' -> R.I.P.'); } //