Index: trunk/phase3/includes/SpecialNewpages.php |
— | — | @@ -30,7 +30,8 @@ |
31 | 31 | } |
32 | 32 | |
33 | 33 | function makeUserWhere( &$dbo ) { |
34 | | - if ($this->hideliu) { |
| 34 | + global $wgGroupPermissions; |
| 35 | + if ($wgGroupPermissions['*']['createpage'] == true && $this->hideliu) { |
35 | 36 | return ' AND rc_user = 0'; |
36 | 37 | } else { |
37 | 38 | $title = Title::makeTitleSafe( NS_USER, $this->username ); |
— | — | @@ -144,7 +145,7 @@ |
145 | 146 | * @return string |
146 | 147 | */ |
147 | 148 | function getPageHeader() { |
148 | | - global $wgScript, $wgContLang; |
| 149 | + global $wgScript, $wgContLang, $wgGroupPermissions; |
149 | 150 | $align = $wgContLang->isRTL() ? 'left' : 'right'; |
150 | 151 | $self = SpecialPage::getTitleFor( $this->getName() ); |
151 | 152 | $form = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . |
— | — | @@ -165,10 +166,14 @@ |
166 | 167 | <td>" . |
167 | 168 | Xml::input( 'username', 30, $this->username, array( 'id' => 'mw-np-username' ) ) . |
168 | 169 | "</td> |
169 | | - </tr><tr> |
| 170 | + </tr>"; |
| 171 | + if ($wgGroupPermissions['*']['createpage'] == true) { |
| 172 | + $form = $form . "<tr><td></td> |
170 | 173 | <td colspan=\"2\">" . Xml::checkLabel( wfMsgHtml( 'rcshowhideliu', wfMsg( 'hide' ) ), |
171 | 174 | 'hideliu', 'hideliu', $this->hideliu, array( 'id' => 'mw-np-hideliu' ) ) . " |
172 | | - </td></tr> |
| 175 | + </td></tr>"; |
| 176 | + } |
| 177 | + $form = $form . " |
173 | 178 | <tr> <td></td> |
174 | 179 | <td>" . |
175 | 180 | Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . |