]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/schemaupdater.php
Merge branch 'master' of https://git.gnu.io/gnu/gnu-social into social-master
[quix0rs-gnu-social.git] / lib / schemaupdater.php
index ae746c10b546a4919fde4ab68f63a6943c5194cc..575080a7bc2f906327a547dd8f18c686b51b9093 100644 (file)
@@ -63,12 +63,12 @@ class SchemaUpdater
         foreach ($this->tables as $table => $def) {
             $checksum = $this->checksum($def);
             if (empty($checksums[$table])) {
-                common_log(LOG_DEBUG, "No previous schema_version for $table: updating to $checksum");
+                common_debug("No previous schema_version for $table: updating to $checksum");
             } else if ($checksums[$table] == $checksum) {
-                common_log(LOG_DEBUG, "Last schema_version for $table up to date: $checksum");
+                common_debug("Last schema_version for $table up to date: $checksum");
                 continue;
             } else {
-                common_log(LOG_DEBUG, "Last schema_version for $table is {$checksums[$table]}: updating to $checksum");
+                common_debug("Last schema_version for $table is {$checksums[$table]}: updating to $checksum");
             }
             //$this->conn->query('BEGIN');
             $this->schema->ensureTable($table, $def);
@@ -98,7 +98,6 @@ class SchemaUpdater
     {
         $checksums = array();
 
-        PEAR::pushErrorHandling(PEAR_ERROR_EXCEPTION);
         try {
             $sv = new Schema_version();
             $sv->find();
@@ -109,9 +108,8 @@ class SchemaUpdater
             return $checksums;
         } catch (Exception $e) {
             // no dice!
-            common_log(LOG_DEBUG, "Possibly schema_version table doesn't exist yet.");
+            common_debug("Possibly schema_version table doesn't exist yet.");
         }
-        PEAR::popErrorHandling();
 
         return $checksums;
     }
@@ -124,7 +122,6 @@ class SchemaUpdater
      */
     protected function saveChecksum($table, $checksum)
     {
-        PEAR::pushErrorHandling(PEAR_ERROR_EXCEPTION);
         try {
             $sv = new Schema_version();
             $sv->table_name = $table;
@@ -137,9 +134,8 @@ class SchemaUpdater
             }
         } catch (Exception $e) {
             // no dice!
-            common_log(LOG_DEBUG, "Possibly schema_version table doesn't exist yet.");
+            common_debug("Possibly schema_version table doesn't exist yet.");
         }
-        PEAR::popErrorHandling();
         $this->checksums[$table] = $checksum;
     }
 }