topic_id); $edit_history=$bbdb->get_results("SELECT * FROM bb_edit_history WHERE post_id = $post_id ORDER BY time DESC LIMIT 999"); bb_send_headers(); bb_get_header(); ?>
"; print_r($diff); echo "";}
foreach($diff as $k){
if (is_array($k)) {
$d=(!empty($k['d'])?implode(' ',$k['d']):'');
$i=(!empty($k['i'])?implode(' ',$k['i']):'');
if ($d && $i && str_replace("","",$d)==str_replace("","",$k['i'][0])) {$ret.=$k['i'][0]; unset($d); unset($k['i'][0]); $i=implode(' ',$k['i']);}
if ($d && $i && substr($d,-6)=="","
","",$d)." ":'').
(!empty($i)?"".str_replace("
",$i)." ":''); } else { $ret .= $k . ' ';} } return $ret; } function edit_history_create_table() { global $bbdb; $bbdb->query("CREATE TABLE IF NOT EXISTS `bb_edit_history` ( `time` int(10) UNSIGNED NOT NULL default '0', `post_id` int(10) UNSIGNED NOT NULL default '0', `user_id` int(10) UNSIGNED NOT NULL default '0', `user_ip` int(10) UNSIGNED NOT NULL default '0', `diff` text NOT NULL default '', INDEX (`post_id`) )"); } ?>