Index: branches/new-installer/phase3/includes/installer/LocalSettings.php |
— | — | @@ -1,251 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -class LocalSettings { |
5 | | - private $extensions, $values = array(); |
6 | | - private $configPath, $dbSettings = ''; |
7 | | - private $safeMode = false; |
8 | | - private $installer; |
9 | | - |
10 | | - /** |
11 | | - * Construtor. |
12 | | - * @param $installer Installer subclass |
13 | | - */ |
14 | | - public function __construct( Installer $installer ) { |
15 | | - $this->installer = $installer; |
16 | | - $this->configPath = $installer->getVar( 'IP' ) . '/config'; |
17 | | - $this->extensions = $installer->getVar( '_Extensions' ); |
18 | | - $db = $installer->getDBInstaller( $installer->getVar( 'wgDBtype' ) ); |
19 | | - |
20 | | - $confItems = array_merge( array( 'wgScriptPath', 'wgScriptExtension', |
21 | | - 'wgPasswordSender', 'wgImageMagickConvertCommand', 'wgShellLocale', |
22 | | - 'wgLanguageCode', 'wgEnableEmail', 'wgEnableUserEmail', 'wgDiff3', |
23 | | - 'wgEnotifUserTalk', 'wgEnotifWatchlist', 'wgEmailAuthentication', |
24 | | - 'wgDBtype', 'wgSecretKey', 'wgRightsUrl', 'wgSitename', 'wgRightsIcon', |
25 | | - 'wgRightsText', 'wgRightsCode', 'wgMainCacheType', 'wgEnableUploads', |
26 | | - 'wgMainCacheType', '_MemCachedServers', 'wgDBserver', 'wgDBuser', |
27 | | - 'wgDBpassword' ), $db->getGlobalNames() ); |
28 | | - $boolItems = array( 'wgEnableEmail', 'wgEnableUserEmail', 'wgEnotifUserTalk', |
29 | | - 'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads' ); |
30 | | - foreach( $confItems as $c ) { |
31 | | - $val = $installer->getVar( $c ); |
32 | | - if( in_array( $c, $boolItems ) ) { |
33 | | - $val = wfBoolToStr( $val ); |
34 | | - } |
35 | | - $this->values[$c] = $val; |
36 | | - } |
37 | | - $this->dbSettings = $db->getLocalSettings(); |
38 | | - $this->safeMode = $installer->getVar( '_SafeMode' ); |
39 | | - $this->values['wgEmergencyContact'] = $this->values['wgPasswordSender']; |
40 | | - $this->values = wfArrayMap( array( 'LocalSettings', 'escapePhpString' ), $this->values ); |
41 | | - } |
42 | | - |
43 | | - public static function escapePhpString( $string ) { |
44 | | - if ( is_array( $string ) || is_object( $string ) ) { |
45 | | - return false; |
46 | | - } |
47 | | - return strtr( $string, |
48 | | - array( |
49 | | - "\n" => "\\n", |
50 | | - "\r" => "\\r", |
51 | | - "\t" => "\\t", |
52 | | - "\\" => "\\\\", |
53 | | - "\$" => "\\\$", |
54 | | - "\"" => "\\\"" |
55 | | - )); |
56 | | - } |
57 | | - |
58 | | - /** |
59 | | - * Write the file |
60 | | - * @param $secretKey String A random string to |
61 | | - * @return boolean On successful file write |
62 | | - */ |
63 | | - public function writeLocalSettings() { |
64 | | - $localSettings = $this->getDefaultText(); |
65 | | - if( count( $this->extensions ) ) { |
66 | | - $localSettings .= "\n# The following extensions were automatically enabled:\n"; |
67 | | - foreach( $this->extensions as $ext ) { |
68 | | - $localSettings .= "require( 'extensions/$ext/$ext.php' );\n"; |
69 | | - } |
70 | | - } |
71 | | - wfSuppressWarnings(); |
72 | | - $ret = file_put_contents( $this->configPath . '/LocalSettings.php', $localSettings ); |
73 | | - wfRestoreWarnings(); |
74 | | - if ( !$ret ) { |
75 | | - $warn = wfMsg( 'config-install-localsettings-unwritable' ) . ' |
76 | | -<textarea name="LocalSettings" id="LocalSettings" cols="80" rows="25" readonly="readonly">' |
77 | | - . htmlspecialchars( $localSettings ) . '</textarea>'; |
78 | | - $this->installer->output->addWarning( $warn ); |
79 | | - } |
80 | | - return $ret; |
81 | | - } |
82 | | - |
83 | | - private function buildMemcachedServerList() { |
84 | | - $servers = $this->values['_MemCachedServers']; |
85 | | - if( !$servers ) { |
86 | | - return 'array()'; |
87 | | - } else { |
88 | | - $ret = 'array( '; |
89 | | - $servers = explode( ',', $servers ); |
90 | | - foreach( $servers as $srv ) { |
91 | | - $srv = trim( $srv ); |
92 | | - $ret .= "'$srv', "; |
93 | | - } |
94 | | - return rtrim( $ret, ', ' ) . ' )'; |
95 | | - } |
96 | | - } |
97 | | - |
98 | | - private function getDefaultText() { |
99 | | - if( !$this->values['wgImageMagickConvertCommand'] ) { |
100 | | - $this->values['wgImageMagickConvertCommand'] = '/usr/bin/convert'; |
101 | | - $magic = '#'; |
102 | | - } else { |
103 | | - $magic = ''; |
104 | | - } |
105 | | - if( !$this->values['wgShellLocale'] ) { |
106 | | - $this->values['wgShellLocale'] = 'en_US.UTF-8'; |
107 | | - $locale = '#'; |
108 | | - } else { |
109 | | - $locale = ''; |
110 | | - } |
111 | | - $rights = $this->values['wgRightsUrl'] ? '' : '#'; |
112 | | - $hashedUploads = $this->safeMode ? '#' : ''; |
113 | | - switch( $this->values['wgMainCacheType'] ) { |
114 | | - case 'anything': |
115 | | - case 'db': |
116 | | - case 'memcached': |
117 | | - case 'accel': |
118 | | - $cacheType = 'CACHE_' . strtoupper( $this->values['wgMainCacheType']); |
119 | | - break; |
120 | | - case 'none': |
121 | | - default: |
122 | | - $cacheType = 'CACHE_NONE'; |
123 | | - } |
124 | | - $mcservers = $this->buildMemcachedServerList(); |
125 | | - return "<?php |
126 | | -# This file was automatically generated by the MediaWiki {$GLOBALS['wgVersion']} |
127 | | -# installer. If you make manual changes, please keep track in case you |
128 | | -# need to recreate them later. |
129 | | -# |
130 | | -# See includes/DefaultSettings.php for all configurable settings |
131 | | -# and their default values, but don't forget to make changes in _this_ |
132 | | -# file, not there. |
133 | | -# |
134 | | -# Further documentation for configuration settings may be found at: |
135 | | -# http://www.mediawiki.org/wiki/Manual:Configuration_settings |
136 | | - |
137 | | -# If you customize your file layout, set \$IP to the directory that contains |
138 | | -# the other MediaWiki files. It will be used as a base to locate files. |
139 | | -if( defined( 'MW_INSTALL_PATH' ) ) { |
140 | | - \$IP = MW_INSTALL_PATH; |
141 | | -} else { |
142 | | - \$IP = dirname( __FILE__ ); |
143 | | -} |
144 | | - |
145 | | -\$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" ); |
146 | | -set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_include_path() ); |
147 | | - |
148 | | -require_once( \"\$IP/includes/DefaultSettings.php\" ); |
149 | | - |
150 | | -if ( \$wgCommandLineMode ) { |
151 | | - if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) { |
152 | | - die( \"This script must be run from the command line\\n\" ); |
153 | | - } |
154 | | -} |
155 | | -## Uncomment this to disable output compression |
156 | | -# \$wgDisableOutputCompression = true; |
157 | | - |
158 | | -\$wgSitename = \"{$this->values['wgSitename']}\"; |
159 | | - |
160 | | -## The URL base path to the directory containing the wiki; |
161 | | -## defaults for all runtime URL paths are based off of this. |
162 | | -## For more information on customizing the URLs please see: |
163 | | -## http://www.mediawiki.org/wiki/Manual:Short_URL |
164 | | -\$wgScriptPath = \"{$this->values['wgScriptPath']}\"; |
165 | | -\$wgScriptExtension = \"{$this->values['wgScriptExtension']}\"; |
166 | | - |
167 | | -## The relative URL path to the skins directory |
168 | | -\$wgStylePath = \"\$wgScriptPath/skins\"; |
169 | | - |
170 | | -## The relative URL path to the logo. Make sure you change this from the default, |
171 | | -## or else you'll overwrite your logo when you upgrade! |
172 | | -\$wgLogo = \"\$wgStylePath/common/images/wiki.png\"; |
173 | | - |
174 | | -## UPO means: this is also a user preference option |
175 | | - |
176 | | -\$wgEnableEmail = {$this->values['wgEnableEmail']}; |
177 | | -\$wgEnableUserEmail = {$this->values['wgEnableUserEmail']}; # UPO |
178 | | - |
179 | | -\$wgEmergencyContact = \"{$this->values['wgEmergencyContact']}\"; |
180 | | -\$wgPasswordSender = \"{$this->values['wgPasswordSender']}\"; |
181 | | - |
182 | | -\$wgEnotifUserTalk = {$this->values['wgEnotifUserTalk']}; # UPO |
183 | | -\$wgEnotifWatchlist = {$this->values['wgEnotifWatchlist']}; # UPO |
184 | | -\$wgEmailAuthentication = {$this->values['wgEmailAuthentication']}; |
185 | | - |
186 | | -## Database settings |
187 | | -\$wgDBtype = \"{$this->values['wgDBtype']}\"; |
188 | | -\$wgDBserver = \"{$this->values['wgDBserver']}\"; |
189 | | -\$wgDBname = \"{$this->values['wgDBname']}\"; |
190 | | -\$wgDBuser = \"{$this->values['wgDBuser']}\"; |
191 | | -\$wgDBpassword = \"{$this->values['wgDBpassword']}\"; |
192 | | - |
193 | | -{$this->dbSettings} |
194 | | - |
195 | | -## Shared memory settings |
196 | | -\$wgMainCacheType = $cacheType; |
197 | | -\$wgMemCachedServers = $mcservers; |
198 | | - |
199 | | -## To enable image uploads, make sure the 'images' directory |
200 | | -## is writable, then set this to true: |
201 | | -\$wgEnableUploads = {$this->values['wgEnableUploads']}; |
202 | | -{$magic}\$wgUseImageMagick = true; |
203 | | -{$magic}\$wgImageMagickConvertCommand = \"{$this->values['wgImageMagickConvertCommand']}\"; |
204 | | - |
205 | | -## If you use ImageMagick (or any other shell command) on a |
206 | | -## Linux server, this will need to be set to the name of an |
207 | | -## available UTF-8 locale |
208 | | -{$locale}\$wgShellLocale = \"{$this->values['wgShellLocale']}\"; |
209 | | - |
210 | | -## If you want to use image uploads under safe mode, |
211 | | -## create the directories images/archive, images/thumb and |
212 | | -## images/temp, and make them all writable. Then uncomment |
213 | | -## this, if it's not already uncommented: |
214 | | -{$hashedUploads}\$wgHashedUploadDirectory = false; |
215 | | - |
216 | | -## If you have the appropriate support software installed |
217 | | -## you can enable inline LaTeX equations: |
218 | | -\$wgUseTeX = false; |
219 | | - |
220 | | -## Set \$wgCacheDirectory to a writable directory on the web server |
221 | | -## to make your wiki go slightly faster. The directory should not |
222 | | -## be publically accessible from the web. |
223 | | -#\$wgCacheDirectory = \"\$IP/cache\"; |
224 | | - |
225 | | -\$wgLocalInterwiki = strtolower( \$wgSitename ); |
226 | | - |
227 | | -\$wgLanguageCode = \"{$this->values['wgLanguageCode']}\"; |
228 | | - |
229 | | -\$wgSecretKey = \"{$this->values['wgSecretKey']}\"; |
230 | | - |
231 | | -## Default skin: you can change the default skin. Use the internal symbolic |
232 | | -## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook': |
233 | | -\$wgDefaultSkin = 'monobook'; |
234 | | - |
235 | | -## For attaching licensing metadata to pages, and displaying an |
236 | | -## appropriate copyright notice / icon. GNU Free Documentation |
237 | | -## License and Creative Commons licenses are supported so far. |
238 | | -{$rights}\$wgEnableCreativeCommonsRdf = true; |
239 | | -\$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright |
240 | | -\$wgRightsUrl = \"{$this->values['wgRightsUrl']}\"; |
241 | | -\$wgRightsText = \"{$this->values['wgRightsText']}\"; |
242 | | -\$wgRightsIcon = \"{$this->values['wgRightsIcon']}\"; |
243 | | -# \$wgRightsCode = \"{$this->values['wgRightsCode']}\"; # Not yet used |
244 | | - |
245 | | -\$wgDiff3 = \"{$this->values['wgDiff3']}\"; |
246 | | - |
247 | | -# When you make changes to this configuration file, this will make |
248 | | -# sure that cached pages are cleared. |
249 | | -\$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); |
250 | | -"; |
251 | | - } |
252 | | -} |
\ No newline at end of file |
Index: branches/new-installer/phase3/includes/installer/Installer.php |
— | — | @@ -891,7 +891,7 @@ |
892 | 892 | } |
893 | 893 | |
894 | 894 | public function installLocalsettings() { |
895 | | - $localSettings = new LocalSettings( $this ); |
| 895 | + $localSettings = new LocalSettingsGenerator( $this ); |
896 | 896 | return $localSettings->writeLocalSettings(); |
897 | 897 | } |
898 | 898 | |
Index: branches/new-installer/phase3/includes/installer/LocalSettingsGenerator.php |
— | — | @@ -0,0 +1,251 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +class LocalSettingsGenerator { |
| 5 | + private $extensions, $values = array(); |
| 6 | + private $configPath, $dbSettings = ''; |
| 7 | + private $safeMode = false; |
| 8 | + private $installer; |
| 9 | + |
| 10 | + /** |
| 11 | + * Construtor. |
| 12 | + * @param $installer Installer subclass |
| 13 | + */ |
| 14 | + public function __construct( Installer $installer ) { |
| 15 | + $this->installer = $installer; |
| 16 | + $this->configPath = $installer->getVar( 'IP' ) . '/config'; |
| 17 | + $this->extensions = $installer->getVar( '_Extensions' ); |
| 18 | + $db = $installer->getDBInstaller( $installer->getVar( 'wgDBtype' ) ); |
| 19 | + |
| 20 | + $confItems = array_merge( array( 'wgScriptPath', 'wgScriptExtension', |
| 21 | + 'wgPasswordSender', 'wgImageMagickConvertCommand', 'wgShellLocale', |
| 22 | + 'wgLanguageCode', 'wgEnableEmail', 'wgEnableUserEmail', 'wgDiff3', |
| 23 | + 'wgEnotifUserTalk', 'wgEnotifWatchlist', 'wgEmailAuthentication', |
| 24 | + 'wgDBtype', 'wgSecretKey', 'wgRightsUrl', 'wgSitename', 'wgRightsIcon', |
| 25 | + 'wgRightsText', 'wgRightsCode', 'wgMainCacheType', 'wgEnableUploads', |
| 26 | + 'wgMainCacheType', '_MemCachedServers', 'wgDBserver', 'wgDBuser', |
| 27 | + 'wgDBpassword' ), $db->getGlobalNames() ); |
| 28 | + $boolItems = array( 'wgEnableEmail', 'wgEnableUserEmail', 'wgEnotifUserTalk', |
| 29 | + 'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads' ); |
| 30 | + foreach( $confItems as $c ) { |
| 31 | + $val = $installer->getVar( $c ); |
| 32 | + if( in_array( $c, $boolItems ) ) { |
| 33 | + $val = wfBoolToStr( $val ); |
| 34 | + } |
| 35 | + $this->values[$c] = $val; |
| 36 | + } |
| 37 | + $this->dbSettings = $db->getLocalSettings(); |
| 38 | + $this->safeMode = $installer->getVar( '_SafeMode' ); |
| 39 | + $this->values['wgEmergencyContact'] = $this->values['wgPasswordSender']; |
| 40 | + $this->values = wfArrayMap( array( 'LocalSettingsGenerator', 'escapePhpString' ), $this->values ); |
| 41 | + } |
| 42 | + |
| 43 | + public static function escapePhpString( $string ) { |
| 44 | + if ( is_array( $string ) || is_object( $string ) ) { |
| 45 | + return false; |
| 46 | + } |
| 47 | + return strtr( $string, |
| 48 | + array( |
| 49 | + "\n" => "\\n", |
| 50 | + "\r" => "\\r", |
| 51 | + "\t" => "\\t", |
| 52 | + "\\" => "\\\\", |
| 53 | + "\$" => "\\\$", |
| 54 | + "\"" => "\\\"" |
| 55 | + )); |
| 56 | + } |
| 57 | + |
| 58 | + /** |
| 59 | + * Write the file |
| 60 | + * @param $secretKey String A random string to |
| 61 | + * @return boolean On successful file write |
| 62 | + */ |
| 63 | + public function writeLocalSettings() { |
| 64 | + $localSettings = $this->getDefaultText(); |
| 65 | + if( count( $this->extensions ) ) { |
| 66 | + $localSettings .= "\n# The following extensions were automatically enabled:\n"; |
| 67 | + foreach( $this->extensions as $ext ) { |
| 68 | + $localSettings .= "require( 'extensions/$ext/$ext.php' );\n"; |
| 69 | + } |
| 70 | + } |
| 71 | + wfSuppressWarnings(); |
| 72 | + $ret = file_put_contents( $this->configPath . '/LocalSettings.php', $localSettings ); |
| 73 | + wfRestoreWarnings(); |
| 74 | + if ( !$ret ) { |
| 75 | + $warn = wfMsg( 'config-install-localsettings-unwritable' ) . ' |
| 76 | +<textarea name="LocalSettings" id="LocalSettings" cols="80" rows="25" readonly="readonly">' |
| 77 | + . htmlspecialchars( $localSettings ) . '</textarea>'; |
| 78 | + $this->installer->output->addWarning( $warn ); |
| 79 | + } |
| 80 | + return $ret; |
| 81 | + } |
| 82 | + |
| 83 | + private function buildMemcachedServerList() { |
| 84 | + $servers = $this->values['_MemCachedServers']; |
| 85 | + if( !$servers ) { |
| 86 | + return 'array()'; |
| 87 | + } else { |
| 88 | + $ret = 'array( '; |
| 89 | + $servers = explode( ',', $servers ); |
| 90 | + foreach( $servers as $srv ) { |
| 91 | + $srv = trim( $srv ); |
| 92 | + $ret .= "'$srv', "; |
| 93 | + } |
| 94 | + return rtrim( $ret, ', ' ) . ' )'; |
| 95 | + } |
| 96 | + } |
| 97 | + |
| 98 | + private function getDefaultText() { |
| 99 | + if( !$this->values['wgImageMagickConvertCommand'] ) { |
| 100 | + $this->values['wgImageMagickConvertCommand'] = '/usr/bin/convert'; |
| 101 | + $magic = '#'; |
| 102 | + } else { |
| 103 | + $magic = ''; |
| 104 | + } |
| 105 | + if( !$this->values['wgShellLocale'] ) { |
| 106 | + $this->values['wgShellLocale'] = 'en_US.UTF-8'; |
| 107 | + $locale = '#'; |
| 108 | + } else { |
| 109 | + $locale = ''; |
| 110 | + } |
| 111 | + $rights = $this->values['wgRightsUrl'] ? '' : '#'; |
| 112 | + $hashedUploads = $this->safeMode ? '#' : ''; |
| 113 | + switch( $this->values['wgMainCacheType'] ) { |
| 114 | + case 'anything': |
| 115 | + case 'db': |
| 116 | + case 'memcached': |
| 117 | + case 'accel': |
| 118 | + $cacheType = 'CACHE_' . strtoupper( $this->values['wgMainCacheType']); |
| 119 | + break; |
| 120 | + case 'none': |
| 121 | + default: |
| 122 | + $cacheType = 'CACHE_NONE'; |
| 123 | + } |
| 124 | + $mcservers = $this->buildMemcachedServerList(); |
| 125 | + return "<?php |
| 126 | +# This file was automatically generated by the MediaWiki {$GLOBALS['wgVersion']} |
| 127 | +# installer. If you make manual changes, please keep track in case you |
| 128 | +# need to recreate them later. |
| 129 | +# |
| 130 | +# See includes/DefaultSettings.php for all configurable settings |
| 131 | +# and their default values, but don't forget to make changes in _this_ |
| 132 | +# file, not there. |
| 133 | +# |
| 134 | +# Further documentation for configuration settings may be found at: |
| 135 | +# http://www.mediawiki.org/wiki/Manual:Configuration_settings |
| 136 | + |
| 137 | +# If you customize your file layout, set \$IP to the directory that contains |
| 138 | +# the other MediaWiki files. It will be used as a base to locate files. |
| 139 | +if( defined( 'MW_INSTALL_PATH' ) ) { |
| 140 | + \$IP = MW_INSTALL_PATH; |
| 141 | +} else { |
| 142 | + \$IP = dirname( __FILE__ ); |
| 143 | +} |
| 144 | + |
| 145 | +\$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" ); |
| 146 | +set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_include_path() ); |
| 147 | + |
| 148 | +require_once( \"\$IP/includes/DefaultSettings.php\" ); |
| 149 | + |
| 150 | +if ( \$wgCommandLineMode ) { |
| 151 | + if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) { |
| 152 | + die( \"This script must be run from the command line\\n\" ); |
| 153 | + } |
| 154 | +} |
| 155 | +## Uncomment this to disable output compression |
| 156 | +# \$wgDisableOutputCompression = true; |
| 157 | + |
| 158 | +\$wgSitename = \"{$this->values['wgSitename']}\"; |
| 159 | + |
| 160 | +## The URL base path to the directory containing the wiki; |
| 161 | +## defaults for all runtime URL paths are based off of this. |
| 162 | +## For more information on customizing the URLs please see: |
| 163 | +## http://www.mediawiki.org/wiki/Manual:Short_URL |
| 164 | +\$wgScriptPath = \"{$this->values['wgScriptPath']}\"; |
| 165 | +\$wgScriptExtension = \"{$this->values['wgScriptExtension']}\"; |
| 166 | + |
| 167 | +## The relative URL path to the skins directory |
| 168 | +\$wgStylePath = \"\$wgScriptPath/skins\"; |
| 169 | + |
| 170 | +## The relative URL path to the logo. Make sure you change this from the default, |
| 171 | +## or else you'll overwrite your logo when you upgrade! |
| 172 | +\$wgLogo = \"\$wgStylePath/common/images/wiki.png\"; |
| 173 | + |
| 174 | +## UPO means: this is also a user preference option |
| 175 | + |
| 176 | +\$wgEnableEmail = {$this->values['wgEnableEmail']}; |
| 177 | +\$wgEnableUserEmail = {$this->values['wgEnableUserEmail']}; # UPO |
| 178 | + |
| 179 | +\$wgEmergencyContact = \"{$this->values['wgEmergencyContact']}\"; |
| 180 | +\$wgPasswordSender = \"{$this->values['wgPasswordSender']}\"; |
| 181 | + |
| 182 | +\$wgEnotifUserTalk = {$this->values['wgEnotifUserTalk']}; # UPO |
| 183 | +\$wgEnotifWatchlist = {$this->values['wgEnotifWatchlist']}; # UPO |
| 184 | +\$wgEmailAuthentication = {$this->values['wgEmailAuthentication']}; |
| 185 | + |
| 186 | +## Database settings |
| 187 | +\$wgDBtype = \"{$this->values['wgDBtype']}\"; |
| 188 | +\$wgDBserver = \"{$this->values['wgDBserver']}\"; |
| 189 | +\$wgDBname = \"{$this->values['wgDBname']}\"; |
| 190 | +\$wgDBuser = \"{$this->values['wgDBuser']}\"; |
| 191 | +\$wgDBpassword = \"{$this->values['wgDBpassword']}\"; |
| 192 | + |
| 193 | +{$this->dbSettings} |
| 194 | + |
| 195 | +## Shared memory settings |
| 196 | +\$wgMainCacheType = $cacheType; |
| 197 | +\$wgMemCachedServers = $mcservers; |
| 198 | + |
| 199 | +## To enable image uploads, make sure the 'images' directory |
| 200 | +## is writable, then set this to true: |
| 201 | +\$wgEnableUploads = {$this->values['wgEnableUploads']}; |
| 202 | +{$magic}\$wgUseImageMagick = true; |
| 203 | +{$magic}\$wgImageMagickConvertCommand = \"{$this->values['wgImageMagickConvertCommand']}\"; |
| 204 | + |
| 205 | +## If you use ImageMagick (or any other shell command) on a |
| 206 | +## Linux server, this will need to be set to the name of an |
| 207 | +## available UTF-8 locale |
| 208 | +{$locale}\$wgShellLocale = \"{$this->values['wgShellLocale']}\"; |
| 209 | + |
| 210 | +## If you want to use image uploads under safe mode, |
| 211 | +## create the directories images/archive, images/thumb and |
| 212 | +## images/temp, and make them all writable. Then uncomment |
| 213 | +## this, if it's not already uncommented: |
| 214 | +{$hashedUploads}\$wgHashedUploadDirectory = false; |
| 215 | + |
| 216 | +## If you have the appropriate support software installed |
| 217 | +## you can enable inline LaTeX equations: |
| 218 | +\$wgUseTeX = false; |
| 219 | + |
| 220 | +## Set \$wgCacheDirectory to a writable directory on the web server |
| 221 | +## to make your wiki go slightly faster. The directory should not |
| 222 | +## be publically accessible from the web. |
| 223 | +#\$wgCacheDirectory = \"\$IP/cache\"; |
| 224 | + |
| 225 | +\$wgLocalInterwiki = strtolower( \$wgSitename ); |
| 226 | + |
| 227 | +\$wgLanguageCode = \"{$this->values['wgLanguageCode']}\"; |
| 228 | + |
| 229 | +\$wgSecretKey = \"{$this->values['wgSecretKey']}\"; |
| 230 | + |
| 231 | +## Default skin: you can change the default skin. Use the internal symbolic |
| 232 | +## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook': |
| 233 | +\$wgDefaultSkin = 'monobook'; |
| 234 | + |
| 235 | +## For attaching licensing metadata to pages, and displaying an |
| 236 | +## appropriate copyright notice / icon. GNU Free Documentation |
| 237 | +## License and Creative Commons licenses are supported so far. |
| 238 | +{$rights}\$wgEnableCreativeCommonsRdf = true; |
| 239 | +\$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright |
| 240 | +\$wgRightsUrl = \"{$this->values['wgRightsUrl']}\"; |
| 241 | +\$wgRightsText = \"{$this->values['wgRightsText']}\"; |
| 242 | +\$wgRightsIcon = \"{$this->values['wgRightsIcon']}\"; |
| 243 | +# \$wgRightsCode = \"{$this->values['wgRightsCode']}\"; # Not yet used |
| 244 | + |
| 245 | +\$wgDiff3 = \"{$this->values['wgDiff3']}\"; |
| 246 | + |
| 247 | +# When you make changes to this configuration file, this will make |
| 248 | +# sure that cached pages are cleared. |
| 249 | +\$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); |
| 250 | +"; |
| 251 | + } |
| 252 | +} |
\ No newline at end of file |
Property changes on: branches/new-installer/phase3/includes/installer/LocalSettingsGenerator.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 253 | + native |
Index: branches/new-installer/phase3/includes/AutoLoader.php |
— | — | @@ -426,7 +426,7 @@ |
427 | 427 | 'Installer' => 'includes/installer/Installer.php', |
428 | 428 | 'InstallerDBType' => 'includes/installer/InstallerDBType.php', |
429 | 429 | 'LBFactory_InstallerFake' => 'includes/installer/Installer.php', |
430 | | - 'LocalSettings' => 'includes/installer/LocalSettings.php', |
| 430 | + 'LocalSettingsGenerator' => 'includes/installer/LocalSettingsGenerator.php', |
431 | 431 | 'WebInstaller' => 'includes/installer/WebInstaller.php', |
432 | 432 | 'WebInstallerOutput' => 'includes/installer/WebInstallerOutput.php', |
433 | 433 | 'MysqlInstaller' => 'includes/installer/MysqlInstaller.php', |