User:Fish1203/TransformChanges.php

";	return true; } function wfTransformChangesUL($match) {	global $wgTransformChangesRow;	$wgTransformChangesRow = 'odd';		## was originally $wgTransformChangesRow = 0	$rows = preg_replace_callback('|(.+?)|s','wfTransformChangesLI',$match[1]);	return $rows; } function wfTransformChangesLI($match) {	global $wgTransformChangesRow,$wgSimpleSecurity;	$wgTransformChangesRow = $wgTransformChangesRow == 'even' ? 'odd' : 'even';	list(,$date,$text) = $match;	$cols = array('time','title','user','talk','info','comment','diff');	$ncols = count($cols);	$row = '';	$error = ' Error: match failed! ';	if ($date) {		$row = " $date \n"; 		$wgTransformChangesRow = 'even';	}	$row .= "";	if (preg_match('|^(.*?); (\\d+:\\d+)(.+?)().+?(\\(.+?\\))|',$user,$m)) {			# Remove talk for email or IP users and make user lowercase			list(,$user,$talk) = $m;			if (ereg('@',$user) || !eregi('[a-z]',$user)) { $talk = ; $user = strtolower($user); }			}		if (preg_match('|\\((.+)\\)|',$comment,$m)) $comment = $m[1];		$allowed = true;		if (preg_match('|title="(.+?)"|',$title,$m) && is_object($wgSimpleSecurity)) {			# Only show row if ok by SimpleSecurity extension			$t = Title::newFromText($m[1]);			$allowed = $wgSimpleSecurity->validateTitle('view',$t);			}		if ($allowed) foreach ($cols as $col) $row .= "{$$col} ";		} else $row = $error;	$row .= " \n";	return $row; } ?>