phpBB

Code Changes

File: phpbb/db/migration/data/v320/remove_outdated_media.php

  Unmodified   Added   Modified   Removed
Line 15Line 15

class remove_outdated_media extends \phpbb\db\migration\migration
{


class remove_outdated_media extends \phpbb\db\migration\migration
{

 
	// Following constants were deprecated in 3.2
// and moved from constants.php to compatibility_globals.php,
// thus define them as class constants
const ATTACHMENT_CATEGORY_WM = 2;
const ATTACHMENT_CATEGORY_RM = 3;
const ATTACHMENT_CATEGORY_QUICKTIME = 6;


	protected $cat_id = array(

	protected $cat_id = array(

			ATTACHMENT_CATEGORY_WM,
ATTACHMENT_CATEGORY_RM,
ATTACHMENT_CATEGORY_QUICKTIME,

			self::ATTACHMENT_CATEGORY_WM,
self::ATTACHMENT_CATEGORY_RM,
self::ATTACHMENT_CATEGORY_QUICKTIME,

		);

static public function depends_on()

		);

static public function depends_on()

Line 78Line 85
				WHERE ' . $this->db->sql_in_set('group_id', $group_ids);
}


				WHERE ' . $this->db->sql_in_set('group_id', $group_ids);
}


		$result = $this->db->sql_query($sql);
$this->db->sql_freeresult($result);

		$this->db->sql_query($sql);



// delete the now empty, outdated media extension groups
$sql = 'DELETE FROM ' . EXTENSION_GROUPS_TABLE . '
WHERE ' . $this->db->sql_in_set('group_id', $group_ids);


// delete the now empty, outdated media extension groups
$sql = 'DELETE FROM ' . EXTENSION_GROUPS_TABLE . '
WHERE ' . $this->db->sql_in_set('group_id', $group_ids);

		$result = $this->db->sql_query($sql);
$this->db->sql_freeresult($result);

		$this->db->sql_query($sql);


	}
}


	}
}