diff --git a/prefs.php b/prefs.php
index a2e7ac31c..b4d7922d2 100644
--- a/prefs.php
+++ b/prefs.php
@@ -1,7 +1,27 @@
+
+ require_once "version.php";
+ require_once "config.php";
+ require_once "db-prefs.php";
+
+ $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
+?>
Tiny Tiny RSS : Preferences
+
+ if (get_pref($link, 'USE_COMPACT_STYLESHEET')) { ?>
+
+
+
+ } else { ?>
+
+
+
+ } ?>
+
+
@@ -13,14 +33,6 @@
-
- require_once "version.php";
- require_once "config.php";
- require_once "db-prefs.php";
-
- $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
-?>
-
if (get_pref($link, 'DISPLAY_HEADER')) { ?>
@@ -72,6 +84,7 @@
} ?>
+ db_close($link); ?>
diff --git a/tt-rss.php b/tt-rss.php
index a6a1842c6..5bf785630 100644
--- a/tt-rss.php
+++ b/tt-rss.php
@@ -198,6 +198,7 @@
} ?>
+ db_close($link); ?>