[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/plugins/spamx/ -> SLVreport.Action.class.php (source)

   1  <?php
   2  
   3  /**
   4  * File: SLV.Action.class.php
   5  * This is the Spam Link Verification Action class for the Geeklog Spam-X plugin
   6  *
   7  * Copyright (C) 2006 by the following authors:
   8  * Author        Dirk Haun       dirk AT haun-online DOT de
   9  *
  10  * Licensed under the GNU General Public License
  11  *
  12  * $Id: SLVreport.Action.class.php,v 1.1 2006/08/27 09:30:19 dhaun Exp $
  13  */
  14  
  15  if (strpos ($_SERVER['PHP_SELF'], 'SLVreport.Action.class.php') !== false) {
  16      die ('This file can not be used on its own!');
  17  }
  18  
  19  /**
  20  * Include Base Classes
  21  */
  22  require_once ($_CONF['path'] . 'plugins/spamx/' . 'BaseCommand.class.php');
  23  require_once ($_CONF['path'] . 'plugins/spamx/' . 'SLVbase.class.php');
  24  
  25  /**
  26  * Sends posts to SLV (linksleeve.org)
  27  *
  28  * Due to the way Spam-X works, the SLV Examine class may not have been
  29  * triggered when some other module detected the spam first. SLV needs to
  30  * see all links used in spam posts, though, to accurately detect spam. So
  31  * this class ensures that SLV sees spam detected by other Spam-X modules, too.
  32  *
  33  * @author Dirk Haun     dirk AT haun-online DOT de
  34  *
  35  * based on the works of Tom Willet (Spam-X) and Russ Jones (SLV)
  36  */
  37  class SLVreport extends BaseCommand {
  38      /**
  39       * Constructor
  40       * Numbers are always binary digits and added together to make call
  41       */
  42      function SLVreport()
  43      {
  44          global $num;
  45  
  46          // Actually, this is the code used by the DeleteComment class.
  47          // We're piggybacking on the delete operation here.
  48          $num = 128;
  49      }
  50  
  51      /**
  52       * Here we do the work
  53       */
  54      function execute ($comment)
  55      {
  56          global $result;
  57  
  58          $result = 128;
  59  
  60          if (isset ($GLOBALS['slv_triggered']) && $GLOBALS['slv_triggered']) {
  61              // the Examine class already reported these to SLV
  62              return 1;
  63          }
  64  
  65          $slv = new SLVbase();
  66          $slv->CheckForSpam ($comment);
  67  
  68          return 1;
  69      }
  70  }
  71  
  72  ?>


Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics