Index: branches/new-installer/phase3/includes/installer/Installer.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | 'wgScriptPath', |
31 | 31 | 'wgScriptExtension', |
32 | 32 | 'wgMetaNamespace', |
33 | | - 'wgDeletedDirectory', |
| 33 | +// 'wgDeletedDirectory', |
34 | 34 | 'wgEnableUploads', |
35 | 35 | 'wgLogo', |
36 | 36 | ); |
Index: branches/new-installer/phase3/includes/installer/SqliteInstaller.php |
— | — | @@ -3,7 +3,8 @@ |
4 | 4 | class SqliteInstaller extends InstallerDBType { |
5 | 5 | var $globalNames = array( |
6 | 6 | 'wgDBname', |
7 | | - 'wgSQLiteDataDir' |
| 7 | + 'wgSQLiteDataDir', |
| 8 | + 'wgSQLiteDataDirMode', |
8 | 9 | ); |
9 | 10 | |
10 | 11 | function getName() { |
— | — | @@ -20,7 +21,12 @@ |
21 | 22 | |
22 | 23 | function getGlobalDefaults() { |
23 | 24 | if ( isset( $_SERVER['DOCUMENT_ROOT'] ) ) { |
24 | | - return array( 'wgSQLiteDataDir' => dirname( $_SERVER['DOCUMENT_ROOT'] ) . '/data' ); |
| 25 | + $path = str_replace( |
| 26 | + array( '/', '\\' ), |
| 27 | + DIRECTORY_SEPARATOR, |
| 28 | + dirname( $_SERVER['DOCUMENT_ROOT'] ) . '/data' |
| 29 | + ); |
| 30 | + return array( 'wgSQLiteDataDir' => $path ); |
25 | 31 | } else { |
26 | 32 | return array(); |
27 | 33 | } |
— | — | @@ -31,19 +37,22 @@ |
32 | 38 | $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir' ) . |
33 | 39 | $this->parent->getHelpBox( 'config-sqlite-dir-help' ) . |
34 | 40 | $this->getTextBox( 'wgDBname', 'config-db-name' ) . |
35 | | - $this->parent->getHelpBox( 'config-sqlite-name-help' ); |
| 41 | + $this->parent->getHelpBox( 'config-sqlite-name-help' ) . |
| 42 | + $this->getTextBox( 'wgSQLiteDataDirMode', 'config-sqlite-permissions' ) . |
| 43 | + $this->parent->getHelpBox( 'config-sqlite-permissions-help' ); |
36 | 44 | } |
37 | 45 | |
38 | 46 | function submitConnectForm() { |
39 | 47 | global $wgSQLiteDataDirMode, $wgSQLiteDataDir; |
40 | | - $newValues = $this->setVarsFromRequest( array( 'wgSQLiteDataDir', 'wgDBname' ) ); |
| 48 | + $newValues = $this->setVarsFromRequest( array( 'wgSQLiteDataDir', 'wgDBname', 'wgSQLiteDataDirMode' ) ); |
41 | 49 | $dir = $newValues['wgSQLiteDataDir']; |
| 50 | + $mode = $newValues['wgSQLiteDataDir']; |
42 | 51 | if ( !is_dir( $dir ) ) { |
43 | 52 | if ( !is_writable( dirname( $dir ) ) ) { |
44 | 53 | return Status::newFatal( 'config-sqlite-parent-unwritable', $dir, dirname( $dir ) ); |
45 | 54 | } |
46 | 55 | wfSuppressWarnings(); |
47 | | - $ok = wfMkdirParents( $dir, $wgSQLiteDataDirMode ); |
| 56 | + $ok = wfMkdirParents( $dir, $mode ); |
48 | 57 | wfRestoreWarnings(); |
49 | 58 | if ( !$ok ) { |
50 | 59 | return Status::newFatal( 'config-sqlite-mkdir-error', $dir ); |
Index: branches/new-installer/phase3/languages/messages/MessagesEn.php |
— | — | @@ -4167,6 +4167,9 @@ |
4168 | 4168 | 'config-sqlite-dir-help' => 'SQLite stores table data into files in the filesystem. |
4169 | 4169 | This directory must be writable by the webserver. |
4170 | 4170 | It should <strong>not</strong> accessible via the web.', |
| 4171 | +'config-sqlite-permissions' => 'Permission for data directory:', |
| 4172 | +'config-sqlite-permissions-help' => 'Please specify the default permissions for the data directory. |
| 4173 | +If you don\'t know, it\'s probably safe to leave the default.', |
4171 | 4174 | 'config-type-mysql' => 'MySQL', |
4172 | 4175 | 'config-type-postgres' => 'PostgreSQL', |
4173 | 4176 | 'config-type-sqlite' => 'SQLite', |