Page MenuHomePhabricator

EditPage assumes MediaWiki:Copyrightpage can't be external
Closed, InvalidPublic

Description

Let's discuss EditPage.php's
$copywarn = "<div id=\"editpage-copywarn\">\n" .
wfMsg( $wgRightsText ? 'copyrightwarning' : 'copyrightwarning2',

		'[[' . wfMsgForContent( 'copyrightpage' ) . ']]',
		$wgRightsText ) . "\n</div>";

which uses

'copyrightwarning' => ... released under the $2 (see $1 for details)....

(Note the hardwired '[[', ']]' perhaps hackish looking code above.)

Well, it turns out if one makes e.g.,
$ GET 'http://radioscanningtw.jidanni.org/index.php?title=MediaWiki:Copyrightpage&action=raw'

http://zh.wikipedia.org/w/index.php?title=Wikipedia:版权信息&variant=zh-tw

One will get ugly '[[1]]':
$ w3m -dump 'http://radioscanningtw.jidanni.org/index.php?title=User:Jidanni&action=edit&uselang=en' |fgrep [[1

the GNU許可 (see [[1]] for details). If you don't want your writing to be

That's right, EditPage.php makes the big assumption that
MediaWiki:Copyrightpage can only be an internal link.
Therefore the outer [ and ] of [[1]] end up being not parsed as part
of the link... just page clutter. Also the inner [1] itself is
probably not flexible if one wants to make it show up differently.


Version: 1.15.x
Severity: trivial

Details

Reference
bz11033

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:53 PM
bzimport set Reference to bz11033.
bzimport added a subscriber: Unknown Object (MLST).

Yes, it's meant to be an internal link.

<Sniff>, all I wanted to do was make MediaWiki:Copyrightpage = $wgRightsUrl.

I suppose I did the best I could without resorting to fiddle with MediaWiki:Copyrightwarning.

For anybody reading looking for a workaround to Edit.php's hardwired
expecting of internal links ('[[' . wfMsgForContent( 'copyrightpage' ) . ']]'),
the workaround is to just make MediaWiki:Copyrightpage have:

[http://bla... Googoo]

Sure it will be rendered "[[Googoo]]" instead of "Googoo", but it is better
than just "[1]".