Difference between revisions of "RC-Summary.php"
(SWF compatible output working) |
(Use new xwRemoveElement() instead) |
||
Line 13: | Line 13: | ||
} | } | ||
if ( $_REQUEST['SWF'] ) { | if ( $_REQUEST['SWF'] ) { | ||
− | + | # Remove all view transforms and replace with this | |
− | # Remove all view transforms | + | xwRemoveElement( $properties, 'view' ); |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
xwSetProperty($properties, 'view', $tTitle); | xwSetProperty($properties, 'view', $tTitle); | ||
$$title = join( '&', $changes ); | $$title = join( '&', $changes ); |
Revision as of 00:06, 24 February 2006
<?
global $wgLang, $wgContLang, $$title;
if ( $event == 'data' ) {
# Appends article with a compact list of last 5 non-minor changes
$db =& wfGetDB( DB_MASTER );
$result = $db->query( "SELECT rc_id, rc_timestamp, rc_user_text, rc_namespace, rc_title, rc_comment FROM recentchanges WHERE rc_minor=0 ORDER BY rc_timestamp DESC LIMIT 5" );
$changes = array();
while ($row = mysql_fetch_assoc($result)) {
$t = $wgLang->time( $row['rc_timestamp'], true );
$n = $wgContLang->getNsText( $row['rc_namespace'] );
$a = $n ? "$n:".$row['rc_title'] : $row['rc_title'];
$changes[] = 'id'.$row['rc_id']."=$t,".$row['rc_user_text'].",$a,".$row['rc_comment'];
}
if ( $_REQUEST['SWF'] ) {
# Remove all view transforms and replace with this
xwRemoveElement( $properties, 'view' );
xwSetProperty($properties, 'view', $tTitle);
$$title = join( '&', $changes );
}
else $article = join( '
', $changes );
}
elseif ( $event == 'view' ) $article = $$title;
?>