From: Andrew Dolgov Date: Wed, 16 Nov 2005 16:57:08 +0000 (+0100) Subject: add db-prefs.php X-Git-Tag: schema_feature_freeze_for_1.1~288 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3bac89ad2a44562f4d0b1c458ed20740379c03fc;p=tt-rss.git add 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"); + } + } + +?>