http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88361
Revision: 88361
Author: jeroendedauw
Date: 2011-05-17 23:50:44 +0000 (Tue, 17 May 2011)
Log Message:
-----------
follow up to r88360
Modified Paths:
--------------
trunk/extensions/SemanticWatchlist/includes/SWL_ChangeSet.php
trunk/extensions/SemanticWatchlist/specials/SpecialSemanticWatchlist.php
Modified: trunk/extensions/SemanticWatchlist/includes/SWL_ChangeSet.php
===================================================================
--- trunk/extensions/SemanticWatchlist/includes/SWL_ChangeSet.php
2011-05-17 23:09:57 UTC (rev 88360)
+++ trunk/extensions/SemanticWatchlist/includes/SWL_ChangeSet.php
2011-05-17 23:50:44 UTC (rev 88361)
@@ -84,7 +84,7 @@
$changeSet = new SWLChangeSet(
$changeSet,
- User::newFromName( $set->set_user_name ),
+ User::newFromName( $set->set_user_name, false ),
$set->set_time,
$set->set_id
);
@@ -124,7 +124,7 @@
$changeSet = new SWLChangeSet(
$changeSet,
- User::newFromName( $changeSetArray['user_name'] ),
+ User::newFromName( $changeSetArray['user_name'], false
),
$changeSetArray['time'],
$changeSetArray['id']
);
Modified:
trunk/extensions/SemanticWatchlist/specials/SpecialSemanticWatchlist.php
===================================================================
--- trunk/extensions/SemanticWatchlist/specials/SpecialSemanticWatchlist.php
2011-05-17 23:09:57 UTC (rev 88360)
+++ trunk/extensions/SemanticWatchlist/specials/SpecialSemanticWatchlist.php
2011-05-17 23:50:44 UTC (rev 88361)
@@ -65,6 +65,11 @@
$this->displayWatchlist();
}
+ /**
+ * Displays the watchlist.
+ *
+ * @since 0.1
+ */
protected function displayWatchlist() {
global $wgOut, $wgLang;
@@ -82,11 +87,11 @@
krsort( $changeSetsHTML );
- foreach ( $changeSetsHTML as $daySets ) {
+ foreach ( $changeSetsHTML as $dayKey => $daySets ) {
$wgOut->addHTML( HTML::element(
'h4',
array(),
- $wgLang->date( str_pad( $set->getTime(), 14,
'0' ) )
+ $wgLang->date( str_pad( $dayKey, 14, '0' ) )
) );
$wgOut->addHTML( '<ul>' );
@@ -105,6 +110,8 @@
* Gets a list of change sets belonging to any of the watchlist groups
* watched by the user, newest first.
*
+ * @since 0.1
+ *
* @return array of SWLChangeSet
*/
protected function getChangeSets() {
@@ -128,6 +135,15 @@
return $changeSets;
}
+ /**
+ * Gets the HTML for a single change set (edit).
+ *
+ * @since 0.1
+ *
+ * @param SWLChangeSet $changeSet
+ *
+ * @return string
+ */
protected function getChangeSetHTML( SWLChangeSet $changeSet ) {
global $wgLang;
@@ -147,7 +163,29 @@
'a',
array( 'href' =>
$changeSet->getTitle()->getLocalURL( 'action=history' ) ),
wfMsg( 'hist' )
- ) . ')' .
+ ) . ') . . ' .
+ HTML::element(
+ 'a',
+ array( 'href' =>
$changeSet->getUser()->getUserPage()->getLocalURL() ),
+ $changeSet->getUser()->getName()
+ ) . ' (' .
+ HTML::element(
+ 'a',
+ array( 'href' =>
$changeSet->getUser()->getTalkPage()->getLocalURL() ),
+ wfMsg( 'talkpagelinktext' )
+ ) . ' | ' .
+ ( $changeSet->getUser()->isAnon() ? '' :
+ HTML::element(
+ 'a',
+ array( 'href' =>
SpecialPage::getTitleFor( 'Contributions', $changeSet->getUser()->getName()
)->getLocalURL() ),
+ wfMsg( 'contribslink' )
+ ) . ' | '
+ ) .
+ HTML::element(
+ 'a',
+ array( 'href' =>
SpecialPage::getTitleFor( 'Block', $changeSet->getUser()->getName()
)->getLocalURL() ),
+ wfMsg( 'blocklink' )
+ ) . ')' .
'</p>'
;
@@ -164,6 +202,14 @@
return $html;
}
+ /**
+ * Returns the HTML for the changes to a single propety.
+ *
+ * @param SMWDIProperty $property
+ * @param array of SMWPropertyChange $changes
+ *
+ * @return string
+ */
protected function getPropertyHTML( SMWDIProperty $property, array
$changes ) {
$html = '';
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs