|
@@ 1091-1100 (lines=10) @@
|
| 1088 |
|
return false; |
| 1089 |
|
|
| 1090 |
|
// Check agreement.txt. (it may not exist, in which case $boarddir must be writable.) |
| 1091 |
|
if (isset($modSettings['agreement']) && (!is_writable($boarddir) || file_exists($boarddir . '/agreement.txt')) && !is_writable($boarddir . '/agreement.txt')) |
| 1092 |
|
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.'); |
| 1093 |
|
|
| 1094 |
|
// Upgrade the agreement. |
| 1095 |
|
elseif (isset($modSettings['agreement'])) |
| 1096 |
|
{ |
| 1097 |
|
$fp = fopen($boarddir . '/agreement.txt', 'w'); |
| 1098 |
|
fwrite($fp, $modSettings['agreement']); |
| 1099 |
|
fclose($fp); |
| 1100 |
|
} |
| 1101 |
|
|
| 1102 |
|
// We're going to check that their board dir setting is right in case they've been moving stuff around. |
| 1103 |
|
if (strtr($boarddir, array('/' => '', '\\' => '')) != strtr(dirname(__FILE__), array('/' => '', '\\' => ''))) |
|
@@ 3336-3343 (lines=8) @@
|
| 3333 |
|
if (!is_writable($boarddir . '/Settings_bak.php')) |
| 3334 |
|
print_error('Error: Unable to obtain write access to "Settings_bak.php".'); |
| 3335 |
|
|
| 3336 |
|
if (isset($modSettings['agreement']) && (!is_writable($boarddir) || file_exists($boarddir . '/agreement.txt')) && !is_writable($boarddir . '/agreement.txt')) |
| 3337 |
|
print_error('Error: Unable to obtain write access to "agreement.txt".'); |
| 3338 |
|
elseif (isset($modSettings['agreement'])) |
| 3339 |
|
{ |
| 3340 |
|
$fp = fopen($boarddir . '/agreement.txt', 'w'); |
| 3341 |
|
fwrite($fp, $modSettings['agreement']); |
| 3342 |
|
fclose($fp); |
| 3343 |
|
} |
| 3344 |
|
|
| 3345 |
|
// Make sure Themes is writable. |
| 3346 |
|
quickFileWritable($modSettings['theme_dir']); |