summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-01-13 21:25:44 +0300
committerAndrew Dolgov <[email protected]>2010-01-13 21:25:44 +0300
commite4c51a6ce960a7772065be14fd787a4213831789 (patch)
tree91fae534f7899e4265f152f36d417298eae7fcbe /functions.php
parentf0c33497b1370500a6a26fdb6dd38b1c91e3ad5b (diff)
probable fix for schema 63 updating problem
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 369a3bcf7..f6ce227f0 100644
--- a/functions.php
+++ b/functions.php
@@ -1978,7 +1978,12 @@
}
function get_user_theme_path($link) {
- $theme_id = get_pref($link, "_THEME_ID");
+
+ if (get_schema_version($link) >= 63) {
+ $theme_id = get_pref($link, "_THEME_ID");
+ } else {
+ $theme_id = 1;
+ }
$result = db_query($link, "SELECT theme_path
FROM ttrss_themes WHERE id = '$theme_id'");
@@ -2040,6 +2045,11 @@
return "even";
}
+ function get_schema_version($link) {
+ $result = db_query($link, "SELECT schema_version FROM ttrss_version");
+ return (int) db_fetch_result($result, 0, "schema_version");
+ }
+
function sanity_check($link) {
error_reporting(0);