Index: trunk/extensions/CategoryWatch/CategoryWatch.i18n.php |
— | — | @@ -13,10 +13,10 @@ |
14 | 14 | $messages['en'] = array( |
15 | 15 | 'categorywatch-desc' => 'Extends watchlist functionality to include notification about membership changes of watched categories', |
16 | 16 | 'categorywatch-emailsubject' => "Activity involving watched category \"$1\"", |
17 | | - 'categorywatch-catmovein' => "[[$1]] has moved into [[:Category:$2]] from [[:Category:$3]]", |
18 | | - 'categorywatch-catmoveout' => "[[$1]] has moved out of [[:Category:$2]] into [[:Category:$3]]", |
19 | | - 'categorywatch-catadd' => "[[$1]] has been added to [[:Category:$2]]", |
20 | | - 'categorywatch-catsub' => "[[$1]] has been removed from [[:Category:$2]]", |
| 17 | + 'categorywatch-catmovein' => "$1 has moved into $2 from $3", |
| 18 | + 'categorywatch-catmoveout' => "$1 has moved out of $2 into $3", |
| 19 | + 'categorywatch-catadd' => "$1 has been added to $2", |
| 20 | + 'categorywatch-catsub' => "$1 has been removed from $2", |
21 | 21 | 'categorywatch-autocat' => "Automatically watched by $1", |
22 | 22 | ); |
23 | 23 | |
Index: trunk/extensions/CategoryWatch/CategoryWatch.php |
— | — | @@ -140,16 +140,18 @@ |
141 | 141 | $res = $dbr->select( 'watchlist', array( 'wl_user' ), $conds, __METHOD__ ); |
142 | 142 | |
143 | 143 | # Wrap message with common body and send to each watcher |
144 | | - $page = $title->getText(); |
145 | | - $adminAddress = new MailAddress( $wgPasswordSender, 'WikiAdmin' ); |
146 | | - $editorAddress = new MailAddress( $editor ); |
| 144 | + $page = $title->getPrefixedText(); |
| 145 | + $adminAddress = new MailAddress( $wgPasswordSender, 'WikiAdmin' ); |
| 146 | + $editorAddress = new MailAddress( $editor ); |
| 147 | + $timecorrection = $watchingUser->getOption( 'timecorrection' ); |
| 148 | + $editdate = $wgLang->timeanddate( wfTimestampNow(), true, false, $timecorrection ); |
147 | 149 | foreach ( $res as $row ) { |
148 | 150 | $watchingUser = User::newFromId( $row->wl_user ); |
149 | 151 | if ( $watchingUser->getOption( 'enotifwatchlistpages' ) && $watchingUser->isEmailConfirmed() ) { |
150 | 152 | |
151 | | - $to = new MailAddress( $watchingUser ); |
| 153 | + $to = new MailAddress( $watchingUser ); |
152 | 154 | $subject = wfMsg( 'categorywatch-emailsubject', $page ); |
153 | | - $body = wfMsgForContent( 'enotif_body' ); |
| 155 | + $body = wfMsgForContent( 'enotif_body' ); |
154 | 156 | |
155 | 157 | # Reveal the page editor's address as REPLY-TO address only if |
156 | 158 | # the user has not opted-out and the option is enabled at the |
— | — | @@ -170,10 +172,16 @@ |
171 | 173 | } |
172 | 174 | |
173 | 175 | # Define keys for body message |
| 176 | + $userPage = $editor->getUserPage(); |
174 | 177 | $keys = array( |
175 | 178 | '$NEWPAGE' => $message, |
| 179 | + '$PAGETITLE' => $page; |
| 180 | + '$PAGEEDITDATE' => $editdate; |
176 | 181 | '$CHANGEDORCREATED' => wfMsgForContent( 'created' ), |
177 | | - '$OLDID' => '' |
| 182 | + '$PAGETITLE_URL' => $title->getFullUrl(), |
| 183 | + '$PAGEEDITOR_WIKI' => $userPage->getFullUrl(), |
| 184 | + '$OLDID' => '', |
| 185 | + '$PAGEMINOREDIT' => '' |
178 | 186 | ); |
179 | 187 | if ( $editor->isIP( $name ) ) { |
180 | 188 | $utext = wfMsgForContent( 'enotif_anon_editor', $name ); |
— | — | @@ -186,8 +194,7 @@ |
187 | 195 | $emailPage = SpecialPage::getSafeTitleFor( 'Emailuser', $name ); |
188 | 196 | $keys['$PAGEEDITOR_EMAIL'] = $emailPage->getFullUrl(); |
189 | 197 | } |
190 | | - $userPage = $editor->getUserPage(); |
191 | | - $keys['$PAGEEDITOR_WIKI'] = $userPage->getFullUrl(); |
| 198 | + $keys['$PAGESUMMARY'] = $summary; |
192 | 199 | |
193 | 200 | # Replace keys, wrap text and send |
194 | 201 | $body = strtr( $body, $keys ); |