Vergleich inc/class_datacache.php - 1.8.31 - 1.8.39

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 134Zeile 134
			$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']] = unserialize($data['cache']);


				// use native_unserialize() over my_unserialize() for performance reasons
$this->cache[$data['title']] = native_unserialize($data['cache']);

			}
}
}

			}
}
}

Zeile 188Zeile 189
				// 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']);

 




				// Update cache for handler
get_execution_time();

$hit = $this->handler->put($name, $data);






				if($cache_data)
{
// use native_unserialize() over my_unserialize() for performance reasons
$data = native_unserialize($cache_data['cache']);

// Update cache for handler
get_execution_time();

$hit = $this->handler->put($name, $data);





				$call_time = get_execution_time();
$this->call_time += $call_time;
$this->call_count++;

					$call_time = get_execution_time();
$this->call_time += $call_time;
$this->call_count++;





				if($mybb->debug_mode)






					if($mybb->debug_mode)
{
$this->debug_call('set:'.$name, $call_time, $hit);
}
}
else

				{

				{

					$this->debug_call('set:'.$name, $call_time, $hit);

					$data = false;

				}
}
}

				}
}
}

Zeile 217Zeile 227
			}
else
{

			}
else
{

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


				// use native_unserialize() over my_unserialize() for performance reasons
$data = native_unserialize($cache_data['cache']);

			}
}


			}
}


Zeile 415Zeile 426
</tr>
</table>
<br />\n";

</tr>
</table>
<br />\n";





		$this->calllist[$this->call_count]['key'] = $string;
$this->calllist[$this->call_count]['time'] = $qtime;
}

/**
* Select the size of the cache

		$this->calllist[$this->call_count]['key'] = $string;
$this->calllist[$this->call_count]['time'] = $qtime;
}

/**
* Select the size of the cache

	 *

	 *

	 * @param string $name The name of the cache
* @return integer the size of the cache
*/
function size_of($name='')
{
global $db;

	 * @param string $name The name of the cache
* @return integer the size of the cache
*/
function size_of($name='')
{
global $db;





		if($this->handler instanceof CacheHandlerInterface)
{
$size = $this->handler->size_of($name);
if(!$size)
{
if($name)

		if($this->handler instanceof CacheHandlerInterface)
{
$size = $this->handler->size_of($name);
if(!$size)
{
if($name)

				{

				{

					$query = $db->simple_select("datacache", "cache", "title='{$name}'");
return strlen($db->fetch_field($query, "cache"));
}

					$query = $db->simple_select("datacache", "cache", "title='{$name}'");
return strlen($db->fetch_field($query, "cache"));
}

Zeile 457Zeile 468
			{
$query = $db->simple_select("datacache", "cache", "title='{$name}'");
return strlen($db->fetch_field($query, "cache"));

			{
$query = $db->simple_select("datacache", "cache", "title='{$name}'");
return strlen($db->fetch_field($query, "cache"));

			}

			}

			else
{
return $db->fetch_size("datacache");

			else
{
return $db->fetch_size("datacache");

Zeile 470Zeile 481
	 *
*/
function update_version()

	 *
*/
function update_version()

	{

	{

		global $mybb;

$version = array(

		global $mybb;

$version = array(

Zeile 633Zeile 644
	 */
private function build_forum_permissions($permissions=array(), $pid=0)
{

	 */
private function build_forum_permissions($permissions=array(), $pid=0)
{

		$usergroups = array_keys($this->read("usergroups", true));








		$usergroups = $this->read("usergroups", true);

if($usergroups === false)
{
$usergroups = array();
}

$usergroups = array_keys($usergroups);

		if(!empty($this->forum_permissions_forum_cache[$pid]))
{
foreach($this->forum_permissions_forum_cache[$pid] as $main)

		if(!empty($this->forum_permissions_forum_cache[$pid]))
{
foreach($this->forum_permissions_forum_cache[$pid] as $main)

Zeile 1311Zeile 1329
		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", unserialize($db->fetch_field($query, "cache")));

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

	}

function reload_plugins()

	}

function reload_plugins()

Zeile 1319Zeile 1337
		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", unserialize($db->fetch_field($query, "cache")));

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

	}

function reload_last_backup()

	}

function reload_last_backup()

Zeile 1327Zeile 1345
		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", unserialize($db->fetch_field($query, "cache")));

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

	}

function reload_internal_settings()

	}

function reload_internal_settings()

Zeile 1335Zeile 1353
		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", unserialize($db->fetch_field($query, "cache")));

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

	}

function reload_version_history()

	}

function reload_version_history()

Zeile 1343Zeile 1361
		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", unserialize($db->fetch_field($query, "cache")));

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

	}

function reload_modnotes()

	}

function reload_modnotes()

Zeile 1351Zeile 1369
		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", unserialize($db->fetch_field($query, "cache")));

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

	}

function reload_adminnotes()

	}

function reload_adminnotes()

Zeile 1359Zeile 1377
		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", unserialize($db->fetch_field($query, "cache")));

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

	}
}

	}
}