Пример #1
0
 /**
  * @param string $plugin_id
  * @param integer $revision
  * @return boolean
  */
 static function hasPatchRun($plugin_id, $revision)
 {
     $tables = DevblocksPlatform::getDatabaseTables();
     if (empty($tables)) {
         return false;
     }
     $db = DevblocksPlatform::getDatabaseService();
     $prefix = APP_DB_PREFIX != '' ? APP_DB_PREFIX . '_' : '';
     // [TODO] Cleanup
     // [JAS]: [TODO] Does the GTE below do what we need with the primary key mucking up redundant patches?
     $sql = sprintf("SELECT run_date FROM %spatch_history WHERE plugin_id = %s AND revision >= %d", $prefix, $db->qstr($plugin_id), $revision);
     if ($db->GetOne($sql)) {
         return true;
     }
     return false;
 }