r47755 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47754‎ | r47755 | r47756 >
Date:18:41, 24 February 2009
Author:huji
Status:reverted (Comments)
Tags:
Comment:
(bug 16899) DISPLAYTITLE should allow Arabic and Persian harakats
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2197,6 +2197,9 @@
21982198 #
21992199 $dbkey = preg_replace( '/[ _]+/', '_', $dbkey );
22002200 $dbkey = trim( $dbkey, '_' );
 2201+
 2202+ # Clean up Arabic harakats (bug 16899)
 2203+ $dbkey = preg_replace( '/[\x{064B}-\x{0652}]/Su', '', $dbkey );
22012204
22022205 if ( '' == $dbkey ) {
22032206 return false;
Index: trunk/phase3/RELEASE-NOTES
@@ -221,6 +221,7 @@
222222 * (bug 17621) Special:WantedFiles has no link to Special:Whatlinkshere
223223 * (bug 17460) Client ecoding is now correctly set for PostgreSQL
224224 * (bug 17648) Prevent floats from intruding into edit area in previews if no toolbar present
 225+* (bug 16899) DISPLAYTITLE should allow Arabic and Persian harakats
225226
226227 == API changes in 1.15 ==
227228 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Follow-up revisions

RevisionCommit summaryAuthorDate
r48805Revert r47755 "(bug 16899) DISPLAYTITLE should allow Arabic and Persian harak...brion11:35, 25 March 2009

Comments

#Comment by Simetrical (talk | contribs)   20:11, 24 February 2009

Doesn't this mean that harakats are *forbidden* in all page titles, and existing pages with harakats in them will become inaccessible, in all installations of MediaWiki? Is this really what's desired? If you're sure about that, cleanup scripts will need to be run on all wikis.

#Comment by Huji (talk | contribs)   20:53, 25 February 2009

In such wikis as Persian Wikipedia, harakats are actually forbidden in page titles. I'm not sure about other (particularly non-Wikimedia) wikis.

#Comment by Simetrical (talk | contribs)   00:03, 26 February 2009

I'm particularly concerned about non-Wikimedia wikis. Does this make sense for all wikis? I don't think we have special cases like this for other languages, do we?

#Comment by AhmadSherif (talk | contribs)   13:53, 1 March 2009

I see Simetrical point. We can avoid this error (pages inaccessibility) by adding a check in displaytitle function in CoreParserFunctions.php, which will not change the value of mDbkeyform.

#Comment by Simetrical (talk | contribs)   15:11, 1 March 2009

Does that mean you want "page name with harakats" to display, but when people copy-paste page name with harakats it won't actually go to that name? We've been trying to avoid that with displaytitle.

#Comment by AhmadSherif (talk | contribs)   16:27, 1 March 2009

What I mean is: we move that `preg_replace(...)` to displaytitle function, so it will only change the title in view and edit modes but the original title will be unchanged.

Example: A page with the title `تجربة` (without any harakats) and we want to change the title to `تجرُبة` (with harakat) so we use {{DISPLAYTITLE}}. That wouldn't conflict with any previous page named `تجرُبة`. And that doesn't make [[تجربة]] and [[تجرُبة]] lead to each other.

#Comment by Simetrical (talk | contribs)   16:35, 1 March 2009

But then a user reading the page who wants to link to it might copy the title, and write تجرُبة, which won't work. That's why there are displaytitle restrictions at all.

#Comment by AhmadSherif (talk | contribs)   17:14, 1 March 2009

Well, you're right but there is a chance he could get the true title from location bar. However, this means that you have to revert this commit.

#Comment by Simetrical (talk | contribs)   19:40, 1 March 2009

I marked it fixme, it's up to Brion.

#Comment by Brion VIBBER (talk | contribs)   11:35, 25 March 2009

This patch doesn't add anything to displaytitle, but rather strips things from actual titles which are currently permitted in them. Reverted in r48805.

Status & tagging log