- $result = !( $index < NS_MAIN ||
- ( $index == NS_FILE && !$this->options->get( 'AllowImageMoving' ) ) );
+ $result = $index >= NS_MAIN &&
+ ( $index != NS_FILE || $this->options->get( 'AllowImageMoving' ) );
* For subject (non-talk) namespaces, returns the talk namespace
*
* @param int $index Namespace index
* For subject (non-talk) namespaces, returns the talk namespace
*
* @param int $index Namespace index
*/
public function getAssociated( $index ) {
$this->isMethodValidFor( $index, __METHOD__ );
if ( $this->isSubject( $index ) ) {
return $this->getTalk( $index );
*/
public function getAssociated( $index ) {
$this->isMethodValidFor( $index, __METHOD__ );
if ( $this->isSubject( $index ) ) {
return $this->getTalk( $index );
- * Returns an array of the namespaces (by integer id) that exist on the
- * wiki. Used primarily by the api in help documentation.
+ * Returns an array of the namespaces (by integer id) that exist on the wiki. Used primarily by
+ * the API in help documentation. The array is sorted numerically and omits negative namespaces.
* Determine which restriction levels it makes sense to use in a namespace,
* optionally filtered by a user's rights.
*
* Determine which restriction levels it makes sense to use in a namespace,
* optionally filtered by a user's rights.
*