* @return String the URL
*/
public function getInternalURL( $query = '', $variant = false ) {
- global $wgInternalServer;
- $url = $wgInternalServer . $this->getLocalURL( $query, $variant );
+ global $wgInternalServer, $wgServer;
+ $server = $wgInternalServer !== false ? $wgInternalServer : $wgServer;
+ $url = $server . $this->getLocalURL( $query, $variant );
wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) );
return $url;
}
* @return array applicable restriction types
*/
public function getRestrictionTypes() {
+ if ( $this->getNamespace() == NS_SPECIAL ) {
+ return array();
+ }
+
$types = self::getFilteredRestrictionTypes( $this->exists() );
if ( $this->getNamespace() != NS_FILE ) {
$types = $wgRestrictionTypes;
if ( $exists ) {
# Remove the create restriction for existing titles
- $types = array_diff( $types, array( 'create' ) );
+ $types = array_diff( $types, array( 'create' ) );
} else {
# Only the create and upload restrictions apply to non-existing titles
$types = array_intersect( $types, array( 'create', 'upload' ) );