Vergleich inc/plugins/akismet.php - 1.4.1 - 1.4.4

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

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: akismet.php 3995 2008-07-07 09:32:32Z Tikitiki $

 * $Id: akismet.php 4279 2008-11-26 00:01:25Z Tikitiki $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 57Zeile 57
		"website"		=> "http://mybboard.net",
"author" => "MyBB Group",
"authorsite" => "http://mybboard.net",

		"website"		=> "http://mybboard.net",
"author" => "MyBB Group",
"authorsite" => "http://mybboard.net",

		"version"		=> "1.2",

		"version"		=> "1.2.1",

		"guid"			=> "e57a80dbe7ff85083596a1a3b7da3ce7",
"compatibility" => "14*",
);

		"guid"			=> "e57a80dbe7ff85083596a1a3b7da3ce7",
"compatibility" => "14*",
);

Zeile 307Zeile 307
		flash_message($message, 'success');
admin_redirect("index.php?module=config/settings&action=change&gid=".intval($mybb->akismet_insert_gid)."#row_setting_akismetapikey");
}

		flash_message($message, 'success');
admin_redirect("index.php?module=config/settings&action=change&gid=".intval($mybb->akismet_insert_gid)."#row_setting_akismetapikey");
}

 
}


function akismet_show_confirm_page()
{
global $mybb, $lang, $theme, $pid, $fid;

$pid = intval($pid);
$fid = intval($fid);

$query = $db->simple_select("posts", "subject", "pid='{$pid}'", 1);
$post = $db->fetch_array($query);

if(!$post)
{
error("Invalid Post ID.");
}

output_page("<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->mark_as_spam}</title>
{$headerinclude}
</head>
<body>
{$header}
<form action=\"moderation.php\" method=\"post\">
<input type=\"hidden\" name=\"my_post_key\" value=\"{$mybb->post_code}\" />
<table border=\"0\" cellspacing=\"{$theme['borderwidth']}\" cellpadding=\"{$theme['tablespace']}\" class=\"tborder\">
<tr>
<td class=\"thead\" colspan=\"2\"><strong>{$post['subject']} - {$lang->mark_as_spam}</strong></td>
</tr>
<tr>
<td class=\"trow1\" colspan=\"2\" align=\"center\">{$lang->confirm_mark_as_spam}</td>
</tr>
{$loginbox}
</table>
<br />
<div align=\"center\"><input type=\"submit\" class=\"button\" name=\"submit\" value=\"{$lang->mark_as_spam}\" /></div>
<input type=\"hidden\" name=\"action\" value=\"mark_as_spam\" />
<input type=\"hidden\" name=\"pid\" value=\"{$pid}\" />
<input type=\"hidden\" name=\"fid\" value=\"{$fid}\" />
</form>
{$footer}
</body>
</html>");

}

function akismet_moderation_start()

}

function akismet_moderation_start()

Zeile 314Zeile 359
	global $mybb, $db, $akismet, $lang, $cache;

if(!$mybb->settings['akismetswitch'] || $mybb->input['action'] != 'mark_as_spam')

	global $mybb, $db, $akismet, $lang, $cache;

if(!$mybb->settings['akismetswitch'] || $mybb->input['action'] != 'mark_as_spam')

	{

	{

		return;

		return;

	}

$lang->load("akismet", false, true);


	}

$lang->load("akismet", false, true);


	if(!$mybb->input['pid'])
{
error("No Post ID specified.");

	if(!$mybb->input['pid'])
{
error("No Post ID specified.");

	}

$pid = intval($mybb->input['pid']);

	}

$pid = intval($mybb->input['pid']);

	
if(!$mybb->input['fid'])
{
error("No Forum ID specified.");

	
if(!$mybb->input['fid'])
{
error("No Forum ID specified.");

	}


	}


	$fid = intval($mybb->input['fid']);

if(!is_moderator($fid))

	$fid = intval($mybb->input['fid']);

if(!is_moderator($fid))

	{

	{

		error("No Permissions to do this action.");
}


		error("No Permissions to do this action.");
}


Zeile 346Zeile 391
		WHERE p.pid = '{$pid}'
");
$post = $db->fetch_array($query);

		WHERE p.pid = '{$pid}'
");
$post = $db->fetch_array($query);

	

	

	if(!$post)

	if(!$post)

	{

	{

		error("Invalid Post ID.");
}

		error("Invalid Post ID.");
}

		








	
if(!$mybb->input['my_post_key'] || $mybb->request_method != "post")
{
akismet_show_confirm_page();
}

verify_post_check($mybb->input['my_post_key']);


	$akismet_array = array(
'type' => 'post',
'username' => $post['username'],

	$akismet_array = array(
'type' => 'post',
'username' => $post['username'],

Zeile 685Zeile 737
	
$page->add_breadcrumb_item($lang->akismet);


	
$page->add_breadcrumb_item($lang->akismet);


	if($mybb->input['delete_all'])

	if($mybb->input['delete_all'] && $mybb->request_method == "post")

	{	
// User clicked no
if($mybb->input['no'])

	{	
// User clicked no
if($mybb->input['no'])

Zeile 710Zeile 762
		}
}


		}
}


	if($mybb->input['unmark'])

	if($mybb->input['unmark'] && $mybb->request_method == "post")

	{
$unmark = $mybb->input['akismet'];


	{
$unmark = $mybb->input['akismet'];


Zeile 721Zeile 773
		}

$posts_in = '';

		}

$posts_in = '';

 
		$comma = '';

		foreach($unmark as $key => $val)
{

		foreach($unmark as $key => $val)
{

			$posts_in .= $comma.$key;

			$posts_in .= $comma.intval($key);

			$comma = ',';
}

			$comma = ',';
}

		$comma = '';

 
	
$query = $db->simple_select("posts", "pid, tid", "pid IN ({$posts_in}) AND replyto = '0'");
while($post = $db->fetch_array($query))

	
$query = $db->simple_select("posts", "pid, tid", "pid IN ({$posts_in}) AND replyto = '0'");
while($post = $db->fetch_array($query))

Zeile 880Zeile 932
		admin_redirect("index.php?module=forum/akismet");
}


		admin_redirect("index.php?module=forum/akismet");
}


	if($mybb->input['delete'])

	if($mybb->input['delete'] && $mybb->request_method == "post")

	{
$deletepost = $mybb->input['akismet'];


	{
$deletepost = $mybb->input['akismet'];


Zeile 891Zeile 943
		}

$posts_in = '';

		}

$posts_in = '';

 
		$comma = '';

		foreach($deletepost as $key => $val)
{

		foreach($deletepost as $key => $val)
{

			$posts_in .= $comma.$key;

			$posts_in .= $comma.intval($key);

			$comma = ',';
}


			$comma = ',';
}