Zeile 258 | Zeile 258 |
---|
*/ function delete($name, $greedy = false) {
|
*/ function delete($name, $greedy = false) {
|
global $db, $mybb, $cache;
| global $db, $mybb, $cache;
|
// Prepare for database query. $dbname = $db->escape_string($name);
| // Prepare for database query. $dbname = $db->escape_string($name);
|
Zeile 666 | Zeile 666 |
---|
break; }
|
break; }
|
$query = $db->query(' SELECT u.uid, u.username, COUNT(pid) AS poststoday FROM '.TABLE_PREFIX.'posts p LEFT JOIN '.TABLE_PREFIX.'users u ON (p.uid=u.uid) WHERE p.dateline>'.$timesearch.' GROUP BY '.$group_by.' ORDER BY poststoday DESC LIMIT 1 '); $topposter = $db->fetch_array($query);
| $query = $db->query(" SELECT u.uid, u.username, COUNT(*) AS poststoday FROM {$db->table_prefix}posts p LEFT JOIN {$db->table_prefix}users u ON (p.uid=u.uid) WHERE p.dateline > {$timesearch} AND p.visible=1 GROUP BY {$group_by} ORDER BY poststoday DESC ");
$most_posts = 0; while($user = $db->fetch_array($query)) { if($user['poststoday'] > $most_posts) { $most_posts = $user['poststoday']; $topposter = $user; } }
|
$query = $db->simple_select('users', 'COUNT(uid) AS posters', 'postnum>0'); $posters = $db->fetch_field($query, 'posters');
| $query = $db->simple_select('users', 'COUNT(uid) AS posters', 'postnum>0'); $posters = $db->fetch_field($query, 'posters');
|
Zeile 808 | Zeile 817 |
---|
{ foreach($main as $forum) {
|
{ foreach($main as $forum) {
|
$forum_mods = '';
| $forum_mods = array();
|
if(count($moderators)) { $forum_mods = $moderators;
| if(count($moderators)) { $forum_mods = $moderators;
|
Zeile 837 | Zeile 846 |
---|
* */ function update_forums()
|
* */ function update_forums()
|
{ global $db;
| { global $db;
|
$forums = array();
// Things we don't want to cache
| $forums = array();
// Things we don't want to cache
|
Zeile 859 | Zeile 868 |
---|
}
$this->update("forums", $forums);
|
}
$this->update("forums", $forums);
|
}
| }
|
/** * Update usertitles cache. *
| /** * Update usertitles cache. *
|
Zeile 901 | Zeile 910 |
---|
"total" => $total['reportcount'], "lastdateline" => $latest['dateline'] );
|
"total" => $total['reportcount'], "lastdateline" => $latest['dateline'] );
|
|
|
$this->update("reportedcontent", $reports); }
| $this->update("reportedcontent", $reports); }
|
Zeile 921 | Zeile 930 |
---|
}
$this->update("mycode", $mycodes);
|
}
$this->update("mycode", $mycodes);
|
}
| }
|
/** * Update the mailqueue cache
| /** * Update the mailqueue cache
|
Zeile 1081 | Zeile 1090 |
---|
}
function update_banned()
|
}
function update_banned()
|
{ global $db;
$bans = array();
| { global $db;
$bans = array();
|
$query = $db->simple_select("banned"); while($ban = $db->fetch_array($query)) {
| $query = $db->simple_select("banned"); while($ban = $db->fetch_array($query)) {
|
Zeile 1249 | Zeile 1258 |
---|
if($reason['appliesto'] == 'all') { foreach($content_types as $content)
|
if($reason['appliesto'] == 'all') { foreach($content_types as $content)
|
{
| {
|
$reasons[$content][] = array( 'rid' => $reason['rid'], 'title' => $reason['title'],
| $reasons[$content][] = array( 'rid' => $reason['rid'], 'title' => $reason['title'],
|
Zeile 1276 | Zeile 1285 |
---|
/* Other, extra functions for reloading caches if we just changed to another cache extension (i.e. from db -> xcache) */ function reload_mostonline()
|
/* Other, extra functions for reloading caches if we just changed to another cache extension (i.e. from db -> xcache) */ function reload_mostonline()
|
{ global $db;
| { global $db;
|
$query = $db->simple_select("datacache", "title,cache", "title='mostonline'"); $this->update("mostonline", unserialize($db->fetch_field($query, "cache"))); }
| $query = $db->simple_select("datacache", "title,cache", "title='mostonline'"); $this->update("mostonline", unserialize($db->fetch_field($query, "cache"))); }
|
Zeile 1297 | Zeile 1306 |
---|
$query = $db->simple_select("datacache", "title,cache", "title='last_backup'"); $this->update("last_backup", unserialize($db->fetch_field($query, "cache")));
|
$query = $db->simple_select("datacache", "title,cache", "title='last_backup'"); $this->update("last_backup", unserialize($db->fetch_field($query, "cache")));
|
}
| }
|
function reload_internal_settings() { global $db;
|
function reload_internal_settings() { global $db;
|
|
|
$query = $db->simple_select("datacache", "title,cache", "title='internal_settings'"); $this->update("internal_settings", unserialize($db->fetch_field($query, "cache"))); }
function reload_version_history()
|
$query = $db->simple_select("datacache", "title,cache", "title='internal_settings'"); $this->update("internal_settings", unserialize($db->fetch_field($query, "cache"))); }
function reload_version_history()
|
{ global $db;
| { global $db;
|
$query = $db->simple_select("datacache", "title,cache", "title='version_history'"); $this->update("version_history", unserialize($db->fetch_field($query, "cache"))); }
|
$query = $db->simple_select("datacache", "title,cache", "title='version_history'"); $this->update("version_history", unserialize($db->fetch_field($query, "cache"))); }
|
|
|
function reload_modnotes()
|
function reload_modnotes()
|
{ global $db;
| { global $db;
|
$query = $db->simple_select("datacache", "title,cache", "title='modnotes'"); $this->update("modnotes", unserialize($db->fetch_field($query, "cache")));
|
$query = $db->simple_select("datacache", "title,cache", "title='modnotes'"); $this->update("modnotes", unserialize($db->fetch_field($query, "cache")));
|
}
| }
|
function reload_adminnotes() { global $db;
|
function reload_adminnotes() { global $db;
|
|
|
$query = $db->simple_select("datacache", "title,cache", "title='adminnotes'"); $this->update("adminnotes", unserialize($db->fetch_field($query, "cache")));
|
$query = $db->simple_select("datacache", "title,cache", "title='adminnotes'"); $this->update("adminnotes", unserialize($db->fetch_field($query, "cache")));
|
}
function reload_mybb_credits() { admin_redirect('index.php?module=home-credits&fetch_new=-2');
| |
} }
| } }
|