Vergleich inc/class_datacache.php - 1.8.7 - 1.8.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 466Zeile 466

$types = array();



$types = array();


		$query = $db->simple_select("attachtypes", "*");

		$query = $db->simple_select('attachtypes', '*', 'enabled=1');

		while($type = $db->fetch_array($query))
{
$type['extension'] = my_strtolower($type['extension']);

		while($type = $db->fetch_array($query))
{
$type['extension'] = my_strtolower($type['extension']);

Zeile 787Zeile 787

$data = array(
'users' => $awaitingusers,


$data = array(
'users' => $awaitingusers,

			'time'	=> TIME_NOW 

			'time'	=> TIME_NOW

		);

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

		);

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

Zeile 895Zeile 895

$query = $db->simple_select("reportedcontent", "dateline", "reportstatus='0'", array('order_by' => 'dateline', 'order_dir' => 'DESC'));
$latest = $db->fetch_array($query);


$query = $db->simple_select("reportedcontent", "dateline", "reportstatus='0'", array('order_by' => 'dateline', 'order_dir' => 'DESC'));
$latest = $db->fetch_array($query);


$reasons = array();

if(!empty($mybb->settings['reportreasons']))
{
$options = $mybb->settings['reportreasons'];
$options = explode("\n", $options);

foreach($options as $option)
{
$option = explode("=", $option);
$reasons[$option[0]] = $option[1];
}
}

 

$reports = array(
"unread" => $num['unreadcount'],
"total" => $total['reportcount'],


$reports = array(
"unread" => $num['unreadcount'],
"total" => $total['reportcount'],

			"lastdateline" => $latest['dateline'],
"reasons" => $reasons

			"lastdateline" => $latest['dateline']


		);

		);





		$this->update("reportedcontent", $reports);

		$this->update("reportedcontent", $reports);

	}

/**

	}

/**

	 * Update mycode cache.
*
*/

	 * Update mycode cache.
*
*/

Zeile 945Zeile 930
	 * @param int $lock_time
*/
function update_mailqueue($last_run=0, $lock_time=0)

	 * @param int $lock_time
*/
function update_mailqueue($last_run=0, $lock_time=0)

	{

	{

		global $db;

$query = $db->simple_select("mailqueue", "COUNT(*) AS queue_size");

		global $db;

$query = $db->simple_select("mailqueue", "COUNT(*) AS queue_size");

Zeile 1029Zeile 1014
			$banned_ips[$banned_ip['fid']] = $banned_ip;
}
$this->update("bannedips", $banned_ips);

			$banned_ips[$banned_ip['fid']] = $banned_ip;
}
$this->update("bannedips", $banned_ips);

	}

	}


/**
* Updates the banned emails cache


/**
* Updates the banned emails cache

Zeile 1111Zeile 1096
	}

function update_birthdays()

	}

function update_birthdays()

	{
global $db;


	{
global $db;


		$birthdays = array();

// Get today, yesterday, and tomorrow's time (for different timezones)

		$birthdays = array();

// Get today, yesterday, and tomorrow's time (for different timezones)

Zeile 1124Zeile 1109

$query = $db->simple_select("users", "uid, username, usergroup, displaygroup, birthday, birthdayprivacy", "birthday LIKE '$bdaydate-%' OR birthday LIKE '$bdaydateyesterday-%' OR birthday LIKE '$bdaydatetomorrow-%'");
while($bday = $db->fetch_array($query))


$query = $db->simple_select("users", "uid, username, usergroup, displaygroup, birthday, birthdayprivacy", "birthday LIKE '$bdaydate-%' OR birthday LIKE '$bdaydateyesterday-%' OR birthday LIKE '$bdaydatetomorrow-%'");
while($bday = $db->fetch_array($query))

		{

		{

			// Pop off the year from the birthday because we don't need it.
$bday['bday'] = explode('-', $bday['birthday']);
array_pop($bday['bday']);
$bday['bday'] = implode('-', $bday['bday']);

			// Pop off the year from the birthday because we don't need it.
$bday['bday'] = explode('-', $bday['birthday']);
array_pop($bday['bday']);
$bday['bday'] = implode('-', $bday['bday']);





			if($bday['birthdayprivacy'] != 'all')
{
++$birthdays[$bday['bday']]['hiddencount'];

			if($bday['birthdayprivacy'] != 'all')
{
++$birthdays[$bday['bday']]['hiddencount'];

Zeile 1155Zeile 1140
		while($groupleader = $db->fetch_array($query))
{
$groupleaders[$groupleader['uid']][] = $groupleader;

		while($groupleader = $db->fetch_array($query))
{
$groupleaders[$groupleader['uid']][] = $groupleader;

		}

		}


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


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

Zeile 1165Zeile 1150
		global $db;

$prefixes = array();

		global $db;

$prefixes = array();

		$query = $db->simple_select("threadprefixes", "*", "", array('order_by' => 'prefix', 'order_dir' => 'ASC'));

		$query = $db->simple_select("threadprefixes", "*", "", array('order_by' => 'prefix', 'order_dir' => 'ASC'));


while($prefix = $db->fetch_array($query))
{
$prefixes[$prefix['pid']] = $prefix;


while($prefix = $db->fetch_array($query))
{
$prefixes[$prefix['pid']] = $prefix;

		}

		}


$this->update("threadprefixes", $prefixes);
}


$this->update("threadprefixes", $prefixes);
}

Zeile 1180Zeile 1165
		global $db;

$fd_statistics = array();

		global $db;

$fd_statistics = array();





		$time = TIME_NOW; // Look for announcements that don't end, or that are ending some time in the future
$query = $db->simple_select("announcements", "fid", "enddate = '0' OR enddate > '{$time}'", array("order_by" => "aid"));


		$time = TIME_NOW; // Look for announcements that don't end, or that are ending some time in the future
$query = $db->simple_select("announcements", "fid", "enddate = '0' OR enddate > '{$time}'", array("order_by" => "aid"));


Zeile 1196Zeile 1181
		}

// 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", '', array("order_by" => "tid"));


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


		if($db->num_rows($query))
{
unset($forum);

		if($db->num_rows($query))
{
unset($forum);

Zeile 1208Zeile 1193
				foreach($forums as $forum)
{
if(!$forum)

				foreach($forums as $forum)
{
if(!$forum)

					{

					{

						$forum = -1;
}


						$forum = -1;
}


Zeile 1216Zeile 1201
					{
$fd_statistics[$forum]['modtools'] = 1;
}

					{
$fd_statistics[$forum]['modtools'] = 1;
}

				}
}
}

				}
}
}


$this->update("forumsdisplay", $fd_statistics);


$this->update("forumsdisplay", $fd_statistics);

	}

/**

	}

/**

	 * Update profile fields cache.
*
*/
function update_profilefields()

	 * Update profile fields cache.
*
*/
function update_profilefields()

	{

	{

		global $db;

$fields = array();

		global $db;

$fields = array();

Zeile 1239Zeile 1224
		}

$this->update("profilefields", $fields);

		}

$this->update("profilefields", $fields);

 
	}

/**
* Update the report reasons cache.
*
*/
function update_reportreasons($no_plugins = false)
{
global $db;

$content_types = array('post', 'profile', 'reputation');
if(!$no_plugins)
{
global $plugins;
$content_types = $plugins->run_hooks("report_content_types", $content_types);
}

$reasons = array();

$query = $db->simple_select("reportreasons", "*", "", array('order_by' => 'disporder'));
while($reason = $db->fetch_array($query))
{
if($reason['appliesto'] == 'all')
{
foreach($content_types as $content)
{
$reasons[$content][] = array(
'rid' => $reason['rid'],
'title' => $reason['title'],
'extra' => $reason['extra'],
);
}
}
elseif($reason['appliesto'] != '')
{
$appliesto = explode(",", $reason['appliesto']);
foreach($appliesto as $content)
{
$reasons[$content][] = array(
'rid' => $reason['rid'],
'title' => $reason['title'],
'extra' => $reason['extra'],
);
}
}
}

$this->update("reportreasons", $reasons);

	}

/* Other, extra functions for reloading caches if we just changed to another cache extension (i.e. from db -> xcache) */

	}

/* Other, extra functions for reloading caches if we just changed to another cache extension (i.e. from db -> xcache) */