From 90e479df3de1295ad9fcebcb49107946f7b0ae20 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sat, 21 Jun 2003 15:24:03 +0000 Subject: [PATCH] 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 --- phpBB/install/install.php | 27 ++++++++++++++++----------- phpBB/language/en/lang_admin.php | 2 ++ phpBB/language/en/lang_main.php | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/phpBB/install/install.php b/phpBB/install/install.php index 66e4418498..8b16a148fe 100644 --- a/phpBB/install/install.php +++ b/phpBB/install/install.php @@ -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']); } ?> • : - ' . $lang['AVAILABLE'] . ', ' . $imagemagick . '' : '' . $lang['NO_LOCATION'] . ''; ?> + ' . $lang['AVAILABLE'] . ', ' . $img_imagick . '' : '' . $lang['NO_LOCATION'] . ''; ?> @@ -437,7 +437,7 @@ if ($stage == 0) ' : ''; + $s_hidden_fields = ($img_imagick) ? '' : ''; ?> @@ -524,12 +524,12 @@ if ($stage == 0)
-
      '; + $s_hidden_fields .= ($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'", diff --git a/phpBB/language/en/lang_admin.php b/phpBB/language/en/lang_admin.php index af07bbf6bf..889b37ab96 100644 --- a/phpBB/language/en/lang_admin.php +++ b/phpBB/language/en/lang_admin.php @@ -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.', diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php index ed26a2ae67..8fde775810 100644 --- a/phpBB/language/en/lang_main.php +++ b/phpBB/language/en/lang_main.php @@ -243,6 +243,7 @@ $lang = array( 'BOARD_BAN_PERM' => 'You have been permanently banned from this board.

Please contact the %2$sBoard Administrator%3$s for more information.', 'BOARD_BAN_REASON' => 'Reason given for ban: %s', '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',