Skip to content

Commit

Permalink
ignoring deleted revisions (via https://de.wikipedia.org/w/index.php?…
Browse files Browse the repository at this point in the history
…title=Benutzer_Diskussion%3AFlominator%2FWikiBlame&type=revision&diff=152545298&oldid=151520670 ) and fixing typo in ignoring of minor revisions (apparently never worked)
  • Loading branch information
FlominatorTM committed Mar 28, 2016
1 parent d43228c commit a91ae14
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions wikiblame.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,22 +621,27 @@ function listversions ($history)

//result: <a href="/w/index.php?title=Hinterzarten&amp;oldid=64569839" title="Hinterzarten">11:27, 16. Sep. 2009

if($ignore_minors)
$is_deleted_revision = stristr($one_version, 'mw-userlink'); //there is no revision link

if(!$is_deleted_revision)
{
//checks if the revision was marked as minor edit
if(!stristr($one_version_link, "<span class=\"minor\">"))
if($ignore_minors)
{
$versions[]= $one_version;
//checks if the revision was marked as minor edit
if(!stristr($one_version, "<span class=\"minor\">"))
{
$versions[]= $one_version;
}
else
{
//echo "ignored a minor change";
}
}
else
{
//echo "ignored a minor change";
$versions[]= $one_version;
}
}
else
{
$versions[]= $one_version;
}
}

if($asc==true)
Expand Down

0 comments on commit a91ae14

Please sign in to comment.