Vergleich warnings.php - 1.6.4 - 1.6.8

  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: warnings.php 5392 2011-03-18 09:39:59Z Tomm $

 * $Id: warnings.php 5814 2012-04-20 14:36:07Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 180Zeile 180
	}

// Are we notifying the user?

	}

// Are we notifying the user?

	if(!$warn_errors && $mybb->input['send_pm'] == 1 && $group_permissions['canusepms']  != 0 && $user['receivepms'] != 0 && $mybb->settings['enablepms'] != 0)

	if(!$warn_errors && $mybb->input['send_pm'] == 1 && $group_permissions['canusepms'] != 0 && $mybb->settings['enablepms'] != 0)

	{
// Bring up the PM handler
require_once MYBB_ROOT."inc/datahandlers/pm.php";

	{
// Bring up the PM handler
require_once MYBB_ROOT."inc/datahandlers/pm.php";

Zeile 201Zeile 201
		);

$pmhandler->set_data($pm);

		);

$pmhandler->set_data($pm);

 
		$pmhandler->admin_override = true;


// Now let the pm handler do all the hard work.
if(!$pmhandler->validate_pm())


// Now let the pm handler do all the hard work.
if(!$pmhandler->validate_pm())

Zeile 258Zeile 259

if($new_level['lid'])
{


if($new_level['lid'])
{

 
			$expiration = 0;

			$action = unserialize($new_level['action']);

			$action = unserialize($new_level['action']);

 


			switch($action['type'])
{
// Ban the user for a specified time
case 1:

			switch($action['type'])
{
// Ban the user for a specified time
case 1:

					if($action['length'] != 0)

					if($action['length'] > 0)

					{
$expiration = TIME_NOW+$action['length'];
}

					{
$expiration = TIME_NOW+$action['length'];
}

Zeile 280Zeile 283
						}

// Never lift the ban?

						}

// Never lift the ban?

						if($action['length'] == 0)

						if($action['length'] <= 0)

						{
$bantime = '---';
}

						{
$bantime = '---';
}

Zeile 290Zeile 293
							foreach($bantimes as $date => $string)
{
if($date == '---')

							foreach($bantimes as $date => $string)
{
if($date == '---')

								{

								{

									continue;

									continue;

								}

								}

								
$time = 0;
list($day, $month, $year) = explode('-', $date);
if($day > 0)

								
$time = 0;
list($day, $month, $year) = explode('-', $date);
if($day > 0)

								{

								{

									$time += 60*60*24*$day;
}

if($month > 0)
{
$time += 60*60*24*30*$month;

									$time += 60*60*24*$day;
}

if($month > 0)
{
$time += 60*60*24*30*$month;

								}

								}

								
if($year > 0)
{

								
if($year > 0)
{

Zeile 340Zeile 343
							$new_ban['oldadditionalgroups'] = $db->escape_string($existing_ban['oldadditionalgroups']);
$new_ban['olddisplaygroup'] = $db->escape_string($existing_ban['olddisplaygroup']);
}

							$new_ban['oldadditionalgroups'] = $db->escape_string($existing_ban['oldadditionalgroups']);
$new_ban['olddisplaygroup'] = $db->escape_string($existing_ban['olddisplaygroup']);
}

						
$db->insert_query("banned", $new_ban);
$updated_user['usergroup'] = $action['usergroup'];
$updated_user['additionalgroups'] = $updated_user['displaygroup'] = "";


$period = $lang->expiration_never;



						$ban_length = fetch_friendly_expiration($action['length']);

						$ban_length = fetch_friendly_expiration($action['length']);

						$lang_str = "expiration_".$ban_length['period'];








if($ban_length['time'])
{
$lang_str = "expiration_".$ban_length['period'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);
}


						$group_name = $groupscache[$action['usergroup']]['title'];

						$group_name = $groupscache[$action['usergroup']]['title'];

						$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);

 
						$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_banned, $group_name, $period);

						$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_banned, $group_name, $period);

					}
break;






$db->insert_query("banned", $new_ban);
$updated_user['usergroup'] = $action['usergroup'];
$updated_user['additionalgroups'] = $updated_user['displaygroup'] = "";
}
break;

				// Suspend posting privileges
case 2:

				// Suspend posting privileges
case 2:

					if($action['length'] != 0)

					if($action['length'] > 0)

					{
$expiration = TIME_NOW+$action['length'];
}

					{
$expiration = TIME_NOW+$action['length'];
}

Zeile 362Zeile 372
					{
if(($user['suspensiontime'] != 0 && $user['suspendposting']) || !$user['suspendposting'])
{

					{
if(($user['suspensiontime'] != 0 && $user['suspendposting']) || !$user['suspendposting'])
{

 
							$period = $lang->expiration_never;
$ban_length = fetch_friendly_expiration($action['length']);

if($ban_length['time'])
{
$lang_str = "expiration_".$ban_length['period'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);
}

$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_suspended, $period);


							$updated_user['suspensiontime'] = $expiration;
$updated_user['suspendposting'] = 1;

							$updated_user['suspensiontime'] = $expiration;
$updated_user['suspendposting'] = 1;

							$period = fetch_friendly_expiration($action['length']);
$lang_str = "expiration_".$period['period'];
$period = $lang->sprintf($lang->result_period, $period['time'], $lang->$lang_str);
$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_suspended, $period);

 
						}

						}

					}

					}

					break;
// Moderate new posts
case 3:

					break;
// Moderate new posts
case 3:

					if($action['length'] != 0)
{

					if($action['length'] > 0)
{

						$expiration = TIME_NOW+$action['length'];
}
// Only perform if the expiration time is greater than the users current suspension period

						$expiration = TIME_NOW+$action['length'];
}
// Only perform if the expiration time is greater than the users current suspension period

Zeile 382Zeile 399
					{
if(($user['moderationtime'] != 0 && $user['moderateposts']) || !$user['suspendposting'])
{

					{
if(($user['moderationtime'] != 0 && $user['moderateposts']) || !$user['suspendposting'])
{

 
							$period = $lang->expiration_never;
$ban_length = fetch_friendly_expiration($action['length']);

if($ban_length['time'])
{
$lang_str = "expiration_".$ban_length['period'];
$period = $lang->sprintf($lang->result_period, $ban_length['time'], $lang->$lang_str);
}

$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_moderate, $period);


							$updated_user['moderationtime'] = $expiration;
$updated_user['moderateposts'] = 1;

							$updated_user['moderationtime'] = $expiration;
$updated_user['moderateposts'] = 1;

							$period = fetch_friendly_expiration($action['length']);
$lang_str = "expiration_".$period['period'];
$period = $lang->sprintf($lang->result_period, $period['time'], $lang->$lang_str);
$friendly_action = "<br /><br />".$lang->sprintf($lang->redirect_warned_moderate, $period);

 
						}
}
break;

						}
}
break;

Zeile 511Zeile 535
			$first = false;

$post_link = "";

			$first = false;

$post_link = "";

			$issuedby = build_profile_link($warning['username'], $warning['uid']);

			$issuedby = build_profile_link($warning['username'], $warning['issuedby']);

			$date_issued = my_date($mybb->settings['dateformat'], $warning['dateline']).", ".my_date($mybb->settings['timeformat'], $warning['dateline']);
if($warning['type_title'])
{

			$date_issued = my_date($mybb->settings['dateformat'], $warning['dateline']).", ".my_date($mybb->settings['timeformat'], $warning['dateline']);
if($warning['type_title'])
{