mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Datastore improvements (#1538)
* Datastore improvements * Updated * Update functions.php * Updated * Updated * Updated * Update index.php * Update index.php * Update index.php * Update index.php * Update viewtopic.php * Update functions.php * Updated * Updated * Revert "Updated" This reverts commit0ff7d4ac60
. * Revert "Updated" This reverts commit8d637dff6c
. * Update index_data.php * Update index_data.php * Update index_data.php * Updated * Update CHANGELOG.md
This commit is contained in:
parent
5971379b6c
commit
c7f2223f7f
19 changed files with 67 additions and 50 deletions
10
index.php
10
index.php
|
@ -65,13 +65,13 @@ $tracking_topics = get_tracks('topic');
|
|||
$tracking_forums = get_tracks('forum');
|
||||
|
||||
// Statistics
|
||||
if (!$stats = $datastore->get('stats')) {
|
||||
if (!$stats = $datastore->get('stats') and !$datastore->has('stats')) {
|
||||
$datastore->update('stats');
|
||||
$stats = $datastore->get('stats');
|
||||
}
|
||||
|
||||
// Forums data
|
||||
if (!$forums = $datastore->get('cat_forums')) {
|
||||
if (!$forums = $datastore->get('cat_forums') and !$datastore->has('cat_forums')) {
|
||||
$datastore->update('cat_forums');
|
||||
$forums = $datastore->get('cat_forums');
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ if (!$cat_forums = CACHE('bb_cache')->get($cache_name)) {
|
|||
|
||||
// Obtain list of moderators
|
||||
$moderators = [];
|
||||
if (!$mod = $datastore->get('moderators')) {
|
||||
if (!$mod = $datastore->get('moderators') and !$datastore->has('moderators')) {
|
||||
$datastore->update('moderators');
|
||||
$mod = $datastore->get('moderators');
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ if ($bb_cfg['bt_show_dl_stat_on_index'] && !IS_GUEST) {
|
|||
|
||||
// Latest news
|
||||
if ($bb_cfg['show_latest_news']) {
|
||||
if (!$latest_news = $datastore->get('latest_news')) {
|
||||
if (!$latest_news = $datastore->get('latest_news') and !$datastore->has('latest_news')) {
|
||||
$datastore->update('latest_news');
|
||||
$latest_news = $datastore->get('latest_news');
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ if ($bb_cfg['show_latest_news']) {
|
|||
|
||||
// Network news
|
||||
if ($bb_cfg['show_network_news']) {
|
||||
if (!$network_news = $datastore->get('network_news')) {
|
||||
if (!$network_news = $datastore->get('network_news') and !$datastore->has('network_news')) {
|
||||
$datastore->update('network_news');
|
||||
$network_news = $datastore->get('network_news');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue