Property changes on: branches/REL1_15/phase3/includes/api |
___________________________________________________________________ |
Name: svn:mergeinfo |
1 | 1 | - /trunk/phase3/includes/api:48813-48814,48819,48836,48886,48892,48909,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218 |
2 | 2 | + /trunk/phase3/includes/api:48813-48814,48819,48836,48886,48892,48909,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218,50328 |
Property changes on: branches/REL1_15/phase3/includes/specials |
___________________________________________________________________ |
Name: svn:mergeinfo |
3 | 3 | - /trunk/phase3/includes/specials:48836,48886,48892,48989,48992-48993,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218 |
/trunk/phase3/includes/specials/specials:48993 |
4 | 4 | + /trunk/phase3/includes/specials:48836,48886,48892,48989,48992-48993,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218,50328 |
/trunk/phase3/includes/specials/specials:48993 |
Property changes on: branches/REL1_15/phase3/includes |
___________________________________________________________________ |
Name: svn:mergeinfo |
5 | 5 | - /trunk/phase3/includes:48836,48886,48892,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218 |
/trunk/phase3/includes/specials:48993 |
6 | 6 | + /trunk/phase3/includes:48836,48886,48892,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218,50328 |
/trunk/phase3/includes/specials:48993 |
Index: branches/REL1_15/phase3/config/index.php |
— | — | @@ -819,7 +819,9 @@ |
820 | 820 | $wgTitle = Title::newFromText( "Installation script" ); |
821 | 821 | error_reporting( E_ALL ); |
822 | 822 | print "<li>Loading class: " . htmlspecialchars( $dbclass ) . "</li>\n"; |
823 | | - $dbc = new $dbclass; |
| 823 | + if ( $conf->DBtype != 'sqlite' ) { |
| 824 | + $dbc = new $dbclass; |
| 825 | + } |
824 | 826 | |
825 | 827 | if( $conf->DBtype == 'mysql' ) { |
826 | 828 | $mysqlOldClient = version_compare( mysql_get_client_info(), "4.1.0", "lt" ); |
— | — | @@ -903,7 +905,46 @@ |
904 | 906 | $myver = $wgDatabase->getServerVersion(); |
905 | 907 | } |
906 | 908 | if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname); |
907 | | - |
| 909 | + |
| 910 | + } elseif ( $conf->DBtype == 'sqlite' ) { |
| 911 | + if ("$wgSQLiteDataDir" == '') { |
| 912 | + $wgSQLiteDataDir = dirname($_SERVER['DOCUMENT_ROOT']).'/data'; |
| 913 | + } |
| 914 | + echo "<li>Attempting to connect to SQLite database at \"" . |
| 915 | + htmlspecialchars( $wgSQLiteDataDir ) . "\""; |
| 916 | + if ( !is_dir( $wgSQLiteDataDir ) ) { |
| 917 | + if ( is_writable( dirname( $wgSQLiteDataDir ) ) ) { |
| 918 | + $ok = wfMkdirParents( $wgSQLiteDataDir, $wgSQLiteDataDirMode ); |
| 919 | + } else { |
| 920 | + $ok = false; |
| 921 | + } |
| 922 | + if ( !$ok ) { |
| 923 | + echo ": cannot create data directory</li>"; |
| 924 | + $errs['SQLiteDataDir'] = 'Enter a valid data directory'; |
| 925 | + continue; |
| 926 | + } |
| 927 | + } |
| 928 | + if ( !is_writable( $wgSQLiteDataDir ) ) { |
| 929 | + echo ": data directory not writable</li>"; |
| 930 | + $errs['SQLiteDataDir'] = 'Enter a writable data directory'; |
| 931 | + continue; |
| 932 | + } |
| 933 | + $dataFile = "$wgSQLiteDataDir/$wgDBname.sqlite"; |
| 934 | + if ( file_exists( $dataFile ) && !is_writable( $dataFile ) ) { |
| 935 | + echo ": data file not writable</li>"; |
| 936 | + $errs['SQLiteDataDir'] = "$wgDBname.sqlite is not writable"; |
| 937 | + continue; |
| 938 | + } |
| 939 | + $wgDatabase = new DatabaseSqlite( false, false, false, $wgDBname, 1 ); |
| 940 | + if (!$wgDatabase->isOpen()) { |
| 941 | + print ": error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n"; |
| 942 | + $errs['SQLiteDataDir'] = 'Could not connect to database'; |
| 943 | + continue; |
| 944 | + } else { |
| 945 | + $myver = $wgDatabase->getServerVersion(); |
| 946 | + } |
| 947 | + if (is_callable(array($wgDatabase, 'initial_setup'))) $wgDatabase->initial_setup('', $wgDBname); |
| 948 | + echo "ok</li>\n"; |
908 | 949 | } else { # not mysql |
909 | 950 | error_reporting( E_ALL ); |
910 | 951 | $wgSuperUser = ''; |
Index: branches/REL1_15/phase3/RELEASE-NOTES |
— | — | @@ -343,6 +343,8 @@ |
344 | 344 | * (bug 18601) generator=backlinks returns invalid continue parameter |
345 | 345 | * (bug 18597) Internal error with empty generator= parameter |
346 | 346 | * (bug 18617) Add xml:space="preserve" attribute to relevant tags in XML output |
| 347 | +* (bug 17611) Provide a sensible error message on install when the SQLite data |
| 348 | + directory is wrong. |
347 | 349 | |
348 | 350 | === Languages updated in 1.15 === |
349 | 351 | |
Property changes on: branches/REL1_15/phase3 |
___________________________________________________________________ |
Name: svn:mergeinfo |
350 | 352 | - /trunk/phase3:48814,48836,48886,48892,48909,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218 |
351 | 353 | + /trunk/phase3:48814,48836,48886,48892,48909,48989,48992,49002,49051,49068,49086,49191-49192,49212,49682,49685,49730,49775,49954,49956,49999,50041,50054,50070,50132,50134,50169,50215,50218,50328 |