|
@@ 830-839 (lines=10) @@
|
| 827 |
|
return false; |
| 828 |
|
|
| 829 |
|
// Check agreement.txt. (it may not exist, in which case $boarddir must be writable.) |
| 830 |
|
if (isset($modSettings['agreement']) && (!is_writable($boarddir) || file_exists($boarddir . '/agreement.txt')) && !is_writable($boarddir . '/agreement.txt')) |
| 831 |
|
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.'); |
| 832 |
|
|
| 833 |
|
// Upgrade the agreement. |
| 834 |
|
elseif (isset($modSettings['agreement'])) |
| 835 |
|
{ |
| 836 |
|
$fp = fopen($boarddir . '/agreement.txt', 'w'); |
| 837 |
|
fwrite($fp, $modSettings['agreement']); |
| 838 |
|
fclose($fp); |
| 839 |
|
} |
| 840 |
|
|
| 841 |
|
// We're going to check that their board dir setting is right in case they've been moving stuff around. |
| 842 |
|
if (strtr($boarddir, array('/' => '', '\\' => '')) != strtr(dirname(__FILE__), array('/' => '', '\\' => ''))) |
|
@@ 2527-2534 (lines=8) @@
|
| 2524 |
|
if (!is_writable($boarddir . '/Settings_bak.php')) |
| 2525 |
|
print_error('Error: Unable to obtain write access to "Settings_bak.php".'); |
| 2526 |
|
|
| 2527 |
|
if (isset($modSettings['agreement']) && (!is_writable($boarddir) || file_exists($boarddir . '/agreement.txt')) && !is_writable($boarddir . '/agreement.txt')) |
| 2528 |
|
print_error('Error: Unable to obtain write access to "agreement.txt".'); |
| 2529 |
|
elseif (isset($modSettings['agreement'])) |
| 2530 |
|
{ |
| 2531 |
|
$fp = fopen($boarddir . '/agreement.txt', 'w'); |
| 2532 |
|
fwrite($fp, $modSettings['agreement']); |
| 2533 |
|
fclose($fp); |
| 2534 |
|
} |
| 2535 |
|
|
| 2536 |
|
// Make sure Themes is writable. |
| 2537 |
|
quickFileWritable($modSettings['theme_dir']); |