From d0a6ffcb0c5a73f5ea5b8cccf81dd5cbd5aabab6 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Fri, 2 Aug 2013 15:53:32 -0400 Subject: Whoops --- install.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'install.php') diff --git a/install.php b/install.php index fa41ad2d..b1395d3e 100644 --- a/install.php +++ b/install.php @@ -451,7 +451,7 @@ if ($step == 0) { array( 'category' => 'Database', 'name' => 'MySQL PDO driver installed', - 'result' => extension_loaded('pdo') && in_array('mysql1', PDO::getAvailableDrivers()), + 'result' => extension_loaded('pdo') && in_array('mysql', PDO::getAvailableDrivers()), 'required' => true, 'message' => 'The required PDO MySQL driver is not installed.', ), @@ -486,7 +486,7 @@ if ($step == 0) { array( 'category' => 'Image processing', 'name' => 'Imagick extension installed', - 'result' => extension_loaded('imagick1'), + 'result' => extension_loaded('imagick'), 'required' => false, 'message' => '(Optional) The PHP Imagick (ImageMagick) extension is not installed. You may not use Imagick for better (and faster) image processing.', ), @@ -507,7 +507,7 @@ if ($step == 0) { array( 'category' => 'Image processing', 'name' => '`gifsicle` (command-line animted GIF thumbnailing)', - 'result' => $can_exec && shell_exec('which gifsicle1'), + 'result' => $can_exec && shell_exec('which gifsicle'), 'required' => false, 'message' => '(Optional) `gifsicle` was not found or executable; you may not use `convert+gifsicle` for better animated GIF thumbnailing.', ), -- cgit v1.3 From 9e7fbf927c67797269062a3b5f827a92ac822e12 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Fri, 2 Aug 2013 16:19:20 -0400 Subject: Installer improvements --- install.php | 176 +++------------------------- templates/installer/check-requirements.html | 10 +- 2 files changed, 21 insertions(+), 165 deletions(-) (limited to 'install.php') diff --git a/install.php b/install.php index b1395d3e..82ba5b8b 100644 --- a/install.php +++ b/install.php @@ -524,6 +524,13 @@ if ($step == 0) { 'result' => is_writable('inc/instance-config.php'), 'required' => false, 'message' => 'Tinyboard does not have permission to make changes to inc/instance-config.php. To complete the installation, you will be asked to manually copy and paste code into the file instead.' + ), + array( + 'category' => 'Misc', + 'name' => 'Tinyboard installed using git', + 'result' => is_dir('.git.'), + 'required' => false, + 'message' => 'Tinyboard is still beta software and it\'s not going to come out of beta any time soon. As there are often many months between releases yet changes and bug fixes are very frequent, it\'s recommended to use the git repository to maintain your Tinyboard installation. Using git makes upgrading much easier.' ) ); @@ -542,167 +549,16 @@ if ($step == 0) { // Basic config $page['title'] = 'Configuration'; - function create_salt() { - return substr(base64_encode(sha1(rand())), 0, rand(25, 31)); - } - - $page['body'] = ' -
-
- Database - - - - - - - - - - - - - - - - - -
-

The following is all later configurable. For more options, edit your configuration files after installing.

-
- Cookies - - - - - -
- -
- Flood control - - - - - - - - - - - - - - - - - -
- -
- Images - - - - - - - - - - - - - - -
- -
- Display - - - - - - - - -
+ $config['cookies']['salt'] = substr(base64_encode(sha1(rand())), 0, 30); + $config['secure_trip_salt'] = substr(base64_encode(sha1(rand())), 0, 30); -
- Directories - - - - - - - - - - - -
- -
- Miscellaneous - - -
- -

- -

-
- '; - - - echo Element('page.html', $page); + echo Element('page.html', array( + 'body' => Element('installer/config.html', array( + 'config' => $config + )), + 'title' => 'Configuration', + 'config' => $config + )); } elseif ($step == 3) { $instance_config = '{{ test.name }} {% if test.result %} - + {% else %} {% if test.required %} {% set errors = errors + 1 %} - + {% else %} {% set warnings = warnings + 1 %} - + {% endif %} {% endif %} @@ -34,9 +34,9 @@ {% for test in tests if not test.result%}
  • {% if test.required %} - Error: + Error: {% else %} - Warning: + Warning: {% endif %} {{ test.message }}
  • -- cgit v1.3 From e35467e3b998ea2fd8800dd3722a1e9508b0ce2e Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sat, 3 Aug 2013 02:11:16 -0400 Subject: Fix install for MySQL < 5.5.3 --- install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install.php') diff --git a/install.php b/install.php index 82ba5b8b..81b2e136 100644 --- a/install.php +++ b/install.php @@ -619,7 +619,7 @@ if ($step == 0) { sql_open(); if (mysql_version() < 50503) - $sql = str_replace('utf8', 'utf8mb4', $sql); + $sql = preg_replace('/(CHARSET=|CHARACTER SET )utf8mb4/', '$1utf8', $sql); // This code is probably horrible, but what I'm trying // to do is find all of the SQL queires and put them -- cgit v1.3