Index: trunk/extensions/SemanticWatchlist/specials/SpecialSemanticWatchlist.php |
— | — | @@ -65,6 +65,11 @@ |
66 | 66 | $this->displayWatchlist(); |
67 | 67 | } |
68 | 68 | |
| 69 | + /** |
| 70 | + * Displays the watchlist. |
| 71 | + * |
| 72 | + * @since 0.1 |
| 73 | + */ |
69 | 74 | protected function displayWatchlist() { |
70 | 75 | global $wgOut, $wgLang; |
71 | 76 | |
— | — | @@ -82,11 +87,11 @@ |
83 | 88 | |
84 | 89 | krsort( $changeSetsHTML ); |
85 | 90 | |
86 | | - foreach ( $changeSetsHTML as $daySets ) { |
| 91 | + foreach ( $changeSetsHTML as $dayKey => $daySets ) { |
87 | 92 | $wgOut->addHTML( HTML::element( |
88 | 93 | 'h4', |
89 | 94 | array(), |
90 | | - $wgLang->date( str_pad( $set->getTime(), 14, '0' ) ) |
| 95 | + $wgLang->date( str_pad( $dayKey, 14, '0' ) ) |
91 | 96 | ) ); |
92 | 97 | |
93 | 98 | $wgOut->addHTML( '<ul>' ); |
— | — | @@ -105,6 +110,8 @@ |
106 | 111 | * Gets a list of change sets belonging to any of the watchlist groups |
107 | 112 | * watched by the user, newest first. |
108 | 113 | * |
| 114 | + * @since 0.1 |
| 115 | + * |
109 | 116 | * @return array of SWLChangeSet |
110 | 117 | */ |
111 | 118 | protected function getChangeSets() { |
— | — | @@ -128,6 +135,15 @@ |
129 | 136 | return $changeSets; |
130 | 137 | } |
131 | 138 | |
| 139 | + /** |
| 140 | + * Gets the HTML for a single change set (edit). |
| 141 | + * |
| 142 | + * @since 0.1 |
| 143 | + * |
| 144 | + * @param SWLChangeSet $changeSet |
| 145 | + * |
| 146 | + * @return string |
| 147 | + */ |
132 | 148 | protected function getChangeSetHTML( SWLChangeSet $changeSet ) { |
133 | 149 | global $wgLang; |
134 | 150 | |
— | — | @@ -147,7 +163,29 @@ |
148 | 164 | 'a', |
149 | 165 | array( 'href' => $changeSet->getTitle()->getLocalURL( 'action=history' ) ), |
150 | 166 | wfMsg( 'hist' ) |
151 | | - ) . ')' . |
| 167 | + ) . ') . . ' . |
| 168 | + HTML::element( |
| 169 | + 'a', |
| 170 | + array( 'href' => $changeSet->getUser()->getUserPage()->getLocalURL() ), |
| 171 | + $changeSet->getUser()->getName() |
| 172 | + ) . ' (' . |
| 173 | + HTML::element( |
| 174 | + 'a', |
| 175 | + array( 'href' => $changeSet->getUser()->getTalkPage()->getLocalURL() ), |
| 176 | + wfMsg( 'talkpagelinktext' ) |
| 177 | + ) . ' | ' . |
| 178 | + ( $changeSet->getUser()->isAnon() ? '' : |
| 179 | + HTML::element( |
| 180 | + 'a', |
| 181 | + array( 'href' => SpecialPage::getTitleFor( 'Contributions', $changeSet->getUser()->getName() )->getLocalURL() ), |
| 182 | + wfMsg( 'contribslink' ) |
| 183 | + ) . ' | ' |
| 184 | + ) . |
| 185 | + HTML::element( |
| 186 | + 'a', |
| 187 | + array( 'href' => SpecialPage::getTitleFor( 'Block', $changeSet->getUser()->getName() )->getLocalURL() ), |
| 188 | + wfMsg( 'blocklink' ) |
| 189 | + ) . ')' . |
152 | 190 | '</p>' |
153 | 191 | ; |
154 | 192 | |
— | — | @@ -164,6 +202,14 @@ |
165 | 203 | return $html; |
166 | 204 | } |
167 | 205 | |
| 206 | + /** |
| 207 | + * Returns the HTML for the changes to a single propety. |
| 208 | + * |
| 209 | + * @param SMWDIProperty $property |
| 210 | + * @param array of SMWPropertyChange $changes |
| 211 | + * |
| 212 | + * @return string |
| 213 | + */ |
168 | 214 | protected function getPropertyHTML( SMWDIProperty $property, array $changes ) { |
169 | 215 | $html = ''; |
170 | 216 | |
Index: trunk/extensions/SemanticWatchlist/includes/SWL_ChangeSet.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | |
86 | 86 | $changeSet = new SWLChangeSet( |
87 | 87 | $changeSet, |
88 | | - User::newFromName( $set->set_user_name ), |
| 88 | + User::newFromName( $set->set_user_name, false ), |
89 | 89 | $set->set_time, |
90 | 90 | $set->set_id |
91 | 91 | ); |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | |
126 | 126 | $changeSet = new SWLChangeSet( |
127 | 127 | $changeSet, |
128 | | - User::newFromName( $changeSetArray['user_name'] ), |
| 128 | + User::newFromName( $changeSetArray['user_name'], false ), |
129 | 129 | $changeSetArray['time'], |
130 | 130 | $changeSetArray['id'] |
131 | 131 | ); |