/**#@+
* @private
*/
- var $fileExists, # does the file file exist on disk? (loadFromXxx)
- $historyLine, # Number of line to return by nextHistoryLine() (constructor)
- $historyRes, # result of the query for the file's history (nextHistoryLine)
+ var
+ $fileExists, # does the file file exist on disk? (loadFromXxx)
+ $historyLine, # Number of line to return by nextHistoryLine() (constructor)
+ $historyRes, # result of the query for the file's history (nextHistoryLine)
$width, # \
$height, # |
$bits, # --- returned by getimagesize (loadFromXxx)
$upgraded, # Whether the row was upgraded on load
$locked, # True if the image row is locked
$missing, # True if file is not present in file system. Not to be cached in memcached
- $deleted; # Bitfield akin to rev_deleted
+ $deleted; # Bitfield akin to rev_deleted
/**#@-*/
$res = $dbr->select( $tables, $fields, $conds, __METHOD__, $opts, $join_conds );
$r = array();
- while ( $row = $dbr->fetchObject( $res ) ) {
+ foreach ( $res as $row ) {
if ( $this->repo->oldFileFromRowFactory ) {
$r[] = call_user_func( $this->repo->oldFileFromRowFactory, $row, $this->repo );
} else {
$result = $dbw->select( 'oldimage',
array( 'oi_archive_name' ),
array( 'oi_name' => $this->getName() ) );
- while ( $row = $dbw->fetchObject( $result ) ) {
+ foreach ( $result as $row ) {
$batch->addOld( $row->oi_archive_name );
}
$status = $batch->execute();
__METHOD__
);
- while ( $row = $dbw->fetchObject( $res ) ) {
+ foreach ( $res as $row ) {
if ( rtrim( $row->oi_sha1, "\0" ) === '' ) {
// Get the hash from the file
$oldUrl = $this->file->getArchiveVirtualUrl( $row->oi_archive_name );
$dbw->bitAnd( 'oi_deleted', File::DELETED_FILE ) => File::DELETED_FILE ),
__METHOD__ );
- while ( $row = $dbw->fetchObject( $res ) ) {
+ foreach ( $res as $row ) {
$privateFiles[$row->oi_archive_name] = 1;
}
}
$first = true;
$archiveNames = array();
- while ( $row = $dbw->fetchObject( $result ) ) {
+ foreach ( $result as $row ) {
$idsPresent[] = $row->fa_id;
if ( $row->fa_name != $this->file->getName() ) {
__METHOD__
);
- while ( $row = $this->db->fetchObject( $result ) ) {
+ foreach ( $result as $row ) {
$oldName = $row->oi_archive_name;
$bits = explode( '!', $oldName, 2 );