Shadow aok
20/09/2006, 13h41
Ce hack efface les discussions, créees par les tâches RSS, qui ne sont plus présente dans ces mêmes RSS.
EDITER : ./includes/cron/rssposter.php
Chercher
if (!empty($items))
{
Ajouter après
/*################################################# ###########
# Shadow AOK - Old RSS threads cleaner hack
#
#*/
require_once( DIR . '/includes/functions_databuild.php' );
$threadidList = array();
$rssList = $items;
$reqNotIn = '';
foreach( $rssList as $key => $value )
{
$reqNotIn .= ", '" . $rssList[$key]['contenthash'] . "'";
}
$reqNotIn = substr( $reqNotIn, 2 );
$rsslogs_result = $vbulletin->db->query_read( "
SELECT itemid FROM " . TABLE_PREFIX . "rsslog
WHERE contenthash NOT IN (" . $reqNotIn . ")
");
// Delete old rss entries which aren't present in the rss anymore
while ($rsslog = $vbulletin->db->fetch_array($rsslogs_result))
{
delete_thread( $rsslog['itemid'] );
$vbulletin->db->query_write( "DELETE FROM " . TABLE_PREFIX . "rsslog WHERE itemid = '" . $rsslog['itemid'] . "'" );
$vbulletin->db->query_write( "OPTIMIZE TABLE " . TABLE_PREFIX . "rsslog" );
}
/*#
#
# Shadow AOK - Old RSS threads cleaner hack
################################################## ##########*/
EDITER : ./includes/cron/rssposter.php
Chercher
if (!empty($items))
{
Ajouter après
/*################################################# ###########
# Shadow AOK - Old RSS threads cleaner hack
#
#*/
require_once( DIR . '/includes/functions_databuild.php' );
$threadidList = array();
$rssList = $items;
$reqNotIn = '';
foreach( $rssList as $key => $value )
{
$reqNotIn .= ", '" . $rssList[$key]['contenthash'] . "'";
}
$reqNotIn = substr( $reqNotIn, 2 );
$rsslogs_result = $vbulletin->db->query_read( "
SELECT itemid FROM " . TABLE_PREFIX . "rsslog
WHERE contenthash NOT IN (" . $reqNotIn . ")
");
// Delete old rss entries which aren't present in the rss anymore
while ($rsslog = $vbulletin->db->fetch_array($rsslogs_result))
{
delete_thread( $rsslog['itemid'] );
$vbulletin->db->query_write( "DELETE FROM " . TABLE_PREFIX . "rsslog WHERE itemid = '" . $rsslog['itemid'] . "'" );
$vbulletin->db->query_write( "OPTIMIZE TABLE " . TABLE_PREFIX . "rsslog" );
}
/*#
#
# Shadow AOK - Old RSS threads cleaner hack
################################################## ##########*/