Vergleich warnings.php - 1.8.10 - 1.8.34

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 22Zeile 22
$parser = new postParser;

$lang->load("warnings");

$parser = new postParser;

$lang->load("warnings");

 
$lang->load("datahandler_warnings");


if($mybb->settings['enablewarningsystem'] == 0)
{


if($mybb->settings['enablewarningsystem'] == 0)
{

Zeile 115Zeile 116
			if($mybb->settings['allowanonwarningpms'] == 1 && $mybb->get_input('pm_anonymous', MyBB::INPUT_INT))
{
$sender_uid = -1;

			if($mybb->settings['allowanonwarningpms'] == 1 && $mybb->get_input('pm_anonymous', MyBB::INPUT_INT))
{
$sender_uid = -1;

 
				// Workaround for eliminating PHP warnings in PHP 8. Ref: https://github.com/mybb/mybb/issues/4630#issuecomment-1369144163
$pm['sender']['uid'] = -1;

			}

// Some kind of friendly error notification

			}

// Some kind of friendly error notification

Zeile 123Zeile 126
				$warningshandler->friendly_action .= $lang->redirect_warned_pmerror;
}
}

				$warningshandler->friendly_action .= $lang->redirect_warned_pmerror;
}
}

	



		$plugins->run_hooks("warnings_do_warn_end");

$lang->redirect_warned = $lang->sprintf($lang->redirect_warned, htmlspecialchars_uni($user['username']), $warningshandler->new_warning_level, $warningshandler->friendly_action);

		$plugins->run_hooks("warnings_do_warn_end");

$lang->redirect_warned = $lang->sprintf($lang->redirect_warned, htmlspecialchars_uni($user['username']), $warningshandler->new_warning_level, $warningshandler->friendly_action);

Zeile 208Zeile 211
		if(!$post || !$thread)
{
error($lang->warnings_error_invalid_post);

		if(!$post || !$thread)
{
error($lang->warnings_error_invalid_post);

		}


		}


		$forum_permissions = forum_permissions($thread['fid']);
if($forum_permissions['canview'] != 1)
{

		$forum_permissions = forum_permissions($thread['fid']);
if($forum_permissions['canview'] != 1)
{

Zeile 230Zeile 233
			WHERE w.pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'
ORDER BY w.expired ASC, w.dateline DESC
");

			WHERE w.pid='".$mybb->get_input('pid', MyBB::INPUT_INT)."'
ORDER BY w.expired ASC, w.dateline DESC
");

		$first = true;

		$last_expired = -1;

		$warnings = '';
while($warning = $db->fetch_array($query))
{

		$warnings = '';
while($warning = $db->fetch_array($query))
{

			if($warning['expired'] != $last_expired || $first)

			if($warning['expired'] != $last_expired)

			{
if($warning['expired'] == 0)
{

			{
if($warning['expired'] == 0)
{

Zeile 246Zeile 249
				}
}
$last_expired = $warning['expired'];

				}
}
$last_expired = $warning['expired'];

			$first = false;

 

$post_link = "";
$warning['username'] = htmlspecialchars_uni($warning['username']);


$post_link = "";
$warning['username'] = htmlspecialchars_uni($warning['username']);

Zeile 255Zeile 257
			if($warning['type_title'])
{
$warning_type = $warning['type_title'];

			if($warning['type_title'])
{
$warning_type = $warning['type_title'];

			}

			}

			else
{
$warning_type = $warning['title'];

			else
{
$warning_type = $warning['title'];

Zeile 274Zeile 276
				}
else
{

				}
else
{

					$expires = my_date($mybb->settings['dateformat'], $warning['expires']) . ", " . my_date($mybb->settings['timeformat'], $warning['expires']);

					$expires = nice_time($warning['expires']-TIME_NOW);

				}
}
else

				}
}
else

Zeile 299Zeile 301
	}

$plugins->run_hooks("warnings_warn_start");

	}

$plugins->run_hooks("warnings_warn_start");

	



	$type_checked = array('custom' => '');
$expires_period = array('hours' => '', 'days' => '', 'weeks' => '', 'months' => '', 'never' => '');
$send_pm_checked = '';

	$type_checked = array('custom' => '');
$expires_period = array('hours' => '', 'days' => '', 'weeks' => '', 'months' => '', 'never' => '');
$send_pm_checked = '';

Zeile 322Zeile 324
		$custom_reason = htmlspecialchars_uni($mybb->get_input('custom_reason'));
$custom_points = $mybb->get_input('custom_points', MyBB::INPUT_INT);
$expires = $mybb->get_input('expires', MyBB::INPUT_INT);

		$custom_reason = htmlspecialchars_uni($mybb->get_input('custom_reason'));
$custom_points = $mybb->get_input('custom_points', MyBB::INPUT_INT);
$expires = $mybb->get_input('expires', MyBB::INPUT_INT);

		if($mybb->get_input('expires_period', MyBB::INPUT_INT))

		if($mybb->get_input('expires_period'))

		{

		{

			$expires_period[$mybb->get_input('expires_period', MyBB::INPUT_INT)] = "selected=\"selected\"";

			$expires_period[$mybb->get_input('expires_period')] = "selected=\"selected\"";

		}
}
else

		}
}
else

Zeile 654Zeile 656
		}
else
{

		}
else
{

			$expires = my_date($mybb->settings['dateformat'], $warning['expires']) . ", " . my_date($mybb->settings['timeformat'], $warning['expires']);

			$expires = my_date('normal', $warning['expires']); // Purposely not using nice_time here as the moderator has clicked for more details so the actual day/time should be shown

		}
$status = $lang->warning_active;
}

		}
$status = $lang->warning_active;
}

Zeile 666Zeile 668
		}
else if($warning['expires'])
{

		}
else if($warning['expires'])
{

			$revoked_date = '('.my_date($mybb->settings['dateformat'], $warning['expires']).', '.my_date($mybb->settings['timeformat'], $warning['expires']).')';

			$revoked_date = '('.my_date('normal', $warning['expires']).')';

			$expires = $status = $lang->already_expired;
}
}

			$expires = $status = $lang->already_expired;
}
}

Zeile 840Zeile 842
			}
else
{

			}
else
{

				$expires = my_date($mybb->settings['dateformat'], $warning['expires']) . ", " . my_date($mybb->settings['timeformat'], $warning['expires']);

				$expires = nice_time($warning['expires']-TIME_NOW);

			}
}
else

			}
}
else