mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Add check for files/ , write img_magick details to config table, missed couple of lang strings
git-svn-id: file:///svn/phpbb/trunk@4165 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
db5bba6bc8
commit
90e479df3d
3 changed files with 19 additions and 11 deletions
|
@ -57,7 +57,7 @@ if (@file_exists($phpbb_root_path . 'config.'.$phpEx))
|
|||
|
||||
if (defined('PHPBB_INSTALLED'))
|
||||
{
|
||||
// redirect("../index.$phpEx");
|
||||
redirect("../index.$phpEx");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ if (@file_exists($phpbb_root_path . 'config.'.$phpEx))
|
|||
$stage = (isset($_POST['stage'])) ? intval($_POST['stage']) : 0;
|
||||
|
||||
// These are all strings so we'll just traverse an array
|
||||
$var_ary = array('language', 'dbms', 'dbhost', 'dbport', 'dbuser', 'dbpasswd', 'dbname', 'table_prefix', 'admin_name', 'admin_pass1', 'admin_pass2', 'board_email1', 'board_email2', 'server_name', 'server_port', 'script_path', 'ftp_path', 'ftp_user', 'ftp_pass');
|
||||
$var_ary = array('language', 'dbms', 'dbhost', 'dbport', 'dbuser', 'dbpasswd', 'dbname', 'table_prefix', 'admin_name', 'admin_pass1', 'admin_pass2', 'board_email1', 'board_email2', 'server_name', 'server_port', 'script_path', 'img_imagick', 'ftp_path', 'ftp_user', 'ftp_pass');
|
||||
|
||||
foreach ($var_ary as $var)
|
||||
{
|
||||
|
@ -398,29 +398,29 @@ if ($stage == 0)
|
|||
$exe = ((defined('PHP_OS')) && (preg_match('#win#i', PHP_OS))) ? '.exe' : '';
|
||||
|
||||
// Imagemagick are you there? Give me a sign or a path ...
|
||||
$imagemagick = '';
|
||||
$img_imagick = '';
|
||||
if (empty($_ENV['MAGICK_HOME']))
|
||||
{
|
||||
$locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
|
||||
|
||||
foreach ($locations as $location)
|
||||
{
|
||||
if (file_exists($location . 'mogrify' . $exe) && is_executable($location . 'mogrify' . $exe))
|
||||
if (file_exists($location . 'convert' . $exe) && is_executable($location . 'convert' . $exe))
|
||||
{
|
||||
$imagemagick = str_replace('\\', '/', $location);
|
||||
$img_imagick = str_replace('\\', '/', $location);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$imagemagick = str_replace('\\', '/', $_ENV['MAGICK_HOME']);
|
||||
$img_imagick = str_replace('\\', '/', $_ENV['MAGICK_HOME']);
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>• <b><?php echo $lang['APP_MAGICK']; ?>: </b></td>
|
||||
<td><?php echo ($imagemagick) ? '<b style="color:green">' . $lang['AVAILABLE'] . ', ' . $imagemagick . '</b>' : '<b style="color:blue">' . $lang['NO_LOCATION'] . '</b>'; ?></td>
|
||||
<td><?php echo ($img_imagick) ? '<b style="color:green">' . $lang['AVAILABLE'] . ', ' . $img_imagick . '</b>' : '<b style="color:blue">' . $lang['NO_LOCATION'] . '</b>'; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@ -437,7 +437,7 @@ if ($stage == 0)
|
|||
<table cellspacing="1" cellpadding="4" border="0">
|
||||
<?php
|
||||
|
||||
$directories = array('cache/', 'cache/templates/', 'cache/themes/', 'cache/tmp/');
|
||||
$directories = array('cache/', 'cache/templates/', 'cache/themes/', 'cache/tmp/', 'files/');
|
||||
|
||||
umask(0);
|
||||
|
||||
|
@ -516,7 +516,7 @@ if ($stage == 0)
|
|||
|
||||
$next_text = ($passed['db'] && $passed['files']) ? $lang['INSTALL_NEXT_PASS'] : $lang['INSTALL_NEXT_FAIL'];
|
||||
|
||||
$s_hidden_fields = ($imagemagick) ? '<input type="hidden" name="imagemagick" value="' . $imagemagick . '" />' : '';
|
||||
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
|
||||
|
||||
?>
|
||||
|
||||
|
@ -524,12 +524,12 @@ if ($stage == 0)
|
|||
|
||||
<table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input type="hidden" name="stage" value="1" /><input class="liteoption" name="retest" type="submit" value="Test Again" /><?php
|
||||
<td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input type="hidden" name="stage" value="1" /><input class="liteoption" name="retest" type="submit" value="<?php echo $lang['INSTALL_TEST']; ?>" /><?php
|
||||
|
||||
if ($passed['db'] && $passed['files'])
|
||||
{
|
||||
|
||||
?> <input class="mainoption" name="submit" type="submit" value="Next Stage" /><?php
|
||||
?> <input class="mainoption" name="submit" type="submit" value="<?php echo $lang['INSTALL_NEXT']; ?>" /><?php
|
||||
|
||||
}
|
||||
|
||||
|
@ -623,6 +623,7 @@ if ($stage == 1)
|
|||
}
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="stage" value="2" />';
|
||||
$s_hidden_fields .= ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';;
|
||||
|
||||
inst_page_header();
|
||||
|
||||
|
@ -1111,6 +1112,10 @@ if ($stage == 3)
|
|||
'INSERT INTO ' . $table_prefix . "config (config_name, config_value)
|
||||
VALUES ('default_lang', '" . $db->sql_escape($language) . "')",
|
||||
|
||||
'UPDATE ' . $table_prefix . "config
|
||||
SET config_value = '" . $db->sql_escape($img_imagick) . "'
|
||||
WHERE config_name = 'img_imagick'",
|
||||
|
||||
'UPDATE ' . $table_prefix . "config
|
||||
SET config_value = '" . $db->sql_escape($server_name) . "'
|
||||
WHERE config_name = 'server_name'",
|
||||
|
|
|
@ -1134,6 +1134,8 @@ $lang = array_merge($lang, array(
|
|||
'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB2 is located relative to the domain name',
|
||||
'SERVER_PORT' => 'Server port',
|
||||
'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different',
|
||||
'INSTALL_TEST' => 'Test Again',
|
||||
'INSTALL_NEXT' => 'Next Stage',
|
||||
'INSTALL_START' => 'Start Install',
|
||||
|
||||
'INSTALL_SEND_CONFIG' => 'Unfortunately phpBB could not write the configuration information directly to your config.php. This may be because the file does not exist or is not writeable. A number of options will be listed below enabling you to complete installation of config.php.',
|
||||
|
|
|
@ -243,6 +243,7 @@ $lang = array(
|
|||
'BOARD_BAN_PERM' => 'You have been <b>permanently</b> banned from this board.<br /><br />Please contact the %2$sBoard Administrator%3$s for more information.',
|
||||
'BOARD_BAN_REASON' => 'Reason given for ban: <b>%s</b>',
|
||||
'EMAIL_DISABLED' => 'Sorry but all email related functions have been disabled.',
|
||||
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory.',
|
||||
|
||||
'G_ADMINISTRATORS' => 'ADMINISTRATORS',
|
||||
'G_SUPER_MODERATORS'=> 'SUPER MODERATORS',
|
||||
|
|
Loading…
Add table
Reference in a new issue