Index: trunk/extensions/OAI/OAIHarvest.php |
— | — | @@ -476,7 +476,8 @@ |
477 | 477 | 'img_user_text' => isset( $upload['contributor']['username'] ) |
478 | 478 | ? strval( $upload['contributor']['username'] ) |
479 | 479 | : strval( $upload['contributor']['ip'] ), |
480 | | - 'img_timestamp' => $dbw->timestamp( $this->getTimestamp( $upload['timestamp'] ) ) ); |
| 480 | + 'img_timestamp' => $dbw->timestamp( $this->getTimestamp( $upload['timestamp'] ) ), |
| 481 | + 'img_metadata' => serialize( array() ) ); |
481 | 482 | |
482 | 483 | $dbw->begin(); |
483 | 484 | echo "REPLACING image row\n"; |
— | — | @@ -522,6 +523,7 @@ |
523 | 524 | if( file_exists( $filename ) ) { |
524 | 525 | unlink( $filename ); |
525 | 526 | } |
| 527 | + wfMkdirParents( dirname( $filename ) ); |
526 | 528 | if( !( $output = fopen( $filename, 'xb' ) ) ) { |
527 | 529 | throw new OAIError( 'Could not create local image file "' . $filename . '" for writing.' ); |
528 | 530 | } |