Vergleich admin/modules/forum/attachments.php - 1.8.10 - 1.8.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 223Zeile 223
if($mybb->input['action'] == "delete_orphans" && $mybb->request_method == "post")
{
$plugins->run_hooks("admin_forum_attachments_delete_orphans");

if($mybb->input['action'] == "delete_orphans" && $mybb->request_method == "post")
{
$plugins->run_hooks("admin_forum_attachments_delete_orphans");

 

$success_count = $error_count = 0;


// Deleting specific attachments from uploads directory
if(is_array($mybb->input['orphaned_files']))


// Deleting specific attachments from uploads directory
if(is_array($mybb->input['orphaned_files']))

Zeile 240Zeile 242
		foreach($mybb->input['orphaned_files'] as $file)
{
if(!@unlink(MYBB_ROOT.$mybb->settings['uploadspath']."/".$file))

		foreach($mybb->input['orphaned_files'] as $file)
{
if(!@unlink(MYBB_ROOT.$mybb->settings['uploadspath']."/".$file))

			{
$error = true;
}
}





			{
$error_count++;
}
else
{
$success_count++;
}
}

	}

// Deleting physical attachments which exist in database

	}

// Deleting physical attachments which exist in database

Zeile 263Zeile 269
			{
remove_attachment($attachment['pid'], null, $attachment['aid']);
}

			{
remove_attachment($attachment['pid'], null, $attachment['aid']);
}

		}
}

$plugins->run_hooks("admin_forum_attachments_delete_orphans_commit");



			$success_count++;
}
}

$plugins->run_hooks("admin_forum_attachments_delete_orphans_commit");


	// Log admin action
log_admin_action();


	// Log admin action
log_admin_action();


	if($error == true)









	$message = '';
$status = 'success';
if($error_count > 0)
{
$status = 'error';
$message = $lang->sprintf($lang->error_count, $error_count);
}

if($success_count > 0)

	{

	{

		flash_message($lang->error_not_all_removed, 'error');
}
else
{
flash_message($lang->success_orphan_deleted, 'success');




		if($error_count > 0)
{
$message .= '<br />'.$lang->sprintf($lang->success_count, $success_count);
}
else
{
$message = $lang->success_orphan_deleted;
}

	}

	}

	admin_redirect("index.php?module=forum-attachments");


	flash_message($message, $status);
admin_redirect('index.php?module=forum-attachments');

}

if($mybb->input['action'] == "orphans")

}

if($mybb->input['action'] == "orphans")