예제 #1
0
 /**
  * Save or update current available checksums.
  *
  * @param string $table
  * @param string $checksum
  */
 protected function saveChecksum($table, $checksum)
 {
     try {
         $sv = new Schema_version();
         $sv->table_name = $table;
         $sv->checksum = $checksum;
         $sv->modified = common_sql_now();
         if (isset($this->checksums[$table])) {
             $sv->update();
         } else {
             $sv->insert();
         }
     } catch (Exception $e) {
         // no dice!
         common_log(LOG_DEBUG, "Possibly schema_version table doesn't exist yet.");
     }
     $this->checksums[$table] = $checksum;
 }
예제 #2
0
 /**
  * Save or update current available checksums.
  *
  * @param string $table
  * @param string $checksum
  */
 protected function saveChecksum($table, $checksum)
 {
     PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
     try {
         $sv = new Schema_version();
         $sv->table_name = $table;
         $sv->checksum = $checksum;
         $sv->modified = common_sql_now();
         if (isset($this->checksums[$table])) {
             $sv->update();
         } else {
             $sv->insert();
         }
     } catch (Exception $e) {
         // no dice!
         common_debug("Possibly schema_version table doesn't exist yet.");
     }
     PEAR::popErrorHandling();
     $this->checksums[$table] = $checksum;
 }