Index: trunk/extensions/EmailPage/EmailPage.php |
— | — | @@ -52,8 +52,8 @@ |
53 | 53 | |
54 | 54 | function wfEmailPageToolboxLink() { |
55 | 55 | global $wgTitle, $wgUser, $wgEmailPageGroup; |
56 | | - if ( is_object( $wgTitle ) && ( empty($wgEmailPageGroup) || in_array( $wgEmailPageGroup, $wgUser->getEffectiveGroups() ) ) ) { |
57 | | - $url = htmlspecialchars( Title::makeTitle( NS_SPECIAL, 'EmailPage' )->getLocalURL( array('ea-title' => $wgTitle->getPrefixedText() ) ) ); |
| 56 | + if ( is_object( $wgTitle ) && ( empty( $wgEmailPageGroup ) || in_array( $wgEmailPageGroup, $wgUser->getEffectiveGroups() ) ) ) { |
| 57 | + $url = htmlspecialchars( SpecialPage::getTitleFor( 'EmailPage' )->getLocalURL( array( 'ea-title' => $wgTitle->getPrefixedText() ) ) ); |
58 | 58 | echo( "<li><a href=\"$url\">" . wfMsg( 'emailpage' ) . "</a></li>" ); |
59 | 59 | } |
60 | 60 | return true; |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | function wfEmailPageActionLink( $skin, &$actions ) { |
64 | 64 | global $wgTitle, $wgUser, $wgEmailPageGroup; |
65 | 65 | if ( is_object( $wgTitle ) && ( empty( $wgEmailPageGroup ) || in_array( $wgEmailPageGroup, $wgUser->getEffectiveGroups() ) ) ) { |
66 | | - $url = Title::makeTitle( NS_SPECIAL, 'EmailPage' )->getLocalURL( array('ea-title' => $wgTitle->getPrefixedText() ) ); |
| 66 | + $url = SpecialPage::getTitleFor( 'EmailPage' )->getLocalURL( array( 'ea-title' => $wgTitle->getPrefixedText() ) ); |
67 | 67 | $actions['email'] = array( 'text' => wfMsg( 'email' ), 'class' => false, 'href' => $url ); |
68 | 68 | } |
69 | 69 | return true; |
Index: trunk/extensions/EmailPage/EmailPage_body.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | global $wgOut, $wgUser, $wgRequest, $wgParser, $wgEmailPageContactsCat, $wgGroupPermissions, $wgSitename, |
31 | 31 | $wgRecordAdminCategory, $wgEmailPageCss, $wgEmailPageAllowAllUsers; |
32 | 32 | |
33 | | - $db = wfGetDB(DB_SLAVE); |
| 33 | + $db = wfGetDB( DB_SLAVE ); |
34 | 34 | $param = str_replace( '_', ' ', $param ); |
35 | 35 | wfLoadExtensionMessages( 'EmailPage' ); |
36 | 36 | $this->setHeaders(); |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | $res = $db->select( |
72 | 72 | 'categorylinks', |
73 | 73 | 'cl_from', |
74 | | - 'cl_to = '.$db->addQuotes( $wgEmailPageContactsCat ), |
| 74 | + 'cl_to = ' . $db->addQuotes( $wgEmailPageContactsCat ), |
75 | 75 | __METHOD__, |
76 | 76 | array( 'ORDER BY' => 'cl_sortkey' ) |
77 | 77 | ); |
— | — | @@ -148,9 +148,9 @@ |
149 | 149 | $wgOut->addHTML( "</fieldset>" ); |
150 | 150 | |
151 | 151 | # Submit buttons & hidden values |
152 | | - $wgOut->addHTML(Xml::element( 'input', array( 'type' => 'submit', 'name' => 'ea-send', 'value' => wfMsg( 'ea-send' ) ) ) . ' ' ); |
153 | | - $wgOut->addHTML(Xml::element( 'input', array( 'type' => 'submit', 'name' => 'ea-show', 'value' => wfMsg( 'ea-show' ) ) ) ); |
154 | | - $wgOut->addHTML(Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'ea-title', 'value' => $this->title ) ) ); |
| 152 | + $wgOut->addHTML( Xml::element( 'input', array( 'type' => 'submit', 'name' => 'ea-send', 'value' => wfMsg( 'ea-send' ) ) ) . ' ' ); |
| 153 | + $wgOut->addHTML( Xml::element( 'input', array( 'type' => 'submit', 'name' => 'ea-show', 'value' => wfMsg( 'ea-show' ) ) ) ); |
| 154 | + $wgOut->addHTML( Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'ea-title', 'value' => $this->title ) ) ); |
155 | 155 | |
156 | 156 | $wgOut->addHTML( "</form>" ); |
157 | 157 | |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | $res = $db->select( |
184 | 184 | 'categorylinks', |
185 | 185 | 'cl_from', |
186 | | - 'cl_to = '.$db->addQuotes( $this->cat ), |
| 186 | + 'cl_to = ' . $db->addQuotes( $this->cat ), |
187 | 187 | __METHOD__, |
188 | 188 | array( 'ORDER BY' => 'cl_sortkey' ) |
189 | 189 | ); |
— | — | @@ -213,12 +213,12 @@ |
214 | 214 | if ( $this->textonly == '' ) { |
215 | 215 | |
216 | 216 | # Parse the wikitext using absolute URL's for local page links |
217 | | - $tmp = array($wgArticlePath, $wgScriptPath, $wgScript); |
218 | | - $wgArticlePath = $wgServer.$wgArticlePath; |
219 | | - $wgScriptPath = $wgServer.$wgScriptPath; |
220 | | - $wgScript = $wgServer.$wgScript; |
221 | | - $message = $wgParser->parse($message, $title, $opt, true, true)->getText(); |
222 | | - list($wgArticlePath,$wgScriptPath,$wgScript) = $tmp; |
| 217 | + $tmp = array( $wgArticlePath, $wgScriptPath, $wgScript ); |
| 218 | + $wgArticlePath = $wgServer . $wgArticlePath; |
| 219 | + $wgScriptPath = $wgServer . $wgScriptPath; |
| 220 | + $wgScript = $wgServer . $wgScript; |
| 221 | + $message = $wgParser->parse( $message, $title, $opt, true, true )->getText(); |
| 222 | + list( $wgArticlePath, $wgScriptPath, $wgScript ) = $tmp; |
223 | 223 | |
224 | 224 | # Get CSS content if any |
225 | 225 | if ( $this->css ) { |
Index: trunk/extensions/EmailPage/EmailPage.i18n.php |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | 'ea-nopage' => "Bitte gebe eine Seite zum Versenden an, bspw. \"[[Special:EmailPage/{{MediaWiki:Mainpage-url}}]]\".", |
129 | 129 | 'ea-norecipients' => "Es sind keine E-Mail-Adressen zum Versenden vorhanden!", |
130 | 130 | 'ea-listrecipients' => '=== {{PLURAL:$1|Empfänger|$1 Empfänger}} ===', |
131 | | - 'ea-error'=> "'''Fehler beim Versenden von Seite [[$1]]:''' ''$2''", |
| 131 | + 'ea-error' => "'''Fehler beim Versenden von Seite [[$1]]:''' ''$2''", |
132 | 132 | 'ea-denied' => 'E-Mail-Versand wurde aufgrund fehlender Berechtigung unterbunden.', |
133 | 133 | 'ea-sent' => "Seite [[$1]] wurde erfolgreich von [[User:$3|$3]] an '''$2''' {{PLURAL:$2|Empfänger|Empfänger}} versandt.", |
134 | 134 | 'ea-selectrecipients' => 'Empfänger auswählen', |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | 'ea-nopage' => "Bitte geben Sie eine Seite zum Versenden an, bspw. \"[[Special:EmailPage/{{MediaWiki:Mainpage-url}}]]\".", |
157 | 157 | 'ea-norecipients' => "Es sind keine E-Mail-Adressen zum Versenden vorhanden!", |
158 | 158 | 'ea-listrecipients' => '=== {{PLURAL:$1|Empfänger|$1 Empfänger}} ===', |
159 | | - 'ea-error'=> "'''Fehler beim Versenden von Seite [[$1]]:''' ''$2''", |
| 159 | + 'ea-error' => "'''Fehler beim Versenden von Seite [[$1]]:''' ''$2''", |
160 | 160 | 'ea-denied' => 'E-Mail-Versand wurde aufgrund fehlender Berechtigung unterbunden.', |
161 | 161 | 'ea-sent' => "Seite [[$1]] wurde erfolgreich von [[User:$3|$3]] an '''$2''' {{PLURAL:$2|Empfänger|Empfänger}} versandt.", |
162 | 162 | 'ea-selectrecipients' => 'Empfänger auswählen', |