Vergleich inc/tasks/promotions.php - 1.6.3 - 1.6.6

  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: promotions.php 5380 2011-02-21 12:04:43Z Tomm $

 * $Id: promotions.php 5369 2011-02-17 10:55:29Z MattR $

 */

function task_promotions($task)
{
global $mybb, $db, $lang, $cache;


 */

function task_promotions($task)
{
global $mybb, $db, $lang, $cache;


 
	$usergroups = $cache->read("usergroups");

	// Iterate through all our promotions
$query = $db->simple_select("promotions", "*", "enabled = '1'");
while($promotion = $db->fetch_array($query))
{

	// Iterate through all our promotions
$query = $db->simple_select("promotions", "*", "enabled = '1'");
while($promotion = $db->fetch_array($query))
{

 
		// Does the destination usergroup even exist?? If it doesn't and it moves a user to it, the user will get PHP errors.
if(!array_key_exists($promotion['newusergroup'], $usergroups))
{
// Instead of just skipping this promotion, disable it to stop it even being selected when this task is run.
$update = array(
"enabled" => 0
);
$db->update_query("promotions", $update, "pid = '" . intval($promotion['pid']) . "'");
continue;
}


		$and = "";
$sql_where = "";


		$and = "";
$sql_where = "";