Changeset - 15c7b09cd6b3
[Not reviewed]
0 1 0
Chel Sea (chain) - 5 years ago 2020-05-10 12:34:53
chain@rpgfiction.net
PHP 7 fixes
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
inc/plugins/inplayquotes.php
Show inline comments
 
@@ -428,54 +428,54 @@ function inplayquotes_misc()
 
		AND uid IN(SELECT uid FROM ".TABLE_PREFIX."users) 
 
		ORDER BY qid DESC");
 

	
 
		while($quote = $db->fetch_array($query)) {
 
			$date = date('F Y', $quote['timestamp']);
 
			$post = get_post($quote['pid']);
 
			$thread = get_thread($post['tid']);
 
			$user = get_user($quote['uid']);
 

	
 
			// let delete quotes
 
			if($mybb->usergroup['cancp'] == 1 OR $mybb->user['uid'] == $user['uid']) {
 
				eval("\$delete_quote = \"".$templates->get("misc_inplayquotes_overview_bit_delete")."\";");
 
			}
 

	
 
			$user['format_avatar'] = "<img src=\"$user[avatar]\" style=\"width: 50px;\" / >";
 
			$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
 
			$user['username'] = build_profile_link($user['username'], $user['uid']);
 
			$quote['thread'] = "<strong>{$lang->inplayquotes_in}:</strong> <a href=\"showthread.php?tid={$post[tid]}&pid={$quote[pid]}#pid{$quote[pid]}\">$thread[subject]</a>";
 
			if($date == $qdate OR empty($qdate)) {
 
				eval("\$inplayquotes_bit .= \"".$templates->get("misc_inplayquotes_overview_bit")."\";");
 
			}
 
		}		
 
		eval("\$inplayquotes = \"".$templates->get("misc_inplayquotes_overview")."\";");
 
		output_page($inplayquotes);
 
	}
 

	
 
	if($mybb->input['action'] == "deletequote") {
 
		$qid = (int)$mybb->get_input('qid');
 
		$uid = $db->fetch_field($db->query("SELECT uid FROM ".TABLE_PREFIX."inplayquotes WHERE qid = '$qid'"), "uid");
 
		if($mybb->usergroup['cancp'] == 1 OR $mybb->user['uid'] == $uid) {
 
			$db->delete_query("inplayquotes", "qid = '$qid'");
 
		}
 
		redirect("index.php", $lang->inplayquotes_deleted);
 
	}
 
}
 

	
 
function inplayquotes_index()
 
{
 
	global $lang, $db, $mybb, $templates, $inplayquotes, $quoted;
 
	$lang->load('inplayquotes');
 

	
 
	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."inplayquotes
 
	LEFT JOIN ".TABLE_PREFIX."posts on ".TABLE_PREFIX."inplayquotes.pid = ".TABLE_PREFIX."posts.pid
 
	WHERE ".TABLE_PREFIX."inplayquotes.uid IN(SELECT uid FROM ".TABLE_PREFIX."users) 	
 
	ORDER BY rand()
 
	LIMIT 1");
 
	$quoted = $db->fetch_array($query);
 
	$quoted['user'] = build_profile_link($quoted['username'], $quoted['uid']);
 
	$quoted['scene']= "<a href=\"showthread.php?tid={$quoted[tid]}&pid={$quoted[pid]}#pid{$quoted[pid]}\">$quoted[subject]</a>";
 
	$quoted['scene']= "<a href=\"showthread.php?tid={$quoted['tid']}&pid={$quoted['pid']}#pid{$quoted['pid']}\">{$quoted['subject']}</a>";
 
	if(!empty($quoted['quote'])) {
 
		eval("\$inplayquotes = \"".$templates->get("index_inplayquotes")."\";");
 
	}
 
}
 
?>
0 comments (0 inline, 0 general)