https://bugzilla.wikimedia.org/show_bug.cgi?id=29854

--- Comment #6 from Brad Jorsch <[email protected]> 2011-11-01 
16:10:09 UTC ---
Created attachment 9340
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=9340
Possible patch to implement Brion's solution

(In reply to comment #5)
> #3 shouldn't require actually running refreshlinks, we should be able to find
> all protocol-relative entries and convert them pretty easily, without even
> accessing the page text.

The complaint was just that that other bug requiring database updates seems to
be being ignored. It could take just two SQL queries to fix the DB:

    INSERT INTO externallinks (el_from,el_to,el_index) SELECT el_from, el_to,
CONCAT('http:',el_index) FROM externallinks WHERE el_index LIKE '//%';
    UPDATE externallinks SET el_index = CONCAT('https:',el_index) WHERE
el_index LIKE '//%';

Avoiding killing the site while running those queries on Wikipedia is probably
the hard part.

I tried my hand at writing the necessary patch; I copied doTemplatelinksUpdate
for the MySQL database updating. There are probably things that could be done
better. Even if the patch is good, someone would still have to write updaters
for the non-MySQL databases.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to