Index: trunk/phase3/includes/specials/SpecialProtectedtitles.php |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | Xml::element( 'legend', array(), wfMsg( 'protectedtitles' ) ) . |
104 | 104 | Xml::hidden( 'title', $special ) . " \n" . |
105 | 105 | $this->getNamespaceMenu( $namespace ) . " \n" . |
106 | | - // $this->getLevelMenu( $level ) . "<br/>\n" . |
| 106 | + $this->getLevelMenu( $level ) . " \n" . |
107 | 107 | " " . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . |
108 | 108 | "</fieldset></form>"; |
109 | 109 | } |
— | — | @@ -137,7 +137,10 @@ |
138 | 138 | $m[$text] = $type; |
139 | 139 | } |
140 | 140 | } |
141 | | - |
| 141 | + // Is there only one level (aside from "all")? |
| 142 | + if( count($m) <= 2 ) { |
| 143 | + return ''; |
| 144 | + } |
142 | 145 | // Third pass generates sorted XHTML content |
143 | 146 | foreach( $m as $text => $type ) { |
144 | 147 | $selected = ($type == $pr_level ); |
— | — | @@ -190,7 +193,8 @@ |
191 | 194 | function getQueryInfo() { |
192 | 195 | $conds = $this->mConds; |
193 | 196 | $conds[] = 'pt_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() ); |
194 | | - |
| 197 | + if( $this->level ) |
| 198 | + $conds['pt_create_perm'] = $this->level; |
195 | 199 | if( !is_null($this->namespace) ) |
196 | 200 | $conds[] = 'pt_namespace=' . $this->mDb->addQuotes( $this->namespace ); |
197 | 201 | return array( |