|
@@ 693-702 (lines=10) @@
|
| 690 |
|
return false; |
| 691 |
|
|
| 692 |
|
// Check agreement.txt. (it may not exist, in which case $boarddir must be writable.) |
| 693 |
|
if (isset($modSettings['agreement']) && (!is_writable($boarddir) || file_exists($boarddir . '/agreement.txt')) && !is_writable($boarddir . '/agreement.txt')) |
| 694 |
|
return throw_error('The upgrader was unable to obtain write access to agreement.txt.<br><br>If you are using a linux or unix based server, please ensure that the file is chmod\'d to 777, or if it does not exist that the directory this upgrader is in is 777.<br>If your server is running Windows, please ensure that the internet guest account has the proper permissions on it or its folder.'); |
| 695 |
|
|
| 696 |
|
// Upgrade the agreement. |
| 697 |
|
elseif (isset($modSettings['agreement'])) |
| 698 |
|
{ |
| 699 |
|
$fp = fopen($boarddir . '/agreement.txt', 'w'); |
| 700 |
|
fwrite($fp, $modSettings['agreement']); |
| 701 |
|
fclose($fp); |
| 702 |
|
} |
| 703 |
|
|
| 704 |
|
// We're going to check that their board dir setting is right in case they've been moving stuff around. |
| 705 |
|
if (strtr($boarddir, array('/' => '', '\\' => '')) != strtr(dirname(__FILE__), array('/' => '', '\\' => ''))) |
|
@@ 2364-2371 (lines=8) @@
|
| 2361 |
|
if (!is_writable($boarddir . '/Settings_bak.php')) |
| 2362 |
|
print_error('Error: Unable to obtain write access to "Settings_bak.php".'); |
| 2363 |
|
|
| 2364 |
|
if (isset($modSettings['agreement']) && (!is_writable($boarddir) || file_exists($boarddir . '/agreement.txt')) && !is_writable($boarddir . '/agreement.txt')) |
| 2365 |
|
print_error('Error: Unable to obtain write access to "agreement.txt".'); |
| 2366 |
|
elseif (isset($modSettings['agreement'])) |
| 2367 |
|
{ |
| 2368 |
|
$fp = fopen($boarddir . '/agreement.txt', 'w'); |
| 2369 |
|
fwrite($fp, $modSettings['agreement']); |
| 2370 |
|
fclose($fp); |
| 2371 |
|
} |
| 2372 |
|
|
| 2373 |
|
// Make sure Themes is writable. |
| 2374 |
|
quickFileWritable($modSettings['theme_dir']); |