Project

General

Profile

« Previous | Next » 

Revision 1540

Added by Dietmar almost 13 years ago

did some changes and fixes found by testers

View differences:

index.php
190 190
		<tr>
191 191
<?php
192 192
	$config = '<font class="good">Writeable</font>';
193
	$config_content = "<?php\n";
193 194
	$configFile = '/config.php';
194
	if(!isset($_SESSION['config_rename']) ) {
195
	if(!isset($_SESSION['config_rename']) )
196
	{
195 197

  
196
		if( (file_exists($wb_path.$configFile)==true)) {
197
			if ( filesize($wb_path.$configFile) > 128) {
198
		if( (file_exists($wb_path.$configFile)==true))
199
		{
200

  
201
			if ( filesize($wb_path.$configFile) > 128)
202
			{
198 203
				$installFlag = false;
199 204
				$config = '<font class="bad">Not empty!!?</font>';
200
			} elseif( is_writeable($wb_path.$configFile)==true ) {
201
				$config = '<font class="good">Writeable</font>';
202
				$_SESSION['config_rename'] = true;
203
			}
204
		} elseif((file_exists($wb_path.'/config.php.new')==true)) {
205
			} elseif(!$handle = fopen($wb_path.$configFile, 'w') )
206
			{
207
				$installFlag = false;
208
                $config = '<font class="bad">Not Writeable</font>';
209
			} else {
210
				if (fwrite($handle, $config_content) === FALSE) {
211
					$installFlag = false;
212
	                $config = '<font class="bad">Not Writeable</font>';
213
				} else {
214
					$config = '<font class="good">Writeable</font>';
215
					$_SESSION['config_rename'] = true;
216
				}
217
				// Close file
218
				fclose($handle);
219
				}
220

  
221
		} elseif((file_exists($wb_path.'/config.php.new')==true))
222
		{
205 223
			$configFile = '/config.php.new';
206 224
			$installFlag = false;
207 225
			$config = '<font class="bad">Please rename</font>';
208
		} else {
209
				$installFlag = false;
210
				$config = '<font class="bad">Missing!!?</font>';
226
		} else
227
		{
228
			$installFlag = false;
229
			$config = '<font class="bad">Missing!!?</font>';
211 230
		}
212

  
213 231
	}
214 232
?>
215 233
			<td width="150px" style="color: #666666;"><?php print $wb_root.$configFile ?></td>

Also available in: Unified diff