mysql

Modifying MediaWiki user preferences at once

Since long time ago, it's possible to change default user preferences in MediaWiki by simply adding a line of code in LocalSettings.php. Example:
$wgDefaultUserOptions['editsection'] = 0;
However, if the wiki is not new, there could be already several users who will have inherited previous default preferences before any change is performed in LocalSettings.php.
In order to solve this, in recent MediaWiki versions there is a maintenance script for changing a user preference value for all users in the wiki.
Nonetheless, in my case, I did not want to change the preference value for all users, but only for those ones belonging to a certain group. Of course, more complex filtering criteria could be devised…
For anyone who might need it, the code (in Perl) I used below:

D'ISAM a MyISAM amb MySQL 5

Actualitzar en les distribucions més habituals la versió 4 de MySQL a la 5 és quelcom força fàcil i assumible. Però ai las!, sempre cal consultar la documentació abans i fer proves exhaustives per a qualsevol imprevist. Precisament en una màquina que administro m'he trobat amb una punyeteta que no havia considerat: taules en format ISAM.

Subscribe to RSS - mysql