In case someone like me should have played so much with the alpha 1.5
version,
here is a quick and dirty script to remove all old revisions.
!!! This is a developer tool, don't use it on your precious parts, and make
a backup before you use it !!!
It's probably rather safe on the first time you run it, because, backups are
made, but on the second run, if something goes wrong, data loss might occur.
Dieter Menne
dieter.menne(a)menne-biomed.de
-- Script to cleanup all revision in MediaWiki 1.5 alpha (not for earlier
version)
-- This is quick and dirty, but all original table are preserver with _old
-- If everything works as request, you can delete the xx_old tables created
-- by this script.
-- Only tested once, don't try it with your database without making a
-- backup first
-- dieter.menne(a)menne-biomed.de
-- This script does not use nested queries, it should work with MySql 4.0
CREATE TABLE `mw_text1` ( `old_id` int( 8 ) unsigned NOT NULL
AUTO_INCREMENT ,
`old_namespace` tinyint( 2 ) unsigned NOT NULL default '0',
`old_title` varchar( 255 ) binary NOT NULL default '',
`old_text` mediumtext NOT NULL ,
`old_comment` tinyblob NOT NULL ,
`old_user` int( 5 ) unsigned NOT NULL default '0',
`old_user_text` varchar( 255 ) binary NOT NULL default '',
`old_timestamp` varchar( 14 ) binary NOT NULL default '',
`old_minor_edit` tinyint( 1 ) NOT NULL default '0',
`old_flags` tinyblob NOT NULL ,
`inverse_timestamp` varchar( 14 ) binary NOT NULL default '',
PRIMARY KEY ( `old_id` ) ,
KEY `old_timestamp` ( `old_timestamp` ) ,
KEY `name_title_timestamp` ( `old_namespace` , `old_title` ,
`inverse_timestamp` ) ,
KEY `user_timestamp` ( `old_user` , `inverse_timestamp` ) ,
KEY `usertext_timestamp` ( `old_user_text` , `inverse_timestamp` ) )
TYPE = MYISAM ;
-- Table with latest changes
CREATE TABLE `latest` (
`latest_id` INT NOT NULL
);
-- get unique
insert into latest
select old_id from mw_text
left outer join mw_page
on old_id=page_latest
where page_latest is not NULL;
-- Copy unique into text1
insert into mw_text1 (
select mw_text1.* from mw_text
join latest
on latest_id=old_id);
CREATE TABLE `mw_revision1` (
`rev_id` int( 8 ) unsigned NOT NULL AUTO_INCREMENT ,
`rev_page` int( 8 ) unsigned NOT NULL default '0',
`rev_comment` tinyblob NOT NULL ,
`rev_user` int( 5 ) unsigned NOT NULL default '0',
`rev_user_text` varchar( 255 ) binary NOT NULL default '',
`rev_timestamp` varchar( 14 ) binary NOT NULL default '',
`rev_minor_edit` tinyint( 1 ) unsigned NOT NULL default '0',
`inverse_timestamp` varchar( 14 ) binary NOT NULL default '',
PRIMARY KEY ( `rev_page` , `rev_id` ) ,
UNIQUE KEY `rev_id` ( `rev_id` ) ,
KEY `rev_timestamp` ( `rev_timestamp` ) ,
KEY `page_timestamp` ( `rev_page` , `inverse_timestamp` ) ,
KEY `user_timestamp` ( `rev_user` , `inverse_timestamp` ) ,
KEY `usertext_timestamp` ( `rev_user_text` , `inverse_timestamp` )
) TYPE = MYISAM ;
-- Copy most recent revisions
insert into mw_revision1 (
select mw_revision.* from mw_revision
join latest
on latest_id=rev_id);
--- Remove list of recent changes, we first make a copy and the
-- truncate the original. This could have been made easier without the
-- copy, but I wanted to play safe.
CREATE TABLE `mw_recentchanges_old` (
`rc_id` int( 8 ) NOT NULL AUTO_INCREMENT ,
`rc_timestamp` varchar( 14 ) binary NOT NULL default '',
`rc_cur_time` varchar( 14 ) binary NOT NULL default '',
`rc_user` int( 10 ) unsigned NOT NULL default '0',
`rc_user_text` varchar( 255 ) binary NOT NULL default '',
`rc_namespace` tinyint( 3 ) NOT NULL default '0',
`rc_title` varchar( 255 ) binary NOT NULL default '',
`rc_comment` varchar( 255 ) binary NOT NULL default '',
`rc_minor` tinyint( 3 ) unsigned NOT NULL default '0',
`rc_bot` tinyint( 3 ) unsigned NOT NULL default '0',
`rc_new` tinyint( 3 ) unsigned NOT NULL default '0',
`rc_cur_id` int( 10 ) unsigned NOT NULL default '0',
`rc_this_oldid` int( 10 ) unsigned NOT NULL default '0',
`rc_last_oldid` int( 10 ) unsigned NOT NULL default '0',
`rc_type` tinyint( 3 ) unsigned NOT NULL default '0',
`rc_moved_to_ns` tinyint( 3 ) unsigned NOT NULL default '0',
`rc_moved_to_title` varchar( 255 ) binary NOT NULL default '',
`rc_patrolled` tinyint( 3 ) unsigned NOT NULL default '0',
`rc_ip` varchar( 15 ) NOT NULL default '',
PRIMARY KEY ( `rc_id` ) ,
KEY `rc_timestamp` ( `rc_timestamp` ) ,
KEY `rc_namespace_title` ( `rc_namespace` , `rc_title` ) ,
KEY `rc_cur_id` ( `rc_cur_id` ) ,
KEY `new_name_timestamp` ( `rc_new` , `rc_namespace` , `rc_timestamp` ) ,
KEY `rc_ip` ( `rc_ip` )
) TYPE = MYISAM ;
-- Copy into database
INSERT INTO `mw_recentchanges_old`
SELECT *
FROM `mw_recentchanges` ;
-- Remove date from original
TRUNCATE TABLE mw_recentchanges;
--- Swap table names
ALTER TABLE `mw_revision` RENAME `mw_revision_old` ;
ALTER TABLE `mw_text` RENAME `mw_text_old` ;
ALTER TABLE `mw_text1` RENAME `mw_text` ;
ALTER TABLE `mw_revision1` RENAME `mw_revision` ;
-- We don't need the latest any more
DROP Table latest;
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
MediaWiki 1.4beta5 is a security and bug fix release for the 1.4 beta
series. Previous MediaWiki 1.4 beta releases include an input
validation error which could lead to execution of arbitrary PHP code on
the server.
All users of 1.4 beta releases are strongly urged to upgrade to
1.4beta5 immediately. The 1.3.x stable release series is not affected
by this problem.
Beta 5 additionally fixes a number of non-security-related bugs, and
requires one minor database change. If upgrading from a previous beta,
see the file UPGRADE in the release archive for instructions.
Bugs fixed in beta 5:
* (bug 1124) Fix ImageGallery XHTML compliance
* (bug 1186) news: in the middle of a word
* (bug 1283) Use underlining and borders to highlight
additions/deletions
in diff-view
* Use user's local timezone in Special:Log display
* Show filename for images in gallery by default (restore beta 3
behaviour)
* (bug 1201) Double-escaping in brokenlinks, imagelinks, categorylinks,
searchindex
* When using squid reverse proxy, cache the redirect to the Main_Page
* (bug 1302) Fix Norwegian language file
* (bug 1205) Fix broken article saving in PHP 5.1
* (bug 1206) Implement CURRENTWEEK and CURRENTDOW magic keyword (will
give
number of the week and number of the day).
* (bug 1204) Blocks do not expire automatically
* (bug 1184) expiry time of indefinite blocks shown as the current time
* (bug 1317) Fix external links in image captions
* (bug 1084) Fix logo not rendering centrally in IE
* (bug 288) Fix tabs wrapping in IE6
* (bug 119) Fix full-width tabs with RTL text in IE
* (bug 1323) Fix logo rendering off-screen in IE with RTL language
* Show "block" link in Special:Recentchanges for logged in users, too,
if
wgUserSysopBans is true.
* (bug 1326) Use content language for '1movedto2' in edit history
* zh: Fix warning when HTTP_ACCEPT_LANGUAGE is not set
* zh: Fix double conversion for zh-sg and zh-hk
* (bug 1132) Fix concatenation of link lists in refreshLinks
* (bug 1101) Fix memory leak in refreshLinks
* (bug 1339) Fix order of @imports in Cologne Blue CSS
* Don't try to create links without namespaces ([[Category:]] link bug)
* Memcached data compression fixes
* Several valid XHTML fixes
* (bug 624) Fix IE freezing rendering whilst waiting for CSS with
MonoBook
* (bug 211) Fix tabbed preferences with XHTML MIME type
* Fix for script execution vulnerability.
Due to a temporary problem with SourceForge's file release system, this
release is currently hosted on Wikimedia's servers instead of the usual
location.
Release notes:
http://zwinger.wikimedia.org/mediawiki/RELEASE-NOTES
Download:
http://zwinger.wikimedia.org/mediawiki/mediawiki-1.4beta5.tar.gz
MD5 checksum: 11342e291b5af4e8d4668ad5c3a6d171
SHA1 checksum: 23178fdba265083186c6475a0c3d0ea4d2e06ae0
Wiki admin help mailing list:
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Low-traffic release announcements mailing list:
http://mail.wikipedia.org/mailman/listinfo/mediawiki-announce
Bug report system:
http://bugzilla.wikipedia.org/
Play "stump the developers" live on IRC:
#mediawiki on irc.freenode.net
- -- brion vibber (brion @ pobox.com)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)
iD8DBQFB64dDwRnhpk1wk44RArTfAKCtGNLWbDAz/2MQvaQDnyoYdZ9SAwCdELJn
YmxnTCkN8fULr1tPi9MMnYw=
=YaNq
-----END PGP SIGNATURE-----
This is a request for comments on both the patch and
the feature that are in Bug 626: Different new page
text for each namespace (enhancement) at:
http://bugzilla.wikipedia.org/show_bug.cgi?id=626
This patch creates new system messages to modify the
how the system message newarticletext is used.
Currently, newarticletext is for new pages in any
namespace, including talk, new catagory, new image
descriptions and so forth. This patch creates 8 new
page text variables:
newuserpagetext,
newwikipediapagetext,
newimagepagetext,
newmediawikitext,
newtemplatetext,
newhelppagetext,
newcategorytext,
newtalktext
so that custom messages can be created for each. This
allows the message that a user sees when creating a
new talk page to be different when creating a new
article and so on and so forth. I created this patch
initially when I saw the message:
Wikipedia does not yet have a Talk page called
Scarcity.
* To start the article, begin typing in the box
below. When you're done,
press the "Save page" button. Your changes will be
visible immediately.
* Please do not create an article to promote
yourself, a website, a product,
or a business (see Wikipedia:Policy).
* If you are new to Wikipedia, please read the
tutorial before creating your
first article, and only use the sandbox for editing
experiments.
* Search for Scarcity in Wikipedia
and I thought that the text was rather strange for
creating a discussion page. The text on en.wp has
since been improved, but as the system message is used
in practice (that is, a brief guide to creating new
pages), I believe it would be useful to have different
messages for different namespaces.
I request your comments on both the attached patch,
and on whether it would be useful to have seperate new
page texts for each namespace.
Josh Cogliati
When you refresh some wikipedia pages in IE the wiki.png graphic seems
to make a small jump. (not Opera - which just a little twitch as the
bullet.gifs are loaded or FF - rock solid except for a tiny upwards
bullet.gif jump)
It doen't happen on the German wikipedia (how predictable is that?)
(yes, yes, the answer of course is to stop using IE)
It happens on my wikis too - anyone know how the Germans got it so perfect?
MW1.3.9 has a bug with subsections of the same name.
==section1==
===subsection1===
===subsection2===
==section2==
===subsection1===
===subsection2===
when accessing #subsection1 after editing, for example, the second
subsection1, MW will go to the first subsection1 and not to the second
subsection1.
--
NSK
http://portal.wikinerds.org
Hi,
This is my first contribution to WikiMedia, so please forgive me(and
tell me what to do in the future) if this is the wrong list for patches,
or I have not correctly followed your coding style conventions.
The patch makes config/index.php work out of the box(before it failed
with a database error). To get this to work, I had to make
LoadBalancer.php honour $wgUseDatabaseMessages = false(the code is only
run if the database connection has already failed, so there is no
slowdown except in error situations). I also had to modify User.php so
that a wgDebugDieBacktrace is not called when $wgUseDatabaseMessages =
false. Again, this does not affect the "usual" path of execution. I
added a $dbr == null check in Group.php, this does affect the usual path
of execution, but is probably a check we should have anyway.
I also fixed some old and/or unnecessary code in config/index.php
Patch follows(-rbud options):
cvs diff: Diffing config
Index: config/index.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/config/index.php,v
retrieving revision 1.89
diff -b -u -d -r1.89 index.php
--- config/index.php 28 Dec 2004 14:49:41 -0000 1.89
+++ config/index.php 15 Jan 2005 00:17:12 -0000
@@ -405,7 +405,6 @@
$wgDBadminuser = "root";
$wgDBadminpassword = $conf->RootPW;
$wgDBprefix = $conf->DBprefix;
- $wgCommandLineMode = true;
$wgUseDatabaseMessages = false; /* FIXME: For database
failure */
require_once( "includes/Setup.php" );
chdir( "config" );
@@ -414,7 +413,7 @@
$wgTitle = Title::newFromText( "Installation script" );
$wgDatabase = Database::newFromParams( $wgDBserver, "root",
$conf->RootPW, "", 1 );
- $wgDatabase->mIgnoreErrors = true;
+ $wgDatabase->ignoreErrors(true);
@$myver = mysql_get_server_info( $wgDatabase->mConn );
if( $myver ) {
@@ -436,7 +435,7 @@
$wgDBadminpassword = $wgDBpassword;
$wgDatabase = Database::newFromParams( $wgDBserver,
$wgDBuser, $wgDBpassword, "", 1 );
$wgDatabase->isOpen();
- $wgDatabase->mIgnoreErrors = true;
+ $wgDatabase->ignoreErrors(true);
@$myver = mysql_get_server_info( $wgDatabase->mConn );
if( !$myver ) {
$errs["DBuser"] = "Check name/pass";
@@ -1104,6 +1103,9 @@
\$wgProxyKey = \"$proxyKey\";
+# The whitelist
+\$wgWhitelistRead = array(\"Special:Userlogin\");
+
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
# \$wgDefaultSkin = 'monobook';
cvs diff: Diffing docs
cvs diff: Diffing docs/html
cvs diff: Diffing docs/php-memcached
cvs diff: Diffing extensions
cvs diff: Diffing images
cvs diff: Diffing includes
Index: includes/Group.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Group.php,v
retrieving revision 1.2
diff -b -u -d -r1.2 Group.php
--- includes/Group.php 24 Oct 2004 22:02:02 -0000 1.2
+++ includes/Group.php 15 Jan 2005 00:17:24 -0000
@@ -131,6 +131,8 @@
function nameFromId($id) {
$fname = 'Group::nameFromId';
$dbr =& wfGetDB( DB_SLAVE );
+ if ($dbr == null)
+ return;
$r = $dbr->selectRow( 'group', array( 'group_name' ), array(
'group_id' => $id ), $fname );
if($r === false) {
Index: includes/LoadBalancer.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/LoadBalancer.php,v
retrieving revision 1.17
diff -b -u -d -r1.17 LoadBalancer.php
--- includes/LoadBalancer.php 6 Dec 2004 01:14:53 -0000 1.17
+++ includes/LoadBalancer.php 15 Jan 2005 00:17:31 -0000
@@ -320,8 +320,11 @@
function reportConnectionError( &$conn )
{
+ global $wgUseDatabaseMessages;
$fname = 'LoadBalancer::reportConnectionError';
wfProfileIn( $fname );
+ if (!$wgUseDatabaseMessages)
+ return;
# Prevent infinite recursion
static $reporting = false;
Index: includes/User.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/User.php,v
retrieving revision 1.114
diff -b -u -d -r1.114 User.php
--- includes/User.php 8 Jan 2005 09:17:33 -0000 1.114
+++ includes/User.php 15 Jan 2005 00:17:36 -0000
@@ -379,7 +379,7 @@
* Load a user from the database
*/
function loadFromDatabase() {
- global $wgCommandLineMode, $wgAnonGroupId, $wgLoggedInGroupId;
+ global $wgCommandLineMode, $wgAnonGroupId, $wgLoggedInGroupId,
$wgUseDatabaseMessages;
$fname = "User::loadFromDatabase";
# Counter-intuitive, breaks various things, use
User::setLoaded() if you want to suppress
@@ -397,9 +397,15 @@
/** Get rights */
$anong = Group::newFromId($wgAnonGroupId);
if (!$anong)
- wfDebugDieBacktrace("Please update your database schema "
- ."and populate initial group data from "
- ."maintenance/archives patches");
+ {
+ if ($wgUseDatabaseMessages)
+ wfDebugDieBacktrace(
+ "Please update your database ".
+ "schema and populate initial ".
+ "group data from maintenance/".
+ "archives patches");
+ return;
+ }
$anong->loadFromDatabase();
$this->mRights = explode(',', $anong->getRights());
$this->mDataLoaded = true;
I updated LanguageJbo.php to HEAD, as well as I could understand the code, but
would like some help with these:
*Date formats are rather different. There are two sets of month names in use,
and two sets of weekday names, but such formats as "Friday, January 14, 2005"
cannot be used in a sentence, it has to be "the 14th of January of the
2005th, which is Friday" or else just numbers.
*Initial capitalization does not exist. Capitalization indicates stress.
If you'd like to help me with this, please let me know.
phma
--
le xruki le ginxre xrixruba xu xrula cu xrani?
Oops...I just realized that I accidentally posted the message below
to wikien-l. I'm reposting it here in the hope that someone can help
me out.
I'm trying to set up our MediaWiki site to use clean URLs and have
run into a snag. My pages take a long time to load and kick out a
couple of error messages that say "too many HTTP redirects" for the
following URLs:
http://www.sourcewatch.org/-?action=raw&ctype=text%2Fcss&smaxage=18000&maxa…http://www.sourcewatch.org/-?action=raw&ctype=text%2Fjavascript&smaxage=180…
It appears that these URLs are being generated somehow by the lines
in xhtml_slim.pt which read as follows:
<script type="text/javascript" tal:attributes="src jsvarurl"></script>
and:
<style tal:condition="usercss" type="text/css">/*<![CDATA[*/
${usercss} /*]]>*/</style> <script tal:condition="userjs"
type="text/javascript" tal:attributes="src userjs"></script><script
tal:condition="userjsprev"
type="text/javascript">/*<![CDATA[*/${userjsprev}/*]]>*/</script>
When I delete these lines, the error messages stop.
I've reviewed the MediaWiki page on rewrite rules and am wondering if
my problem has to do with the ampescape patch that it says is needed
for Apache. I haven't tried installing the patch and don't know if
I'll be able to. (The patch says it's for Apache 1.3.26, whereas I
have 1.3.29. Also, I don't know if my web host will agree to install
the patch.)
I'm guessing that if I can't patch Apache, I can get away with
deleting the lines above from xhtml_slim.pt, and everything will work
except that (1) users won't be able to customize their javascript and
css, and (2) ampersands won't work in page titles. Is this correct?
The current rewrite rules in my .htaccess file are as follows:
RewriteCond %{REQUEST_URI} !^/(stylesheets|images)/
RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/robots.txt
# Rewrite http://www.sourcewatch.org/article properly
RewriteRule ^(.*)$ /index.php?title=$1 [L,QSA]
Can someone tell me what I need to do?
Regards,
Sheldon Rampton
Hi,
I have placed this in my LocalSettings.php:
$wgSiteNotice = "{{msg:A1}}";
In the wiki there is a [[Template:A1]] page which contains:
Go to "[http://externalsite/{{NAMESPACE}}:{{PAGENAMEE}} {{PAGENAME}}]".
The result of the above is that NAMESPACE gets replaced by Special and
PAGENAMEE gets replaced by Error, just like PAGENAME, regardless of the page
I am looking in my wiki. So the result is that I always get Special:Error. If
I remove {{NAMESPACE}} I just get Error.
I use mediawiki1.4beta4, unmodified.
--
NSK
http://portal.wikinerds.org
Is there a way I can download .ps quality math fonts to use with my
website?
-Thanks
www.exampleproblems.com
-----------------------
Todd Smith
Mathematics - UCF
tbsmith(a)mail.ucf.edu