Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php |
— | — | @@ -70,6 +70,7 @@ |
71 | 71 | $wgOut->addWikiMsg( 'tpt-nosuchpage', $title->getPrefixedText() ); |
72 | 72 | return; |
73 | 73 | } |
| 74 | + |
74 | 75 | $wgOut->addModules( 'ext.translate.special.pagetranslation' ); |
75 | 76 | |
76 | 77 | if ( $action === 'discourage' || $action === 'encourage' ) { |
— | — | @@ -81,12 +82,14 @@ |
82 | 83 | 'tgr_lang' => '*priority', |
83 | 84 | 'tgr_state' => 'discouraged', |
84 | 85 | ); |
| 86 | + |
85 | 87 | if ( $action === 'encourage' ) { |
86 | 88 | $dbw->delete( $table, $row, __METHOD__ ); |
87 | 89 | } else { |
88 | 90 | $index = array( 'tgr_group', 'tgr_lang' ); |
89 | 91 | $dbw->replace( $table, array( $index ), $row, __METHOD__ ); |
90 | 92 | } |
| 93 | + |
91 | 94 | $this->listPages(); |
92 | 95 | |
93 | 96 | $group = MessageGroups::getGroup( $id ); |
— | — | @@ -106,6 +109,7 @@ |
107 | 110 | $logger->addEntry( 'unmark', $page->getTitle(), null, array( serialize( $params ) ) ); |
108 | 111 | $wgOut->addWikiMsg( 'tpt-unmarked', $title->getPrefixedText() ); |
109 | 112 | self::superDebug( __METHOD__, "unmarked page", $this->user, $title ); |
| 113 | + |
110 | 114 | return; |
111 | 115 | } |
112 | 116 | |
— | — | @@ -145,6 +149,7 @@ |
146 | 150 | // Non-fatal error which prevents saving |
147 | 151 | if ( $error === false && $wgRequest->wasPosted() ) { |
148 | 152 | $err = $this->markForTranslation( $page, $sections ); |
| 153 | + |
149 | 154 | if ( $err ) { |
150 | 155 | call_user_func_array( array( $wgOut, 'addWikiMsg' ), $err ); |
151 | 156 | } else { |