phpBB

Code Changes

File: phpbb/attachment/resync.php

  Unmodified   Added   Modified   Removed
Line 87Line 87
	 */
public function resync($type, $ids)
{

	 */
public function resync($type, $ids)
{

		if (empty($type) || !is_array($ids) || !sizeof($ids) || !in_array($type, array('post', 'topic', 'message')))

		if (empty($type) || !is_array($ids) || !count($ids) || !in_array($type, array('post', 'topic', 'message')))

		{
return;
}

		{
return;
}

Line 112Line 112
		// Now only unset those ids remaining
$ids = array_diff($ids, $remaining_ids);


		// Now only unset those ids remaining
$ids = array_diff($ids, $remaining_ids);


		if (sizeof($ids))

		if (count($ids))

		{
$sql = 'UPDATE ' . $this->resync_table . '
SET ' . $type . '_attachment = 0

		{
$sql = 'UPDATE ' . $this->resync_table . '
SET ' . $type . '_attachment = 0