|
@@ 149-161 (lines=13) @@
|
| 146 |
|
$upgraded++; |
| 147 |
|
$newLength = strlen( $file->getMetadata() ); |
| 148 |
|
$oldLength = strlen( $row->img_metadata ); |
| 149 |
|
if ( $newLength < $oldLength - 5 ) { |
| 150 |
|
// If after updating, the metadata is smaller then |
| 151 |
|
// what it was before, that's probably not a good thing |
| 152 |
|
// because we extract more data with time, not less. |
| 153 |
|
// Thus this probably indicates an error of some sort, |
| 154 |
|
// or at the very least is suspicious. Have the - 5 just |
| 155 |
|
// to weed out any inconsequential changes. |
| 156 |
|
$error++; |
| 157 |
|
$this->output( "Warning: File:{$row->img_name} used to have " . |
| 158 |
|
"$oldLength bytes of metadata but now has $newLength bytes.\n" ); |
| 159 |
|
} elseif ( $verbose ) { |
| 160 |
|
$this->output( "Refreshed File:{$row->img_name}.\n" ); |
| 161 |
|
} |
| 162 |
|
} else { |
| 163 |
|
$leftAlone++; |
| 164 |
|
if ( $force ) { |
|
@@ 168-172 (lines=5) @@
|
| 165 |
|
$file->upgradeRow(); |
| 166 |
|
$newLength = strlen( $file->getMetadata() ); |
| 167 |
|
$oldLength = strlen( $row->img_metadata ); |
| 168 |
|
if ( $newLength < $oldLength - 5 ) { |
| 169 |
|
$error++; |
| 170 |
|
$this->output( "Warning: File:{$row->img_name} used to have " . |
| 171 |
|
"$oldLength bytes of metadata but now has $newLength bytes. (forced)\n" ); |
| 172 |
|
} |
| 173 |
|
if ( $verbose ) { |
| 174 |
|
$this->output( "Forcibly refreshed File:{$row->img_name}.\n" ); |
| 175 |
|
} |