Merge "Update formatting of file backend classes"
[lhc/web/wiklou.git] / includes / filebackend / filejournal / DBFileJournal.php
index 73f29a9..42f4f1a 100644 (file)
@@ -56,6 +56,7 @@ class DBFileJournal extends FileJournal {
                        $dbw = $this->getMasterDB();
                } catch ( DBError $e ) {
                        $status->fatal( 'filejournal-fail-dbconnect', $this->backend );
+
                        return $status;
                }
 
@@ -65,11 +66,11 @@ class DBFileJournal extends FileJournal {
                foreach ( $entries as $entry ) {
                        $data[] = array(
                                'fj_batch_uuid' => $batchId,
-                               'fj_backend'    => $this->backend,
-                               'fj_op'         => $entry['op'],
-                               'fj_path'       => $entry['path'],
-                               'fj_new_sha1'   => $entry['newSha1'],
-                               'fj_timestamp'  => $dbw->timestamp( $now )
+                               'fj_backend' => $this->backend,
+                               'fj_op' => $entry['op'],
+                               'fj_path' => $entry['path'],
+                               'fj_new_sha1' => $entry['newSha1'],
+                               'fj_timestamp' => $dbw->timestamp( $now )
                        );
                }
 
@@ -80,6 +81,7 @@ class DBFileJournal extends FileJournal {
                        }
                } catch ( DBError $e ) {
                        $status->fatal( 'filejournal-fail-dbquery', $this->backend );
+
                        return $status;
                }
 
@@ -108,6 +110,7 @@ class DBFileJournal extends FileJournal {
                $dbw = $this->getMasterDB();
 
                $encTimestamp = $dbw->addQuotes( $dbw->timestamp( $time ) );
+
                return $dbw->selectField( 'filejournal', 'fj_id',
                        array( 'fj_backend' => $this->backend, "fj_timestamp <= $encTimestamp" ),
                        __METHOD__,
@@ -179,6 +182,7 @@ class DBFileJournal extends FileJournal {
                        $this->dbw = $lb->getConnection( DB_MASTER, array(), $this->wiki );
                        $this->dbw->clearFlag( DBO_TRX );
                }
+
                return $this->dbw;
        }
 }