mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-07-04 13:10:49 +02:00
get_user_theme_path: cache data
This commit is contained in:
parent
c3b7b797f5
commit
6ba506224e
|
@ -1999,13 +1999,19 @@
|
||||||
$theme_id = 1;
|
$theme_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$_SESSION["theme_path"][$theme_id]) {
|
||||||
$result = db_query($link, "SELECT theme_path
|
$result = db_query($link, "SELECT theme_path
|
||||||
FROM ttrss_themes WHERE id = '$theme_id'");
|
FROM ttrss_themes WHERE id = '$theme_id'");
|
||||||
if (db_num_rows($result) != 0) {
|
if (db_num_rows($result) != 0) {
|
||||||
return db_fetch_result($result, 0, "theme_path");
|
$theme = db_fetch_result($result, 0, "theme_path");
|
||||||
|
$_SESSION["theme_path"][$theme_id] = $theme;
|
||||||
|
return $theme;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return $_SESSION["theme_path"][$theme_id];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function smart_date_time($timestamp) {
|
function smart_date_time($timestamp) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user