From 3bac89ad2a44562f4d0b1c458ed20740379c03fc Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 16 Nov 2005 17:57:08 +0100 Subject: [PATCH] add db-prefs.php --- backend.php | 2 ++ db-prefs.php | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 db-prefs.php diff --git a/backend.php b/backend.php index 83a0ab51..954c4dac 100644 --- a/backend.php +++ b/backend.php @@ -9,12 +9,14 @@ require_once "config.php"; require_once "db.php"; + require_once "db-prefs.php"; require_once "functions.php"; require_once "magpierss/rss_fetch.inc"; $script_started = getmicrotime(); $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); + $dbprefs_link = $link; if (!$link) { if (DB_TYPE == "mysql") { diff --git a/db-prefs.php b/db-prefs.php new file mode 100644 index 00000000..c0f6159e --- /dev/null +++ b/db-prefs.php @@ -0,0 +1,25 @@ + 0) { + $value = db_fetch_result($result, 0, "value"); + return $value; + } else { + die("Fatal error, unknown preferences key: $pref_name"); + } + } + +?>