Revision history for DeleteSpamAction


Revision [19144]

Last edited on 2008-01-28 00:14:03 by CharlesNepote [Modified links pointing to docs server]

No Differences

Revision [16888]

Edited on 2007-05-31 23:27:00 by CharlesNepote [Reverted]
Additions:
Ok, this is the translated (with very minor additions) version of the admin action to delete spam from [[http://www.wikini.net/wakka.php?wiki=DiscussionsActionDAdministrationEraseSpam Wikini]] that GmBowen linked to on the ProgrammingHelp in RichardBerg's request for help fixing his site after a spambot attack.

I've changed all the actual variables and documentation to English, and added a couple of order by clauses to clean up the display page. Other than that, it's all [[http://www.wikini.net/wakka.php?wiki=CharlesNepote his]].

Caveat: I haven't been able to try this out all the way; it loads the first form (where you input the IP or username of the spammer) and the second page listing all the page revisions attributed to that IP or username just fine, but I haven't tested it any further because the only installation I have up right now is live. :\ Maybe it could be tried on the beta site?

There's **no** authentication to make sure it's an admin doing the deleting, so I would suggest using it only on a secured page where you're the only person with access to it, and then I'd delete the function and action page when you're done.

~&The following should do this:
~&just enwrap the whole action after the comment with:
~&%%(php)
if ($this->IsAdmin())
{
%% and %%(php)
}
else
{
echo 'Sorry, but because of security reasons, this action is only available for admins.';
}
%% I just wonder if it is faster to add if(!GetUser) to the if to close out "not logged-in users" in the first point and making IsAdmin needless in this case? --NilsLindenberg
~~& Cool, thanks, good to know. :) --MovieLady

But hey, it's a starting point! :)

Save this as actions/deletespam.php (up to you, I suppose *g*)

%%(php)
<?php
// Charles Népote 2005
// License GPL.
// Version 0.1 du 22/01/2005.
// Translated to English and minor changes by MovieLady 1/23/2005

echo "\n<!-- == Action erase spam ============================= -->\n";
echo "<style type=\"text/css\">",
"p { margin: 0; }",
".action_erasespam { background-color: yellow; }",
"</style>\n";

// Display the form to enter the spammer's ID or IP address
if(!isset($_REQUEST['spammer']))
{
echo "<div class=\"action_erasespam\">\n",
"<form method=\"get\" action=\"". $this->Href() . "\" name=\"selection\">\n",
"<fieldset>\n",
"<legend>Revert spammed pages to previous version</legend>\n",
"<input type=\"hidden\" name=\"wiki\" value=\"" . $this->GetPageTag() . "\" />\n",
"<p>Name of the user: <input name=\"spammer\" /> ",
"<button value=\"Valider\">Submit</button></p>\n",
"</fieldset>\n",
"</form>\n",
"</div>\n";
}

// Results page and form to select which histories to erase
// added order by time ascending to the sql statement to clean up the display list --ML
else if(!isset($_REQUEST['erase']))
{
// Select all the current pages revised by this user
$request =
"select *
from ".$this->config["table_prefix"]."pages
where user = '" . $_REQUEST['spammer'] . "' and latest = 'Y' order by time asc";
$pagesFromSpammer = $this->LoadAll($request);

// Display the list of pages that have been vandalized
echo "<div class=\"action_erasespam\">\n";
echo "<p>Clean up the pages vandalized by " . $_REQUEST['spammer'] . "</p>\n";
echo "<form method=\"get\" action=\"". $this->Href() . "\">\n",
"<input type=\"hidden\" name=\"wiki\" value=\"" . $this->GetPageTag() . "\" />\n";
foreach ($pagesFromSpammer as $i => $page)
{
echo "<p><input name=\"" . $page["tag"] . "\" type=\"checkbox\">",
"(", $page["time"], ") ",
"(",$this->ComposeLinkToPage($page["tag"], "revisions", "history", 0),") ",
$this->ComposeLinkToPage($page["tag"], "", "", 0),
" . . . . ",$this->Format($page["user"]),"</p>\n" ;
}
echo "<input type=\"hidden\" name=\"spammer\" value=\"" . $_REQUEST['spammer'] . "\" />\n";
echo "<input type=\"hidden\" name=\"erase\" value=\"yes\" />\n";
echo "<p><button value=\"Valider\">Delete the selected page revisions</button></p>\n";
echo "</form>\n";
echo "</div>\n";
}

//
else
{
$deletedPages = "";

// Select all the current pages revised by this user
// added order by time ascending to the sql statement to clean up the display list --ML
$request1 =
"select *
from ".$this->config["table_prefix"]."pages
where user = '" . $_REQUEST['spammer'] . "' and latest = 'Y' order by time asc";
$pagesFromSpammer = $this->LoadAll($request1);

// For each selected page
foreach ($pagesFromSpammer as $i => $page)
{
// If the box is checked (marking that version of the page as having been spammed)
if (isset($_REQUEST[$page["tag"]]))
{
$requestPageBefore =
"select * " .
"from " . $this->config["table_prefix"] . "pages " .
"where tag = '" . $page["tag"] . "' " .
"and time < '" . $page["time"] . "' " .
"order by `time` desc limit 1";
$pageBefore = $this->LoadSingle($requestPageBefore);
if (!empty($pageBefore))
{
// Delete the selected page history
$requestDelete =
"delete from " . $this->config["table_prefix"] . "pages " .
"where id = '" . $page["id"] . "' and tag = '" . $page["tag"] . "' " .
"limit 1";
$this->Query($requestDelete);
//echo "$$$$$$$$$$$$$$";
$deletedPages .= $page["tag"] . " ";

// Make the previous revision the latest version
$makeLatest =
"update " . $this->config["table_prefix"] . "pages " .
"set latest = 'Y' where id = '" . $pageBefore["id"] . "' and tag = '" . $page["tag"] . "' " .
"limit 1";
$this->Query($makeLatest);
}
}
}
echo "<div class=\"action_erasespam\">\n";
echo "Pages deleted : ", $this->Format($deletedPages), "\n";
echo "</div>\n\n";
}

?>
%%

Ok, now in /wakka.php, you need to add the following (after backing up the file!):

%%(php)
function ComposeLinkToPage($tag, $method = "", $text = "", $track = 1)
{
if (!$text) $text = $tag;
$text = htmlentities($text);
if ($_SESSION["linktracking"] && $track)
$this->TrackLinkTo($tag);
return '<a href="'.$this->href($method, $tag).'">'.$text.'</a>';
}
%%

I added it right after where "function Link" closed and before the commented out "function ""PregPageLink""" - it was about line 475.

So, there's the jumping off point.

~&Looking through the code, one thing I note is that this will only "catch" and clear **current** pages that are spammed/defaced; if they have been changed by someone else afterwards already, they will remain in the archive... I was thinking of a different approach (without this problem) but a "jumping off point" like this will certainly help. Thanks for the contribution, MovieLady! --JavaWoman
~~& (Welcome. *g*) Yep, it does. If you changed the where clauses to grab pages where latest = 'N', you could delete the $makelatest statement and then have a separate action to delete only spammed history, rather than the active pages. Kind of a pain to have them separated like that, but it could work until something is written from scratch to combine the two. :) --MovieLady
~~~& Thinking about it, though (and talking to myself *g*), I think all you'd need would be an if/else statement around the $makelatest command - if latest = 'Y' make the previous version the active page, else don't. --MovieLady
~~~~& And probably should separate the pages in the display list by whether they're history or the latest version of the page, so that it's visibly obvious to the admin which is which. -- MovieLady
~~&Offtopic: We do need a "page in work flag" :) --NilsLindenberg
~~~&Yes :) --JavaWoman

Ahem, I published a 0.5 version with much improvements. I will think about your remarks. I plan to finish the action in about 2 or 3 weeks ; with :
- [done] a reporting page where the action log automatically who done what : ex :
- (2005-01-27 18:35:41) This pages have been cleaned by CharlesNepote [SPAM from aa.bb.ru linking on porn sites] : DeleteSpamAction, SandBox.
- (note this is very important to prevent abuses if there are other admins)
- [done] possibility to add a comment in the log
- [done] possibility to choose the log page :
- from a parameter : ""{{erasespam logpage="SpamReport"}}""
- or, by default, the current page
- possibility to list pages between two dates
- possibility to clean older versions of a page
- and so on
-- CharlesNepote

----
==== To do list ====

(Some of which is already done, but needs a little adjusting or testing)

1) Encorporate the admin-access-only code
1) Expand this so it:
a) brings up //all// of the pages that have been altered by the user
a) marks them as current or previous version, and
i) if it's a history page, just delete it
i) if it's the most recent version of the page, delete the page and mark the previous version of the page as the current version
1) Add a tick box that selects all the pages for ease of mass spam removal

----
CategoryUserContributions
Deletions:
Ok, this is the translated (with very minor additions) version of the admin action to delete spam from [[http://www.wikini.net/wakka.php?wiki=DiscussionsActionDAdministrationEraseSpam Wikini]] that GmBowen linked to on the ProgrammingHelp in RichardBerg's request for help fixing his site after a spambot attack.

I've changed all the actual variables and documentation to English, and added a couple of order by clauses to clean up the display page. Other than that, it's all [[http://www.wikini.net/wakka.php?wiki=CharlesNepote his]].

Caveat: I haven't been able to try this out all the way; it loads the first form (where you input the IP or username of the spammer) and the second page listing all the page revisions attributed to that IP or username just fine, but I haven't tested it any further because the only installation I have up right now is live. :\ Maybe it could be tried on the beta site?

There's **no** authentication to make sure it's an admin doing the deleting, so I would suggest using it only on a secured page where you're the only person with access to it, and then I'd delete the function and action page when you're done.

~


Revision [16686]

Edited on 2007-05-31 10:36:06 by Kx5Twc [Reverted]
Additions:
Ok, this is the translated (with very minor additions) version of the admin action to delete spam from [[http://www.wikini.net/wakka.php?wiki=DiscussionsActionDAdministrationEraseSpam Wikini]] that GmBowen linked to on the ProgrammingHelp in RichardBerg's request for help fixing his site after a spambot attack.

I've changed all the actual variables and documentation to English, and added a couple of order by clauses to clean up the display page. Other than that, it's all [[http://www.wikini.net/wakka.php?wiki=CharlesNepote his]].

Caveat: I haven't been able to try this out all the way; it loads the first form (where you input the IP or username of the spammer) and the second page listing all the page revisions attributed to that IP or username just fine, but I haven't tested it any further because the only installation I have up right now is live. :\ Maybe it could be tried on the beta site?

There's **no** authentication to make sure it's an admin doing the deleting, so I would suggest using it only on a secured page where you're the only person with access to it, and then I'd delete the function and action page when you're done.

~
Deletions:
Ok, this is the translated (with very minor additions) version of the admin action to delete spam from [[http://www.wikini.net/wakka.php?wiki=DiscussionsActionDAdministrationEraseSpam Wikini]] that GmBowen linked to on the ProgrammingHelp in RichardBerg's request for help fixing his site after a spambot attack.

I've changed all the actual variables and documentation to English, and added a couple of order by clauses to clean up the display page. Other than that, it's all [[http://www.wikini.net/wakka.php?wiki=CharlesNepote his]].

Caveat: I haven't been able to try this out all the way; it loads the first form (where you input the IP or username of the spammer) and the second page listing all the page revisions attributed to that IP or username just fine, but I haven't tested it any further because the only installation I have up right now is live. :\ Maybe it could be tried on the beta site?

There's **no** authentication to make sure it's an admin doing the deleting, so I would suggest using it only on a secured page where you're the only person with access to it, and then I'd delete the function and action page when you're done.

~&The following should do this:
~&just enwrap the whole action after the comment with:
~&%%(php)
if ($this->IsAdmin())
{
%% and %%(php)
}
else
{
echo 'Sorry, but because of security reasons, this action is only available for admins.';
}
%% I just wonder if it is faster to add if(!GetUser) to the if to close out "not logged-in users" in the first point and making IsAdmin needless in this case? --NilsLindenberg
~~& Cool, thanks, good to know. :) --MovieLady

But hey, it's a starting point! :)

Save this as actions/deletespam.php (up to you, I suppose *g*)

%%(php)
<?php
// Charles Népote 2005
// License GPL.
// Version 0.1 du 22/01/2005.
// Translated to English and minor changes by MovieLady 1/23/2005

echo "\n<!-- == Action erase spam ============================= -->\n";
echo "<style type=\"text/css\">",
"p { margin: 0; }",
".action_erasespam { background-color: yellow; }",
"</style>\n";

// Display the form to enter the spammer's ID or IP address
if(!isset($_REQUEST['spammer']))
{
echo "<div class=\"action_erasespam\">\n",
"<form method=\"get\" action=\"". $this->Href() . "\" name=\"selection\">\n",
"<fieldset>\n",
"<legend>Revert spammed pages to previous version</legend>\n",
"<input type=\"hidden\" name=\"wiki\" value=\"" . $this->GetPageTag() . "\" />\n",
"<p>Name of the user: <input name=\"spammer\" /> ",
"<button value=\"Valider\">Submit</button></p>\n",
"</fieldset>\n",
"</form>\n",
"</div>\n";
}

// Results page and form to select which histories to erase
// added order by time ascending to the sql statement to clean up the display list --ML
else if(!isset($_REQUEST['erase']))
{
// Select all the current pages revised by this user
$request =
"select *
from ".$this->config["table_prefix"]."pages
where user = '" . $_REQUEST['spammer'] . "' and latest = 'Y' order by time asc";
$pagesFromSpammer = $this->LoadAll($request);

// Display the list of pages that have been vandalized
echo "<div class=\"action_erasespam\">\n";
echo "<p>Clean up the pages vandalized by " . $_REQUEST['spammer'] . "</p>\n";
echo "<form method=\"get\" action=\"". $this->Href() . "\">\n",
"<input type=\"hidden\" name=\"wiki\" value=\"" . $this->GetPageTag() . "\" />\n";
foreach ($pagesFromSpammer as $i => $page)
{
echo "<p><input name=\"" . $page["tag"] . "\" type=\"checkbox\">",
"(", $page["time"], ") ",
"(",$this->ComposeLinkToPage($page["tag"], "revisions", "history", 0),") ",
$this->ComposeLinkToPage($page["tag"], "", "", 0),
" . . . . ",$this->Format($page["user"]),"</p>\n" ;
}
echo "<input type=\"hidden\" name=\"spammer\" value=\"" . $_REQUEST['spammer'] . "\" />\n";
echo "<input type=\"hidden\" name=\"erase\" value=\"yes\" />\n";
echo "<p><button value=\"Valider\">Delete the selected page revisions</button></p>\n";
echo "</form>\n";
echo "</div>\n";
}

//
else
{
$deletedPages = "";

// Select all the current pages revised by this user
// added order by time ascending to the sql statement to clean up the display list --ML
$request1 =
"select *
from ".$this->config["table_prefix"]."pages
where user = '" . $_REQUEST['spammer'] . "' and latest = 'Y' order by time asc";
$pagesFromSpammer = $this->LoadAll($request1);

// For each selected page
foreach ($pagesFromSpammer as $i => $page)
{
// If the box is checked (marking that version of the page as having been spammed)
if (isset($_REQUEST[$page["tag"]]))
{
$requestPageBefore =
"select * " .
"from " . $this->config["table_prefix"] . "pages " .
"where tag = '" . $page["tag"] . "' " .
"and time < '" . $page["time"] . "' " .
"order by `time` desc limit 1";
$pageBefore = $this->LoadSingle($requestPageBefore);
if (!empty($pageBefore))
{
// Delete the selected page history
$requestDelete =
"delete from " . $this->config["table_prefix"] . "pages " .
"where id = '" . $page["id"] . "' and tag = '" . $page["tag"] . "' " .
"limit 1";
$this->Query($requestDelete);
//echo "$$$$$$$$$$$$$$";
$deletedPages .= $page["tag"] . " ";

// Make the previous revision the latest version
$makeLatest =
"update " . $this->config["table_prefix"] . "pages " .
"set latest = 'Y' where id = '" . $pageBefore["id"] . "' and tag = '" . $page["tag"] . "' " .
"limit 1";
$this->Query($makeLatest);
}
}
}
echo "<div class=\"action_erasespam\">\n";
echo "Pages deleted : ", $this->Format($deletedPages), "\n";
echo "</div>\n\n";
}

?>
%%

Ok, now in /wakka.php, you need to add the following (after backing up the file!):

%%(php)
function ComposeLinkToPage($tag, $method = "", $text = "", $track = 1)
{
if (!$text) $text = $tag;
$text = htmlentities($text);
if ($_SESSION["linktracking"] && $track)
$this->TrackLinkTo($tag);
return '<a href="'.$this->href($method, $tag).'">'.$text.'</a>';
}
%%

I added it right after where "function Link" closed and before the commented out "function ""PregPageLink""" - it was about line 475.

So, there's the jumping off point.

~&Looking through the code, one thing I note is that this will only "catch" and clear **current** pages that are spammed/defaced; if they have been changed by someone else afterwards already, they will remain in the archive... I was thinking of a different approach (without this problem) but a "jumping off point" like this will certainly help. Thanks for the contribution, MovieLady! --JavaWoman
~~& (Welcome. *g*) Yep, it does. If you changed the where clauses to grab pages where latest = 'N', you could delete the $makelatest statement and then have a separate action to delete only spammed history, rather than the active pages. Kind of a pain to have them separated like that, but it could work until something is written from scratch to combine the two. :) --MovieLady
~~~& Thinking about it, though (and talking to myself *g*), I think all you'd need would be an if/else statement around the $makelatest command - if latest = 'Y' make the previous version the active page, else don't. --MovieLady
~~~~& And probably should separate the pages in the display list by whether they're history or the latest version of the page, so that it's visibly obvious to the admin which is which. -- MovieLady
~~&Offtopic: We do need a "page in work flag" :) --NilsLindenberg
~~~&Yes :) --JavaWoman

Ahem, I published a 0.5 version with much improvements. I will think about your remarks. I plan to finish the action in about 2 or 3 weeks ; with :
- [done] a reporting page where the action log automatically who done what : ex :
- (2005-01-27 18:35:41) This pages have been cleaned by CharlesNepote [SPAM from aa.bb.ru linking on porn sites] : DeleteSpamAction, SandBox.
- (note this is very important to prevent abuses if there are other admins)
- [done] possibility to add a comment in the log
- [done] possibility to choose the log page :
- from a parameter : ""{{erasespam logpage="SpamReport"}}""
- or, by default, the current page
- possibility to list pages between two dates
- possibility to clean older versions of a page
- and so on
-- CharlesNepote

----
==== To do list ====

(Some of which is already done, but needs a little adjusting or testing)

1) Encorporate the admin-access-only code
1) Expand this so it:
a) brings up //all// of the pages that have been altered by the user
a) marks them as current or previous version, and
i) if it's a history page, just delete it
i) if it's the most recent version of the page, delete the page and mark the previous version of the page as the current version
1) Add a tick box that selects all the pages for ease of mass spam removal

----
CategoryUserContributions


Revision [5353]

Edited on 2005-01-28 22:32:22 by CharlesNepote [V 0.5 is out]
Additions:
Ahem, I published a 0.5 version with much improvements. I will think about your remarks. I plan to finish the action in about 2 or 3 weeks ; with :
- [done] a reporting page where the action log automatically who done what : ex :
- (2005-01-27 18:35:41) This pages have been cleaned by CharlesNepote [SPAM from aa.bb.ru linking on porn sites] : DeleteSpamAction, SandBox.
- (note this is very important to prevent abuses if there are other admins)
- [done] possibility to add a comment in the log
- [done] possibility to choose the log page :
- from a parameter : ""{{erasespam logpage="SpamReport"}}""
- or, by default, the current page
- possibility to list pages between two dates
- possibility to clean older versions of a page
- and so on
Deletions:
Ahem, I published a 0.3 version ''(now at 0.4)--gmb'' with much improvments. I will think about your remarks. I plan to finish the action in about 2 or 3 weeks ; with :
- [done] a reporting page where the action log automatically who done what : ex : (2005-01-27 18:35:41) This pages have been ++washed++ ''cleaned'' by CharlesNepote : DeleteSpamAction, SandBox.
(note this is very important to prevent abuses if there are other admins)
- possibility to list pages between two dates
- and so on


Revision [5348]

Edited on 2005-01-28 18:05:22 by GmBowen [updated release info of action from wikini]
Additions:
Ahem, I published a 0.3 version ''(now at 0.4)--gmb'' with much improvments. I will think about your remarks. I plan to finish the action in about 2 or 3 weeks ; with :
- [done] a reporting page where the action log automatically who done what : ex : (2005-01-27 18:35:41) This pages have been ++washed++ ''cleaned'' by CharlesNepote : DeleteSpamAction, SandBox.
Deletions:
Ahem, I published a 0.3 version with much improvments. I will think about your remarks. I plan to finish the action in about 2 or 3 weeks ; with :
- [done] a reporting page where the action log automatically who done what : ex : (2005-01-27 18:35:41) This pages have been washed by CharlesNepote : DeleteSpamAction, SandBox.


Revision [5283]

Edited on 2005-01-27 18:18:24 by CharlesNepote [V 0.3 is out !]
Additions:
Ahem, I published a 0.3 version with much improvments. I will think about your remarks. I plan to finish the action in about 2 or 3 weeks ; with :
- [done] a reporting page where the action log automatically who done what : ex : (2005-01-27 18:35:41) This pages have been washed by CharlesNepote : DeleteSpamAction, SandBox.
(note this is very important to prevent abuses if there are other admins)
- possibility to list pages between two dates
- and so on
-- CharlesNepote


Revision [5180]

Edited on 2005-01-25 16:04:51 by MovieLady [added to do list]
Additions:
==== To do list ====
(Some of which is already done, but needs a little adjusting or testing)
1) Encorporate the admin-access-only code
1) Expand this so it:
a) brings up //all// of the pages that have been altered by the user
a) marks them as current or previous version, and
i) if it's a history page, just delete it
i) if it's the most recent version of the page, delete the page and mark the previous version of the page as the current version
1) Add a tick box that selects all the pages for ease of mass spam removal


Revision [5121]

Edited on 2005-01-24 16:40:15 by MovieLady [and another comment]
Additions:
~~~~& And probably should separate the pages in the display list by whether they're history or the latest version of the page, so that it's visibly obvious to the admin which is which. -- MovieLady


Revision [5120]

Edited on 2005-01-24 16:32:20 by JavaWoman [fixing inline comments]
Additions:
~~& (Welcome. *g*) Yep, it does. If you changed the where clauses to grab pages where latest = 'N', you could delete the $makelatest statement and then have a separate action to delete only spammed history, rather than the active pages. Kind of a pain to have them separated like that, but it could work until something is written from scratch to combine the two. :) --MovieLady
~~~& Thinking about it, though (and talking to myself *g*), I think all you'd need would be an if/else statement around the $makelatest command - if latest = 'Y' make the previous version the active page, else don't. --MovieLady
Deletions:
~~~& (Welcome. *g*) Yep, it does. If you changed the where clauses to grab pages where latest = 'N', you could delete the $makelatest statement and then have a separate action to delete only spammed history, rather than the active pages. Kind of a pain to have them separated like that, but it could work until something is written from scratch to combine the two. :) --MovieLady
~~~~& Thinking about it, though (and talking to myself *g*), I think all you'd need would be an if/else statement around the $makelatest command - if latest = 'Y' make the previous version the active page, else don't. --MovieLady


Revision [5118]

Edited on 2005-01-24 16:22:17 by MovieLady [responses]
Additions:
~~~~& Thinking about it, though (and talking to myself *g*), I think all you'd need would be an if/else statement around the $makelatest command - if latest = 'Y' make the previous version the active page, else don't. --MovieLady


Revision [5116]

Edited on 2005-01-24 16:16:10 by MovieLady [responses]
Additions:
// Charles Népote 2005
Deletions:
// Charles N�pote 2005


Revision [5114]

Edited on 2005-01-24 16:15:33 by MovieLady [responses]
Additions:
~~& Cool, thanks, good to know. :) --MovieLady
Save this as actions/deletespam.php (up to you, I suppose *g*)
// Charles N�pote 2005
// Select all the current pages revised by this user
// Select all the current pages revised by this user
~~~& (Welcome. *g*) Yep, it does. If you changed the where clauses to grab pages where latest = 'N', you could delete the $makelatest statement and then have a separate action to delete only spammed history, rather than the active pages. Kind of a pain to have them separated like that, but it could work until something is written from scratch to combine the two. :) --MovieLady
Deletions:
actions/deletespam.php (up to you, I suppose *g*)
// Charles Népote 2005
// Select all the pages revised by this user
// Select all the pages revised by this user


Revision [5062]

Edited on 2005-01-24 12:08:17 by JavaWoman [layout inline comments]
Additions:
%% and %%(php)
%% I just wonder if it is faster to add if(!GetUser) to the if to close out "not logged-in users" in the first point and making IsAdmin needless in this case? --NilsLindenberg
~~&Offtopic: We do need a "page in work flag" :) --NilsLindenberg
~~~&Yes :) --JavaWoman
Deletions:
~&and
~&I just wonder if it is faster to add if(!GetUser) to the if to close out "not logged-in users" in the first point and making IsAdmin needless in this case? --NilsLindenberg
~~&Offtopi: We do need a "page in work flag" :) --NilsLindenberg


Revision [5060]

Edited on 2005-01-24 11:28:01 by NilsLindenberg [cat. + admin authentication]
Additions:
~&The following should do this:
~&just enwrap the whole action after the comment with:
~&%%(php)
if ($this->IsAdmin())
~&and
~&%%(php)
echo 'Sorry, but because of security reasons, this action is only available for admins.';
~&I just wonder if it is faster to add if(!GetUser) to the if to close out "not logged-in users" in the first point and making IsAdmin needless in this case? --NilsLindenberg
~~&Offtopi: We do need a "page in work flag" :) --NilsLindenberg
----
CategoryUserContributions
Deletions:


Revision [5059]

Edited on 2005-01-24 11:24:22 by JavaWoman [ypots]
Additions:
~&Looking through the code, one thing I note is that this will only "catch" and clear **current** pages that are spammed/defaced; if they have been changed by someone else afterwards already, they will remain in the archive... I was thinking of a different approach (without this problem) but a "jumping off point" like this will certainly help. Thanks for the contribution, MovieLady! --JavaWoman
Deletions:
~&Looking through the code, one thing I note is that this will only "catch" and clear **current** pages that are spammed/defaced; if they have been changed by someone else afterwards already, they will remain in the archive... I was thinking of a different appraoch (without this problem) but a "jumping off point like this will certainly help. Thanks for the contribution, MovieLady! --JavaWoman


Revision [5058]

Edited on 2005-01-24 11:23:34 by JavaWoman [adding comment]
Additions:
So, there's the jumping off point.
~&Looking through the code, one thing I note is that this will only "catch" and clear **current** pages that are spammed/defaced; if they have been changed by someone else afterwards already, they will remain in the archive... I was thinking of a different appraoch (without this problem) but a "jumping off point like this will certainly help. Thanks for the contribution, MovieLady! --JavaWoman
Deletions:
So, there's the jumping off point.


Revision [5041]

Edited on 2005-01-24 08:20:04 by MovieLady [adding comment]
Additions:
// Translated to English and minor changes by MovieLady 1/23/2005
Deletions:
// Translated to English and minor changes by MovieLady ([email protected]) 1/23/2005


Revision [5039]

Edited on 2005-01-24 08:04:19 by MovieLady [new page]
Additions:
Ok, this is the translated (with very minor additions) version of the admin action to delete spam from [[http://www.wikini.net/wakka.php?wiki=DiscussionsActionDAdministrationEraseSpam Wikini]] that GmBowen linked to on the ProgrammingHelp in RichardBerg's request for help fixing his site after a spambot attack.
I've changed all the actual variables and documentation to English, and added a couple of order by clauses to clean up the display page. Other than that, it's all [[http://www.wikini.net/wakka.php?wiki=CharlesNepote his]].
Deletions:
Ok, this is the translated (with very minor additions) version of the admin action to delete spam from [[http://www.wikini.net/wakka.php?wiki=DiscussionsActionDAdministrationEraseSpam Wikini]] that GmBowen linked to. I've changed all the actual variables and documentation to English, and added a couple of order by clauses to clean up the display page. Other than that, it's all [[http://www.wikini.net/wakka.php?wiki=CharlesNepote his]].


Revision [5038]

The oldest known version of this page was created on 2005-01-24 08:03:13 by MovieLady [new page]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki