Floren
Well-known member
Hi Mike,
I did a quick test related to image deletion and every time I hard delete a post, the attachment info is deleted from tab,e but the physical file remains on the server. Is this the intended behavior? Because that could generate a lot of orphan files which are not visible into Attachment Browser.
Another important point related to attachments is the chmod condition for a writable dir/file. I see that you use the chmodWritableValue into configuration. Personally, I would extend it to match the proper values for both dirs and files.
Find:
Replace with:
I did a quick test related to image deletion and every time I hard delete a post, the attachment info is deleted from tab,e but the physical file remains on the server. Is this the intended behavior? Because that could generate a lot of orphan files which are not visible into Attachment Browser.
Another important point related to attachments is the chmod condition for a writable dir/file. I see that you use the chmodWritableValue into configuration. Personally, I would extend it to match the proper values for both dirs and files.
Find:
Code:
if (XenForo_Application::isRegistered('config'))
{
$chmod = XenForo_Application::get('config')->chmodWritableValue;
if ($chmod)
{
self::$_chmodDirectory = XenForo_Application::get('config')->chmodWritableValue | 0111;
self::$_chmodFile = XenForo_Application::get('config')->chmodWritableValue;
}
}
Replace with:
Code:
if (XenForo_Application::isRegistered('config'))
{
if ((bool) XenForo_Application::get('config')->chmodDirectoryValue)
{
self::$_chmodDirectory = XenForo_Application::get('config')->chmodDirectoryValue;
}
if ((bool) self::$_chmodDirectory && (bool) XenForo_Application::get('config')->chmodFileValue)
{
self::$_chmodFile = XenForo_Application::get('config')->chmodFileValue;
}
}