Zeile 20 | Zeile 20 |
---|
/** * The current cache handler we're using *
|
/** * The current cache handler we're using *
|
* @var object
| * @var apcCacheHandler|diskCacheHandler|eacceleratorCacheHandler|memcacheCacheHandler|memcachedCacheHandler|xcacheCacheHandler
|
*/ public $handler = null;
| */ public $handler = null;
|
Zeile 125 | Zeile 125 |
---|
/** * Read cache from files or db. *
|
/** * Read cache from files or db. *
|
* @param string The cache component to read. * @param boolean If true, cannot be overwritten during script execution. * @return unknown
| * @param string $name The cache component to read. * @param boolean $hard If true, cannot be overwritten during script execution. * @return mixed
|
*/ function read($name, $hard=false) {
| */ function read($name, $hard=false) {
|
Zeile 220 | Zeile 220 |
---|
/** * Update cache contents. *
|
/** * Update cache contents. *
|
* @param string The cache content identifier. * @param string The cache content.
| * @param string $name The cache content identifier. * @param string $contents The cache content.
|
*/ function update($name, $contents) {
| */ function update($name, $contents) {
|
Zeile 261 | Zeile 261 |
---|
* Originally from frostschutz's PluginLibrary * github.com/frostschutz *
|
* Originally from frostschutz's PluginLibrary * github.com/frostschutz *
|
* @param string Cache name or title * @param boolean To delete a cache starting with name_
| * @param string $name Cache name or title * @param boolean $greedy To delete a cache starting with name_
|
*/ function delete($name, $greedy = false) {
| */ function delete($name, $greedy = false) {
|
Zeile 359 | Zeile 359 |
---|
/** * Debug a cache call to a non-database cache handler *
|
/** * Debug a cache call to a non-database cache handler *
|
* @param string The cache key * @param string The time it took to perform the call. * @param boolean Hit or miss status
| * @param string $string The cache key * @param string $qtime The time it took to perform the call. * @param boolean $hit Hit or miss status
|
*/ function debug_call($string, $qtime, $hit) {
| */ function debug_call($string, $qtime, $hit) {
|
Zeile 386 | Zeile 386 |
---|
$cache_method = $cache_data[0]; $cache_key = $cache_data[1];
|
$cache_method = $cache_data[0]; $cache_key = $cache_data[1];
|
$this->cache_debug .= "<table style=\"background-color: #666;\" width=\"95%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\">\n". "<tr>\n". "<td style=\"background-color: #ccc;\">{$debug_extra}<div><strong>#".$this->call_count." - ".ucfirst($cache_method)." Call</strong></div></td>\n". "</tr>\n". "<tr style=\"background-color: #fefefe;\">\n". "<td><span style=\"font-family: Courier; font-size: 14px;\">(".$mybb->config['cache_store'].") [".$hit_status."] ".htmlspecialchars_uni($cache_key)."</span></td>\n". "</tr>\n". "<tr>\n". "<td bgcolor=\"#ffffff\">Call Time: ".format_time_duration($qtime)."</td>\n". "</tr>\n". "</table>\n". "<br />\n";
| $this->cache_debug = "<table style=\"background-color: #666;\" width=\"95%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\"> <tr> <td style=\"background-color: #ccc;\">{$debug_extra}<div><strong>#{$this->call_count} - ".ucfirst($cache_method)." Call</strong></div></td> </tr> <tr style=\"background-color: #fefefe;\"> <td><span style=\"font-family: Courier; font-size: 14px;\">({$mybb->config['cache_store']}) [{$hit_status}] ".htmlspecialchars_uni($cache_key)."</span></td> </tr> <tr> <td bgcolor=\"#ffffff\">Call Time: ".format_time_duration($qtime)."</td> </tr> </table> <br />\n";
|
$this->calllist[$this->call_count]['key'] = $string; $this->calllist[$this->call_count]['time'] = $qtime;
| $this->calllist[$this->call_count]['key'] = $string; $this->calllist[$this->call_count]['time'] = $qtime;
|
Zeile 406 | Zeile 406 |
---|
/** * Select the size of the cache *
|
/** * Select the size of the cache *
|
* @param string The name of the cache
| * @param string $name The name of the cache
|
* @return integer the size of the cache */ function size_of($name='')
| * @return integer the size of the cache */ function size_of($name='')
|
Zeile 563 | Zeile 563 |
---|
/** * Update the forum permissions cache. *
|
/** * Update the forum permissions cache. *
|
* @return false When failed, returns false.
| * @return bool When failed, returns false.
|
*/ function update_forumpermissions() {
| */ function update_forumpermissions() {
|
Zeile 603 | Zeile 603 |
---|
$this->build_forum_permissions(); $this->update("forumpermissions", $this->built_forum_permissions);
|
$this->build_forum_permissions(); $this->update("forumpermissions", $this->built_forum_permissions);
|
| return true;
|
}
/** * Build the forum permissions array * * @access private
|
}
/** * Build the forum permissions array * * @access private
|
* @param array An optional permissions array. * @param int An optional permission id.
| * @param array $permissions An optional permissions array. * @param int $pid An optional permission id.
|
*/ private function build_forum_permissions($permissions=array(), $pid=0) {
| */ private function build_forum_permissions($permissions=array(), $pid=0) {
|
Zeile 645 | Zeile 647 |
---|
* */ function update_stats()
|
* */ function update_stats()
|
{ global $db;
| { global $db;
|
require_once MYBB_ROOT."inc/functions_rebuild.php"; rebuild_stats(); }
| require_once MYBB_ROOT."inc/functions_rebuild.php"; rebuild_stats(); }
|
Zeile 691 | Zeile 693 |
---|
'time' => TIME_NOW, 'top_referrer' => (array)$topreferrer, 'top_poster' => (array)$topposter,
|
'time' => TIME_NOW, 'top_referrer' => (array)$topreferrer, 'top_poster' => (array)$topposter,
|
'posters' => $posters,
| 'posters' => $posters
|
);
$this->update('statistics', $statistics);
| );
$this->update('statistics', $statistics);
|
Zeile 700 | Zeile 702 |
---|
/** * Update the moderators cache. *
|
/** * Update the moderators cache. *
|
| * @return bool Returns false on failure
|
*/ function update_moderators() {
| */ function update_moderators() {
|
Zeile 712 | Zeile 715 |
---|
if(!is_array($forum_cache)) { return false;
|
if(!is_array($forum_cache)) { return false;
|
}
| }
|
reset($forum_cache); $fcache = array();
| reset($forum_cache); $fcache = array();
|
Zeile 777 | Zeile 780 |
---|
$this->build_moderators();
$this->update("moderators", $this->built_moderators);
|
$this->build_moderators();
$this->update("moderators", $this->built_moderators);
|
| return true;
|
}
/**
| }
/**
|
Zeile 792 | Zeile 797 |
---|
$data = array( 'users' => $awaitingusers,
|
$data = array( 'users' => $awaitingusers,
|
'time' => TIME_NOW,
| 'time' => TIME_NOW
|
);
$this->update('awaitingactivation', $data);
| );
$this->update('awaitingactivation', $data);
|
Zeile 802 | Zeile 807 |
---|
* Build the moderators array * * @access private
|
* Build the moderators array * * @access private
|
* @param array An optional moderators array (moderators of the parent forum for example). * @param int An optional parent ID.
| * @param array $moderators An optional moderators array (moderators of the parent forum for example). * @param int $pid An optional parent ID.
|
*/ private function build_moderators($moderators=array(), $pid=0) {
| */ private function build_moderators($moderators=array(), $pid=0) {
|
Zeile 947 | Zeile 952 |
---|
/** * Update the mailqueue cache *
|
/** * Update the mailqueue cache *
|
| * @param int $last_run * @param int $lock_time
|
*/ function update_mailqueue($last_run=0, $lock_time=0) {
| */ function update_mailqueue($last_run=0, $lock_time=0) {
|
Zeile 1120 | Zeile 1127 |
---|
$birthdays = array();
|
$birthdays = array();
|
// Get today, yesturday, and tomorrow's time (for different timezones)
| // Get today, yesterday, and tomorrow's time (for different timezones)
|
$bdaytime = TIME_NOW; $bdaydate = my_date("j-n", $bdaytime, '', 0); $bdaydatetomorrow = my_date("j-n", ($bdaytime+86400), '', 0);
| $bdaytime = TIME_NOW; $bdaydate = my_date("j-n", $bdaytime, '', 0); $bdaydatetomorrow = my_date("j-n", ($bdaytime+86400), '', 0);
|