Vergleich inc/class_datacache.php - 1.2.7 - 1.2.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

 * $Id: class_datacache.php 3006 2007-04-11 06:14:56Z Tikitiki $

 * $Id: class_datacache.php 3306 2007-09-13 05:29:43Z Tikitiki $

 */

class datacache

 */

class datacache

Zeile 59Zeile 59
		global $db, $mybb;
if($mybb->config['cache_store'] == "files")
{

		global $db, $mybb;
if($mybb->config['cache_store'] == "files")
{

			if($hard)

			if(!isset($this->cache[$name]) || $hard)

			{
@include(MYBB_ROOT."inc/cache/".$name.".php");

			{
@include(MYBB_ROOT."inc/cache/".$name.".php");

			}
else
{
@include_once(MYBB_ROOT."inc/cache/".$name.".php");
}
$this->cache[$name] = $$name;
unset($$name);
}

				$this->cache[$name] = $$name;
}
}






		else
{
if($hard)

		else
{
if($hard)

Zeile 79Zeile 74
				$this->cache[$data['title']] = unserialize($data['cache']);
}
}

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

 
		

		if(isset($this->cache[$name]))
{
return $this->cache[$name];

		if(isset($this->cache[$name]))
{
return $this->cache[$name];

Zeile 192Zeile 188
			$badwords[$badword['bid']] = $badword;
}
$this->update("badwords", $badwords);

			$badwords[$badword['bid']] = $badword;
}
$this->update("badwords", $badwords);

	}


	}


	/**
* Update the usergroups cache.

	/**
* Update the usergroups cache.

	 *

	 *

	 */
function updateusergroups()
{
global $db;

	 */
function updateusergroups()
{
global $db;

		$query = $db->simple_select(TABLE_PREFIX."usergroups");

		$query = $db->simple_select(TABLE_PREFIX."usergroups");

		while($g = $db->fetch_array($query))
{
$gs[$g['gid']] = $g;

		while($g = $db->fetch_array($query))
{
$gs[$g['gid']] = $g;

Zeile 231Zeile 227
				}
}
$usergroupcache[$gid] = $usergroup;

				}
}
$usergroupcache[$gid] = $usergroup;

		}

// Get our forum list
cache_forums(true);
$fcache = array();

		}

// Get our forum list
cache_forums(true);
$fcache = array();

		if(!is_array($forum_cache))
{
return false;

		if(!is_array($forum_cache))
{
return false;

Zeile 246Zeile 242
			$fcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
}
foreach($fcache as $pid => $value)

			$fcache[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;
}
foreach($fcache as $pid => $value)

		{

		{

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

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

Zeile 278Zeile 274
				{
$perms = $permissions;
foreach($usergroupcache as $gid => $usergroup)

				{
$perms = $permissions;
foreach($usergroupcache as $gid => $usergroup)

					{

					{

						if($fperms[$forum['fid']][$gid])
{
$perms[$gid] = $fperms[$forum['fid']][$gid];

						if($fperms[$forum['fid']][$gid])
{
$perms[$gid] = $fperms[$forum['fid']][$gid];

Zeile 364Zeile 360
					if($moderators)
{
$forum_mods = $moderators;

					if($moderators)
{
$forum_mods = $moderators;

					}

					}

					// Append - local settings override that of a parent - array_merge works here
if($this->moderators[$forum['fid']])
{
if(is_array($forum_mods))

					// Append - local settings override that of a parent - array_merge works here
if($this->moderators[$forum['fid']])
{
if(is_array($forum_mods))

						{

						{

							$forum_mods = array_merge($forum_mods, $this->moderators[$forum['fid']]);
}
else

							$forum_mods = array_merge($forum_mods, $this->moderators[$forum['fid']]);
}
else

Zeile 379Zeile 375
					}
$this->built_moderators[$forum['fid']] = $forum_mods;
$this->build_moderators($forum_mods, $forum['fid']);

					}
$this->built_moderators[$forum['fid']] = $forum_mods;
$this->build_moderators($forum_mods, $forum['fid']);

				}

				}

			}
}
}

			}
}
}

Zeile 402Zeile 398
				{
unset($forum[$key]);
}

				{
unset($forum[$key]);
}

				$forums[$forum['fid']] = $forum;

 
			}

			}

 
			$forums[$forum['fid']] = $forum;

		}
$this->update("forums", $forums);
}

		}
$this->update("forums", $forums);
}

 
	


/**
* Update usertitles cache.


/**
* Update usertitles cache.