/[drupal]/contributions/modules/similarity/similarity.inc
ViewVC logotype

Diff of /contributions/modules/similarity/similarity.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.7, Wed Apr 29 22:28:52 2009 UTC revision 1.1.2.8, Mon Jun 1 04:56:21 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: similarity.inc,v 1.1.2.6 2009/04/24 04:39:06 scottreynolds Exp $  // $Id: similarity.inc,v 1.1.2.7 2009/04/29 22:28:52 scottreynolds Exp $
3    
4  /**  /**
5   * @file similarity.inc   * @file similarity.inc
# Line 217  abstract class similarity { Line 217  abstract class similarity {
217    
218      $this->data = serialize($form_values);      $this->data = serialize($form_values);
219    }    }
   
   /**  
    * Clean up the table by removing stale similarity entries  
    *  
    * Used by classes that have circular calculations  
    * i.e taxonomy calculations where it is impossible to determine when a term  
    * was added thus, impossible to determine when something "changed"  
    * to tell if the information has changed.  
    *  
    * Others should override this function (i.e Search similarity)  
    *  
    * @param int $offset  
    * a provided offset to subtract from the created  
    * ie (number of days)  
    */  
   protected function cleanup($offset = 0) {  
     db_query("DELETE FROM {" . $this->machine_name . "_similarity} WHERE created < created - %d", time() - $offset);  
   }  
220  }  }
221    
222  /**  /**

Legend:
Removed from v.1.1.2.7  
changed lines
  Added in v.1.1.2.8

  ViewVC Help
Powered by ViewVC 1.1.2