Page MenuHomePhabricator

Check/update dumpInterwiki for beta usage
Closed, ResolvedPublic

Description

Not sure if it'll work fine as is (it has getRealmSpecificFilename() calls in). Or at worst, we'll just have a few extra bad entries...

Details

Related Gerrit Patches:
mediawiki/extensions/WikimediaMaintenance : masterdumpInterwiki: Set links in beta to beta hostnames rather than prod

Event Timeline

Reedy created this task.Nov 25 2014, 5:53 PM
Reedy claimed this task.
Reedy raised the priority of this task from to Medium.
Reedy updated the task description. (Show Details)
Reedy changed Security from none to None.
Reedy added subscribers: Unknown Object (MLST), scfc, Se4598 and 6 others.
Reedy added a comment.Feb 3 2015, 5:46 PM

I guess this load of hardcoded urls needs something doing about

	/**
	 * Returns an array of multi-language sites
	 * db suffix => db suffix, iw prefix, hostname
	 * @returns array
	 */
	protected function getSites() {
		return array(
			'wiki' => new WMFSite( 'wiki', 'w', 'wikipedia.org' ),
			'wiktionary' => new WMFSite( 'wiktionary', 'wikt', 'wiktionary.org' ),
			'wikiquote' => new WMFSite( 'wikiquote', 'q', 'wikiquote.org' ),
			'wikibooks' => new WMFSite( 'wikibooks', 'b', 'wikibooks.org' ),
			'wikinews' => new WMFSite( 'wikinews', 'n', 'wikinews.org' ),
			'wikisource' => new WMFSite( 'wikisource', 's', 'wikisource.org' ),
			'wikimedia' => new WMFSite( 'wikimedia', 'chapter', 'wikimedia.org' ),
			'wikiversity' => new WMFSite( 'wikiversity', 'v', 'wikiversity.org' ),
			'wikivoyage' => new WMFSite( 'wikivoyage', 'voy', 'wikivoyage.org' ),
		);
	}

	/**
	 * Returns an array of extra global interwiki links that can't be in the
	 * intermap for some reason
	 * @returns array
	 */
	protected function getExtraLinks() {
		return array(
			array( 'm', $this->urlprotocol . '//meta.wikimedia.org/wiki/$1', 1 ),
			array( 'meta', $this->urlprotocol . '//meta.wikimedia.org/wiki/$1', 1 ),
			array( 'sep11', $this->urlprotocol . '//sep11.wikipedia.org/wiki/$1', 1 ),
			array( 'd', $this->urlprotocol . '//www.wikidata.org/wiki/$1', 1 ),
		);
	}

	/**
	 * Additional links to provide for the needs of the different projects
	 * @param string $project The site (e.g. wikibooks)
	 * @returns array
	 */
	protected function getAdditionalLinks( $project ) {
		switch( $project ) {
			case 'wikisource':
				return array(
					array( 'mul', $this->urlprotocol . '//wikisource.org/wiki/$1', 1 ),
				);
			case 'wikiversity':
				return array(
					array( 'mul', $this->urlprotocol . '//beta.wikiversity.org/wiki/$1', 1 ),
				);
			case 'wiki':
				return array(
					array( 'w', $this->urlprotocol . '//en.wikipedia.org/wiki/$1', 1 ),
				);
			default:
				return array();
		}
	}
hashar removed a subscriber: hashar.Feb 4 2015, 9:00 AM
greg removed Reedy as the assignee of this task.Apr 6 2015, 8:59 PM
Restricted Application added a subscriber: Luke081515. · View Herald TranscriptJul 16 2015, 7:47 AM
Krenair claimed this task.Jul 16 2015, 8:53 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 16 2015, 8:53 PM

Change 225234 had a related patch set uploaded (by Alex Monk):
dumpInterwiki: Set links in beta to beta hostnames rather than prod

https://gerrit.wikimedia.org/r/225234

jayvdb raised the priority of this task from Medium to High.Sep 9 2015, 10:27 PM
jayvdb added a subscriber: jayvdb.

A broken interwikimap is preventing proper testing.

A broken interwikimap is preventing proper testing.

Okay. Unfortunately changing task priorities is not usually going to help convince people to review code.

Change 225234 merged by jenkins-bot:
dumpInterwiki: Set links in beta to beta hostnames rather than prod

https://gerrit.wikimedia.org/r/225234

Krenair closed this task as Resolved.Sep 10 2015, 11:01 PM