/** * get applied patches from version table * returns null if version table is not found */ private function applied_patches() { if (!$this->hasVersionTable()) { return null; } $patches = array(); // check for old table format if (!$this->hasVersionLog()) { // old table, return versions based ver_version value $last_patch = $this->db->getOne('SELECT ver_version FROM {{%version}}'); for ($i = 1; $i <= $last_patch; $i++) { $patches[$i] = time(); } return $patches; } $patches = $this->db->getPair('SELECT ver_version,ver_timestamp FROM {{%version}} ORDER BY 1'); return $patches; }