| 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 |
| 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 |
/** |
/** |