@@ 66-70 (lines=5) @@ | ||
63 | $id = (int)$src->getJournal()->getCurrentPosition(); |
|
64 | $this->output( "Current journal position is $id.\n" ); |
|
65 | } |
|
66 | if ( file_put_contents( $posFile, $id, LOCK_EX ) !== false ) { |
|
67 | $this->output( "Saved journal position file.\n" ); |
|
68 | } else { |
|
69 | $this->output( "Could not save journal position file.\n" ); |
|
70 | } |
|
71 | if ( $this->isQuiet() ) { |
|
72 | print $id; // give a single machine-readable number |
|
73 | } |
|
@@ 119-123 (lines=5) @@ | ||
116 | ||
117 | // Update the sync position file |
|
118 | if ( $startFromPosFile && $lastOKPos >= $start ) { // successfully advanced |
|
119 | if ( file_put_contents( $posFile, $lastOKPos, LOCK_EX ) !== false ) { |
|
120 | $this->output( "Updated journal position file.\n" ); |
|
121 | } else { |
|
122 | $this->output( "Could not update journal position file.\n" ); |
|
123 | } |
|
124 | } |
|
125 | ||
126 | if ( $lastOKPos === false ) { |