-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jimmy Wales wrote:
| I think that this is pretty important, too. Can you please raise the
| license issue gently over there? It's better to keep a copyvio around
| in the page history for a little while, until a developer can delete
| it by hand, than to do what they are doing.
|
| Your idea for a feature is a very good one, too.
I hacked some code during this evening which enables deletion of single
revisions. It is quick and dirty and does not provide any security
(confirmation, checking if the revision still exists) but it works. Here
are the diffs (hope this is correct, if not I will mail the complete
files to some of the developers):
includes/PageHistory.php
84,85c84,85
< $s .= $this->historyLine(
< $this->mArticle->getTimestamp(),
- ---
| $s .= $this->historyLine(
| $this->mArticle->getTimestamp(),
89c89
< ( $this->mArticle->getMinorEdit() > 0 )
- ---
| ( $this->mArticle->getMinorEdit() > 0 )
188a189,190
| // Add a link to delete only this revision of the page
history
| $dellink = $this->mSkin->makeKnownLink( $artname, $cur,
"delold=($oid)");
192c194
< $s .= "({$curlink}) (!OLDID!{$oid}!) $arbitrary . .";
- ---
| $s .= "({$curlink}) (!OLDID!{$oid}!) ($dellink)
$arbitrary . .
index.php:
88a89,91
| case "delold":
| $wgArticle->$action($oid);
| break;
includes/Article.php:
943a944,986
| function delold () {
| global $wgUser, $wgOut, $wgMessageCache;
|
| $fname = "Article::DeleteOld";
| wfDebug( "$fname\n" );
|
| if ( ( ! $wgUser->isSysop() ) ) {
| $wgOut->sysopRequired();
| return;
| }
| if ( wfReadOnly() ) {
| $wgOut->readOnlyPage();
| return;
| }
| /* The following is a suggestion to store the deleted
copyvio in a seperate
| table named. I am not sure if this is useful and of
course we could use
| the archive table for this. */
| /*
| $sql = "INSERT INTO copyvio
(cv_namespace,cv_title,cv_text," .
|
"cv_comment,cv_user,cv_user_text,cv_timestamp,cv_minor_edit," .
| "cv_flags) SELECT
old_namespace,old_title,old_text,old_comment," .
|
"old_user,old_user_text,old_timestamp,old_minor_edit,old_flags " .
| "FROM old WHERE oid='{$oid}'";";
| wfQuery( $sql, DB_WRITE, $fname );
| */
| $sql = "DELETE FROM old WHERE oid='{$oid}'";
| $wgOut->addHTML( "<p>" . $sql );
| //wfQuery( $sql, DB_WRITE, $fname );
|
| $wgOut->setPagetitle( wfMsg( "actioncomplete" ) );
| $wgOut->setRobotpolicy( "noindex,nofollow" );
|
| $sk = $wgUser->getSkin();
| $loglink = $sk->makeKnownLink( $wgLang->getNsText(
| Namespace::getWikipedia() ) .
| ":" . wfMsg( "dellogpage" ), wfMsg(
"deletionlog" ) );
|
| $text = wfMsg( "deletedtext", $deleted, $loglink );
|
| $wgOut->addHTML( "<p>" . $text );
| $wgOut->returnToMain( false );
| }
|
languages/Language.php
406d405
< "Allmessages" => "All system messages",
757a757
| "del" => "del",
1170a1171
| "deletedcopyvio" => "The old version of this article has been
deleted",
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -
http://enigmail.mozdev.org
iD8DBQFAQ8baUfI+mHkmMg8RAjNVAKC98RsgJh2bXdB2sNdwRpjM4rSGwACgkjOy
JVuoifyjYctitbmxKePJ6Gw=
=uDJu
-----END PGP SIGNATURE-----