/** * Constructor: builds array of $changeItems by processing the .sql files in a folder. * The folder for the Joomla core updates is `administrator/components/com_admin/sql/updates/`. * * @param \JDatabaseDriver $db The current database object * @param string $folder The full path to the folder containing the update queries * * @since 2.5 */ public function __construct($db, $folder = null) { $this->db = $db; $this->folder = $folder; $updateFiles = $this->getUpdateFiles(); $updateQueries = $this->getUpdateQueries($updateFiles); foreach ($updateQueries as $obj) { $changeItem = ChangeItem::getInstance($db, $obj->file, $obj->updateQuery); if ($changeItem->queryType === 'UTF8CNV') {