Vergleich inc/class_datacache.php - 1.6.4 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: class_datacache.php 5473 2011-06-23 11:12:10Z Tomm $

 * $Id$

 */

class datacache

 */

class datacache

Zeile 95Zeile 95
	function read($name, $hard=false)
{
global $db, $mybb;

	function read($name, $hard=false)
{
global $db, $mybb;

		



		// Already have this cache and we're not doing a hard refresh? Return cached copy
if(isset($this->cache[$name]) && $hard == false)
{

		// Already have this cache and we're not doing a hard refresh? Return cached copy
if(isset($this->cache[$name]) && $hard == false)
{

Zeile 106Zeile 106
		else if($hard == false && !is_object($this->handler))
{
return false;

		else if($hard == false && !is_object($this->handler))
{
return false;

		}


		}


		if(is_object($this->handler))
{
$data = $this->handler->fetch($name);

		if(is_object($this->handler))
{
$data = $this->handler->fetch($name);

			



			// No data returned - cache gone bad?
if($data === false)
{

			// No data returned - cache gone bad?
if($data === false)
{

Zeile 119Zeile 119
				$query = $db->simple_select("datacache", "title,cache", "title='".$db->escape_string($name)."'");
$cache_data = $db->fetch_array($query);
$data = @unserialize($cache_data['cache']);

				$query = $db->simple_select("datacache", "title,cache", "title='".$db->escape_string($name)."'");
$cache_data = $db->fetch_array($query);
$data = @unserialize($cache_data['cache']);

				
if($data == null)
{
$data = '';
}









				// Update cache for handler
$this->handler->put($name, $data);
}

				// Update cache for handler
$this->handler->put($name, $data);
}

		}		

		}

		// Else, using internal database cache
else
{
$query = $db->simple_select("datacache", "title,cache", "title='$name'");
$cache_data = $db->fetch_array($query);

		// Else, using internal database cache
else
{
$query = $db->simple_select("datacache", "title,cache", "title='$name'");
$cache_data = $db->fetch_array($query);

 


			if(!$cache_data['title'])
{
$data = false;

			if(!$cache_data['title'])
{
$data = false;

Zeile 880Zeile 876
		}

// Do we have any mod tools to use in our forums?

		}

// Do we have any mod tools to use in our forums?

		$query = $db->simple_select("modtools", "forums, tid", "type = 't'", array("order_by" => "tid"));

		$query = $db->simple_select("modtools", "forums, tid", '', array("order_by" => "tid"));


if($db->num_rows($query))
{


if($db->num_rows($query))
{