Difference between revisions of "RC-Summary.php"
From Organic Design wiki
(Begin last-5-changes transform) |
(doh - forgot php tags!) |
||
Line 1: | Line 1: | ||
+ | <? | ||
# Appends article with a compact list of last 5 non-minor changes | # Appends article with a compact list of last 5 non-minor changes | ||
$db =& wfGetDB( DB_MASTER ); | $db =& wfGetDB( DB_MASTER ); | ||
Line 8: | Line 9: | ||
} | } | ||
$article = "\n;Last 5 changes\n$msg"; | $article = "\n;Last 5 changes\n$msg"; | ||
+ | ?> |
Revision as of 01:13, 23 February 2006
<?
- Appends article with a compact list of last 5 non-minor changes
$db =& wfGetDB( DB_MASTER ); $result = $db->query( "SELECT * FROM recentchanges WHERE rc_minor=0 ORDER BY rc_timestamp DESC LIMIT 5" ); while ($row = mysql_fetch_assoc($result)) { $msg = ; foreach ($row as $k => $v) $msg .= "$k = $v, "; $msg .= "\n"; } $article = "\n;Last 5 changes\n$msg"; ?>