Hi,
VB: 4.2.2 Patch Level 4
File: /includes/cron/cleanup2.php
This is not working because the following if clause in /includes/class_dm_attachment.php on line 909 is always "false".
The problem is located in the pre_delete method in vB_DataManager_AttachData. It returns false in the foreach loop at line 409 because there are many no more existing contenttypeids left in the older filedata entries.
Because of this issue we have possibly over 280.000 orphaned uploaded user files in our database and on the file system.
We could fix it by changing the mentioned class_dm_attachment.php from ...
(shouldn't it be "return false;" not "return $false;"? ;P)
... to ...
... but i don't know if this causes any other issues like the deletion of active files with correct refcounts or content id assignments.
VB: 4.2.2 Patch Level 4
File: /includes/cron/cleanup2.php
Code:
// Unused filedata is removed after one hour $attachdata =& datamanager_init('Filedata', $vbulletin, ERRTYPE_SILENT, 'attachment'); $attachdata->set_condition("fd.refcount = 0 AND fd.dateline < " . (TIMENOW - 3600), 1000); $attachdata->delete();
Code:
if (!$this->pre_delete($doquery) OR empty($this->lists['filedataids']))
Because of this issue we have possibly over 280.000 orphaned uploaded user files in our database and on the file system.
We could fix it by changing the mentioned class_dm_attachment.php from ...
Code:
if (!$this->pre_delete($doquery) OR empty($this->lists['filedataids'])) { return $false; }
... to ...
Code:
$this->pre_delete($doquery);
Comment