delete last post
Xander Offline
Junior Member
**
Posts: 6
Joined: Aug 2013
Post: #1
delete last post
why this function not delete last post ?

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function plugin_deletelastpost($tids)
{
	global $moderation;

	$query = $db->query("
			SELECT pid
			FROM ".TABLE_PREFIX."posts
			WHERE tid=".$thread['tid']."
			ORDER BY dataline
			DESC LIMIT 1";
			
		");
	$post = $db->fetch_array($query);

	$tid = (int)$mybb->input['tid'];
	$thread = get_thread($tid);
	$fid = $thread['fid'];

			if (empty($moderation))
			{
				require_once MYBB_ROOT."inc/class_moderation.php";
				$moderation = new Moderation;
			}
				$moderation->delete_post($post); 
}

(This post was last modified: 08-20-2013 06:16 PM by Xander.)
08-19-2013 04:22 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
delete last post - Xander - 08-19-2013 04:22 AM
RE: delete last post - ZiNgA BuRgA - 08-19-2013, 10:22 AM
RE: delete last post - Seabody - 08-19-2013, 05:08 PM
RE: delete last post - Xander - 08-20-2013, 02:12 AM
RE: delete last post - Xander - 08-22-2013, 02:25 AM

 Standard Tools
Forum Jump: