Index: trunk/extensions/OAI/oaiUpdate.php |
— | — | @@ -1,7 +1,16 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | -if( !class_exists( 'DOMAttr' ) ) { |
5 | | - die( 'Requires PHP 5 with the DOM module enabled...' ); |
| 4 | +if( !class_exists( 'DOMAttrx' ) ) { |
| 5 | + echo |
| 6 | + "Requires PHP 5 with the DOM module enabled.\n" . |
| 7 | + "\n" . |
| 8 | + "Although enabled by default in most PHP configurations, this module\n" . |
| 9 | + "is sometimes shipped in a separate package by Linux distributions.\n" . |
| 10 | + "\n" . |
| 11 | + "Fedora 6 users, please try:\n" . |
| 12 | + " yum install php-xml\n" . |
| 13 | + "\n"; |
| 14 | + exit( 1 ); |
6 | 15 | } |
7 | 16 | |
8 | 17 | $base = dirname( dirname( dirname( __FILE__ ) ) ); |
Index: trunk/extensions/OAI/OAIHarvest.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | |
41 | 41 | # Need shared code... |
42 | 42 | require_once( 'OAIFunctions.php' ); |
43 | | -require_once( 'maintenance/refreshLinks.inc' ); |
| 43 | +require_once( "$IP/maintenance/refreshLinks.inc" ); |
44 | 44 | |
45 | 45 | global $oaiSourceRepository; |
46 | 46 | global $oaiAgentExtra; |
— | — | @@ -501,7 +501,14 @@ |
502 | 502 | } |
503 | 503 | |
504 | 504 | # We assume the filename has already been validated by code above us. |
505 | | - $filename = wfImageDir( $upload['filename'] ) . '/' . $upload['filename']; |
| 505 | + if( function_exists( 'wfImageDir' ) ) { |
| 506 | + // < 1.10 |
| 507 | + $filename = wfImageDir( $upload['filename'] ) . '/' . $upload['filename']; |
| 508 | + } else { |
| 509 | + // 1.11 |
| 510 | + echo "File updating temporarily broken on 1.11, sorry!\n"; |
| 511 | + return; |
| 512 | + } |
506 | 513 | |
507 | 514 | $timestamp = wfTimestamp( TS_UNIX, $this->getTimestamp( $upload['timestamp'] ) ); |
508 | 515 | if( file_exists( $filename ) |