Vergleich inc/class_datacache.php - 1.8.1 - 1.8.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 117Zeile 117
			$query = $db->simple_select("datacache", "title,cache");
while($data = $db->fetch_array($query))
{

			$query = $db->simple_select("datacache", "title,cache");
while($data = $db->fetch_array($query))
{

				$this->cache[$data['title']] = my_unserialize($data['cache']);

				$this->cache[$data['title']] = unserialize($data['cache']);

			}
}
}

			}
}
}

Zeile 171Zeile 171
				// Fetch from database
$query = $db->simple_select("datacache", "title,cache", "title='".$db->escape_string($name)."'");
$cache_data = $db->fetch_array($query);

				// Fetch from database
$query = $db->simple_select("datacache", "title,cache", "title='".$db->escape_string($name)."'");
$cache_data = $db->fetch_array($query);

				$data = my_unserialize($cache_data['cache']);

				$data = unserialize($cache_data['cache']);


// Update cache for handler
get_execution_time();


// Update cache for handler
get_execution_time();

Zeile 200Zeile 200
			}
else
{

			}
else
{

				$data = my_unserialize($cache_data['cache']);

				$data = unserialize($cache_data['cache']);

			}
}


			}
}


Zeile 386Zeile 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 659Zeile 659
	function update_statistics()
{
global $db;

	function update_statistics()
{
global $db;


$query = $db->simple_select('forums', 'fid, threads, posts', $fidnot.'type=\'f\'', array('order_by' => 'posts', 'order_dir' => 'DESC', 'limit' => 1));
$forum = $db->fetch_array($query);

 

$query = $db->simple_select('users', 'uid, username, referrals', 'referrals>0', array('order_by' => 'referrals', 'order_dir' => 'DESC', 'limit' => 1));
$topreferrer = $db->fetch_array($query);


$query = $db->simple_select('users', 'uid, username, referrals', 'referrals>0', array('order_by' => 'referrals', 'order_dir' => 'DESC', 'limit' => 1));
$topreferrer = $db->fetch_array($query);

Zeile 678Zeile 675
		}

$query = $db->query('

		}

$query = $db->query('

			SELECT u.uid, u.username, COUNT(*) AS poststoday

			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.'

			FROM '.TABLE_PREFIX.'posts p
LEFT JOIN '.TABLE_PREFIX.'users u ON (p.uid=u.uid)
WHERE p.dateline>'.$timesearch.'

Zeile 687Zeile 684
		');
$topposter = $db->fetch_array($query);


		');
$topposter = $db->fetch_array($query);


		$query = $db->simple_select('users', 'COUNT(*) AS posters', 'postnum>0');

		$query = $db->simple_select('users', 'COUNT(uid) AS posters', 'postnum>0');

		$posters = $db->fetch_field($query, 'posters');

$statistics = array(
'time' => TIME_NOW,

		$posters = $db->fetch_field($query, 'posters');

$statistics = array(
'time' => TIME_NOW,

			'top_forum' => (array)$forum,

 
			'top_referrer' => (array)$topreferrer,
'top_poster' => (array)$topposter,

			'top_referrer' => (array)$topreferrer,
'top_poster' => (array)$topposter,

			'posters' => (int)$posters,
);


			'posters' => $posters
);


		$this->update('statistics', $statistics);
}


		$this->update('statistics', $statistics);
}


Zeile 729Zeile 725

// Sort children
foreach($fcache as $pid => $value)


// Sort children
foreach($fcache as $pid => $value)

		{

		{

			ksort($fcache[$pid]);
}
ksort($fcache);

			ksort($fcache[$pid]);
}
ksort($fcache);

Zeile 743Zeile 739
			LEFT JOIN ".TABLE_PREFIX."users u ON (m.id=u.uid)
WHERE m.isgroup = '0'
ORDER BY u.username

			LEFT JOIN ".TABLE_PREFIX."users u ON (m.id=u.uid)
WHERE m.isgroup = '0'
ORDER BY u.username

		");
while($moderator = $db->fetch_array($query))
{

		");
while($moderator = $db->fetch_array($query))
{

			$this->moderators[$moderator['fid']]['users'][$moderator['id']] = $moderator;
}


			$this->moderators[$moderator['fid']]['users'][$moderator['id']] = $moderator;
}


Zeile 778Zeile 774
			}
}


			}
}


		$this->build_moderators();


		$this->build_moderators();


		$this->update("moderators", $this->built_moderators);
}


		$this->update("moderators", $this->built_moderators);
}


Zeile 794Zeile 790
		$query = $db->simple_select('users', 'COUNT(uid) AS awaitingusers', 'usergroup=\'5\'');
$awaitingusers = (int)$db->fetch_field($query, 'awaitingusers');


		$query = $db->simple_select('users', 'COUNT(uid) AS awaitingusers', 'usergroup=\'5\'');
$awaitingusers = (int)$db->fetch_field($query, 'awaitingusers');


		$this->update('awaitingactivation', array('users' => $awaitingusers));






		$data = array(
'users' => $awaitingusers,
'time' => TIME_NOW
);

$this->update('awaitingactivation', $data);

	}

/**

	}

/**

Zeile 847Zeile 848
		$forums = array();

// Things we don't want to cache

		$forums = array();

// Things we don't want to cache

		$exclude = array("unapprovedthreads", "unapprovedposts", "threads", "posts", "lastpost", "lastposter", "lastposttid", "deletedthreads", "deletedposts");

		$exclude = array("unapprovedthreads", "unapprovedposts", "threads", "posts", "lastpost", "lastposter", "lastposttid", "lastposteruid", "lastpostsubject", "deletedthreads", "deletedposts");


$query = $db->simple_select("forums", "*", "", array('order_by' => 'pid,disporder'));
while($forum = $db->fetch_array($query))


$query = $db->simple_select("forums", "*", "", array('order_by' => 'pid,disporder'));
while($forum = $db->fetch_array($query))

Zeile 1119Zeile 1120

$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);

Zeile 1250Zeile 1251
		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='mostonline'");

		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='mostonline'");

		$this->update("mostonline", my_unserialize($db->fetch_field($query, "cache")));

		$this->update("mostonline", unserialize($db->fetch_field($query, "cache")));

	}

function reload_plugins()

	}

function reload_plugins()

Zeile 1258Zeile 1259
		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='plugins'");

		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='plugins'");

		$this->update("plugins", my_unserialize($db->fetch_field($query, "cache")));

		$this->update("plugins", unserialize($db->fetch_field($query, "cache")));

	}

function reload_last_backup()

	}

function reload_last_backup()

Zeile 1266Zeile 1267
		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='last_backup'");

		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='last_backup'");

		$this->update("last_backup", my_unserialize($db->fetch_field($query, "cache")));

		$this->update("last_backup", unserialize($db->fetch_field($query, "cache")));

	}

function reload_internal_settings()

	}

function reload_internal_settings()

Zeile 1274Zeile 1275
		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='internal_settings'");

		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='internal_settings'");

		$this->update("internal_settings", my_unserialize($db->fetch_field($query, "cache")));

		$this->update("internal_settings", unserialize($db->fetch_field($query, "cache")));

	}

function reload_version_history()

	}

function reload_version_history()

Zeile 1282Zeile 1283
		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='version_history'");

		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='version_history'");

		$this->update("version_history", my_unserialize($db->fetch_field($query, "cache")));

		$this->update("version_history", unserialize($db->fetch_field($query, "cache")));

	}

function reload_modnotes()

	}

function reload_modnotes()

Zeile 1290Zeile 1291
		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='modnotes'");

		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='modnotes'");

		$this->update("modnotes", my_unserialize($db->fetch_field($query, "cache")));

		$this->update("modnotes", unserialize($db->fetch_field($query, "cache")));

	}

function reload_adminnotes()

	}

function reload_adminnotes()

Zeile 1298Zeile 1299
		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='adminnotes'");

		global $db;

$query = $db->simple_select("datacache", "title,cache", "title='adminnotes'");

		$this->update("adminnotes", my_unserialize($db->fetch_field($query, "cache")));

		$this->update("adminnotes", unserialize($db->fetch_field($query, "cache")));

	}

function reload_mybb_credits()

	}

function reload_mybb_credits()