[geeklog-cvs] geeklog: Improved detection and reporting of available DB option...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Apr 3 04:28:41 EDT 2010
changeset 7868:1bcacf5076a9
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/1bcacf5076a9
user: Dirk Haun <dirk at haun-online.de>
date: Sat Apr 03 10:14:15 2010 +0200
description:
Improved detection and reporting of available DB options on fresh install
diffstat:
public_html/admin/install/index.php | 6 +-
public_html/admin/install/language/chinese_simplified_utf-8.php | 7 ++-
public_html/admin/install/language/chinese_traditional_utf-8.php | 7 ++-
public_html/admin/install/language/english.php | 7 ++-
public_html/admin/install/language/german.php | 9 ++--
public_html/admin/install/language/hebrew_utf-8.php | 9 ++--
public_html/admin/install/language/japanese_utf-8.php | 7 ++-
public_html/admin/install/language/polish.php | 11 +++--
public_html/admin/install/lib-install.php | 17 ++++++++
9 files changed, 52 insertions(+), 28 deletions(-)
diffs (295 lines):
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/index.php
--- a/public_html/admin/install/index.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/index.php Sat Apr 03 10:14:15 2010 +0200
@@ -2,7 +2,7 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | index.php |
// | |
@@ -161,12 +161,12 @@
<p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[32] . ' ' . INST_helpLink('site_name') . '</label> <input type="text" name="site_name" value="' . htmlspecialchars($site_name) . '" size="40"' . XHTML . '></p>
<p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[33] . ' ' . INST_helpLink('site_slogan') . '</label> <input type="text" name="site_slogan" value="' . htmlspecialchars($site_slogan) . '" size="40"' . XHTML . '></p>
- <p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[34] . ' ' . INST_helpLink('db_type') . '</label> <select name="db_type">'
+ <p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[34] . ' ' . INST_helpLink('db_type') . '</label> '
. INST_listOfSupportedDBs($dbconfig_path, $db_selected,
($install_type == 'install' ? true : false)) .
- '</select> ' . '</p>
+ '</p>
<p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[39] . ' ' . INST_helpLink('db_host') . '</label> <input type="text" name="db_host" value="'. htmlspecialchars($db_host) .'" size="20"' . XHTML . '></p>
<p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[40] . ' ' . INST_helpLink('db_name') . '</label> <input type="text" name="db_name" value="'. htmlspecialchars($db_name) . '" size="20"' . XHTML . '></p>
<p><label class="' . $form_label_dir . '">' . $LANG_INSTALL[41] . ' ' . INST_helpLink('db_user') . '</label> <input type="text" name="db_user" value="' . htmlspecialchars($db_user) . '" size="20"' . XHTML . '></p>
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/language/chinese_simplified_utf-8.php
--- a/public_html/admin/install/language/chinese_simplified_utf-8.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/language/chinese_simplified_utf-8.php Sat Apr 03 10:14:15 2010 +0200
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | chinese_simplified_utf-8.php |
// | |
// | Chinese language file for the Geeklog installation script |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2009 by the following authors: |
+// | Copyright (C) 2000-2010 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
@@ -157,7 +157,8 @@
104 => 'Incorrect Admin Directory Path',
105 => 'Sorry, but the admin directory path you entered does not appear to be correct. Please go back and try again.',
106 => 'PostgreSQL',
- 107 => 'Database Password is required for production environments.'
+ 107 => 'Database Password is required for production environments.',
+ 108 => 'No Database Drivers found!'
);
// +---------------------------------------------------------------------------+
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/language/chinese_traditional_utf-8.php
--- a/public_html/admin/install/language/chinese_traditional_utf-8.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/language/chinese_traditional_utf-8.php Sat Apr 03 10:14:15 2010 +0200
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | chinese_traditional_utf-8.php |
// | |
// | Chinese language file for the Geeklog installation script |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2009 by the following authors: |
+// | Copyright (C) 2000-2010 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
@@ -157,7 +157,8 @@
104 => 'Incorrect Admin Directory Path',
105 => 'Sorry, but the admin directory path you entered does not appear to be correct. Please go back and try again.',
106 => 'PostgreSQL',
- 107 => 'Database Password is required for production environments.'
+ 107 => 'Database Password is required for production environments.',
+ 108 => 'No Database Drivers found!'
);
// +---------------------------------------------------------------------------+
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/language/english.php
--- a/public_html/admin/install/language/english.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/language/english.php Sat Apr 03 10:14:15 2010 +0200
@@ -2,7 +2,7 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | english.php |
// | |
@@ -156,7 +156,8 @@
104 => 'Incorrect Admin Directory Path',
105 => 'Sorry, but the admin directory path you entered does not appear to be correct. Please go back and try again.',
106 => 'PostgreSQL',
- 107 => 'Database Password is required for production environments.'
+ 107 => 'Database Password is required for production environments.',
+ 108 => 'No Database Drivers found!'
);
// +---------------------------------------------------------------------------+
@@ -332,7 +333,7 @@
0 => 'Geeklog Installation Support',
'site_name' => 'The name of your website.',
'site_slogan' => 'A simple description of your website.',
- 'db_type' => 'Geeklog can be installed using either a MySQL or Microsoft SQL database. If you are not sure which option to select contact your hosting provider.</p><p class="indent"><strong>Note:</strong> InnoDB Tables may improve performance on (very) large sites, but they also make database backups more complicated.',
+ 'db_type' => 'Geeklog can be installed using either a MySQL, PostgreSQL or Microsoft SQL database. If you are not sure which option to select contact your hosting provider.</p><p class="indent"><strong>Note:</strong> InnoDB Tables may improve performance on (very) large sites, but they also make database backups more complicated.',
'db_host' => 'The network name (or IP address) of your database server. This is typically "localhost". If you are not sure contact your hosting provider.',
'db_name' => 'The name of your database. If you are not sure what this is contact your hosting provider.',
'db_user' => 'Your database user account. If you are not sure what this is contact your hosting provider.',
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/language/german.php
--- a/public_html/admin/install/language/german.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/language/german.php Sat Apr 03 10:14:15 2010 +0200
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | german.php |
// | |
// | German language file for the Geeklog installation script |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2009 by the following authors: |
+// | Copyright (C) 2000-2010 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
@@ -156,7 +156,8 @@
104 => 'Der Pfad für das Admin-Verzeichnis ist nicht korrekt',
105 => 'Der Pfad, den Du für das Admin-Verzeichnis eingegeben hast, scheint nicht korrekt zu sein. Bitte überprüfe Deine Eingabe und versuche es dann noch einmal.',
106 => 'PostgreSQL',
- 107 => 'Database Password is required for production environments.'
+ 107 => 'Für den produktiven Einsatz wird ein Datenbank-Passwort benötigt!',
+ 108 => 'Keine Datenbank-Treiber gefunden!'
);
// +---------------------------------------------------------------------------+
@@ -332,7 +333,7 @@
0 => 'Hilfe zur Geeklog-Installation',
'site_name' => 'Der Name Deiner Website.',
'site_slogan' => 'Ein Motto oder eine kurze Beschreibung Deiner Website.',
- 'db_type' => 'Geeklog kann wahlweise auf einer MySQL- oder einer MS SQL-Datenbank installiert werden. Wenn Du nicht sicher bist, welche Option Du wählen sollst, kontaktiere bitte Deinen Webhoster.</p><p class="indent"><strong>Hinweis:</strong> InnoDB-Tabellen können zu besserer Performance auf (sehr) großen Websites führen, machen den Backup-Prozess aber komplizierter.',
+ 'db_type' => 'Geeklog kann wahlweise auf einer MySQL-, PostgreSQL- oder einer MS SQL-Datenbank installiert werden. Wenn Du nicht sicher bist, welche Option Du wählen sollst, kontaktiere bitte Deinen Webhoster.</p><p class="indent"><strong>Hinweis:</strong> InnoDB-Tabellen können zu besserer Performance auf (sehr) großen Websites führen, machen den Backup-Prozess aber komplizierter.',
'db_host' => 'Der Hostname (oder die IP-Adresse) Deines Datenbank-Servers. Typischerweise ist dies "localhost". Wenn Du nicht sicher bist, kontaktiere bitte Deinen Webhoster.',
'db_name' => 'Der Name Deiner Datenbank. Wenn Du nicht sicher bist was das bedeutet, kontaktiere bitte Deinen Webhoster.',
'db_user' => 'Der Username Deines Datenbank-Accounts. Wenn Du nicht sicher bist was Du eintragen sollst, kontaktiere bitte Deinen Webhoster.',
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/language/hebrew_utf-8.php
--- a/public_html/admin/install/language/hebrew_utf-8.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/language/hebrew_utf-8.php Sat Apr 03 10:14:15 2010 +0200
@@ -2,15 +2,15 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | hebrew_utf-8.php |
// | |
// | Hebrew language file for the Geeklog installation script |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2008-2009 |
+// | Copyright (C) 2008-2010 |
// | http://lior.weissbrod.com |
-// | Version 1 |
+// | Version 1 |
// +---------------------------------------------------------------------------+
// | |
// | This program is free software; you can redistribute it and/or |
@@ -152,7 +152,8 @@
104 => '× ×ª×× ×ספר××ת × ×××× ×× × ×××',
105 => '×צ×ער××, ××× × ×ª×× ×¡×¤×¨××ת ×× ×××× ×©××× ×¡×ª× ××× × × ×¨×× × ×××. ×× × ××××¨× ××××¨× ×× ×¡× ×©× ×ת.',
106 => 'PostgreSQL',
- 107 => 'Database Password is required for production environments.'
+ 107 => 'Database Password is required for production environments.',
+ 108 => 'No Database Drivers found!'
);
// +---------------------------------------------------------------------------+
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/language/japanese_utf-8.php
--- a/public_html/admin/install/language/japanese_utf-8.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/language/japanese_utf-8.php Sat Apr 03 10:14:15 2010 +0200
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | japanese_utf-8.php |
// | |
// | Japanese language file for the Geeklog installation script |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2009 by the following authors: |
+// | Copyright (C) 2000-2010 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
@@ -158,7 +158,8 @@
104 => 'ä¸æ£ãªç®¡çè
ãã¹',
105 => 'å
¥åãã管çè
ã®ãã£ã¬ã¯ããªãã¹ã¯ä¸æ£ç¢ºã§ãããããä¸åº¦ããç´ãã¦ãã ããã',
106 => 'PostgreSQL',
- 107 => 'Database Password is required for production environments.'
+ 107 => 'Database Password is required for production environments.',
+ 108 => 'No Database Drivers found!'
);
// +---------------------------------------------------------------------------+
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/language/polish.php
--- a/public_html/admin/install/language/polish.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/language/polish.php Sat Apr 03 10:14:15 2010 +0200
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | polish.php |
// | |
-// | Polish language file for the Geeklog installation script |
+// | Polish language file for the Geeklog installation script |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2009 by the following authors: |
+// | Copyright (C) 2000-2010 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
@@ -156,7 +156,8 @@
104 => 'Incorrect Admin Directory Path',
105 => 'Sorry, but the admin directory path you entered does not appear to be correct. Please go back and try again.',
106 => 'PostgreSQL',
- 107 => 'Database Password is required for production environments.'
+ 107 => 'Database Password is required for production environments.',
+ 108 => 'No Database Drivers found!'
);
// +---------------------------------------------------------------------------+
@@ -332,7 +333,7 @@
0 => 'Geeklog Wsparcie Instalacji',
'site_name' => 'Nazwa Twojej Strony.',
'site_slogan' => 'Prosty opis Twojej strony.',
- 'db_type' => 'Geeklog can be installed using either a MySQL or Microsoft SQL database. If you are not sure which option to select contact your hosting provider.</p><p class="indent"><strong>Note:</strong> InnoDB Tables may improve performance on (very) large sites, but they also make database backups more complicated.',
+ 'db_type' => 'Geeklog can be installed using either a MySQL, PostgreSQL or Microsoft SQL database. If you are not sure which option to select contact your hosting provider.</p><p class="indent"><strong>Note:</strong> InnoDB Tables may improve performance on (very) large sites, but they also make database backups more complicated.',
'db_host' => 'The network name (or IP address) of your database server. This is typically "localhost". If you are not sure contact your hosting provider.',
'db_name' => 'The name of your database. If you are not sure what this is contact your hosting provider.',
'db_user' => 'Your database user account. If you are not sure what this is contact your hosting provider.',
diff -r 7cb051c40179 -r 1bcacf5076a9 public_html/admin/install/lib-install.php
--- a/public_html/admin/install/lib-install.php Fri Apr 02 19:25:55 2010 +0200
+++ b/public_html/admin/install/lib-install.php Sat Apr 03 10:14:15 2010 +0200
@@ -1260,15 +1260,31 @@
$retval .= '<option value="' . $dbname . '"';
if (! function_exists($info['fn'])) {
$retval .= ' disabled="disabled"';
+ unset($dbs[$dbname]);
} elseif ($dbname == $selected_dbtype) {
$retval .= ' selected="selected"';
}
$retval .= '>' . $info['label'] . '</option>' . LB;
+ } else {
+ unset($dbs[$dbname]);
}
}
+ $num_dbs = count($dbs);
+ if ($num_dbs == 0) {
+ $retval = '<span class="error">' . $LANG_INSTALL[108] . '</span>' . LB;
+ } elseif ($num_dbs == 1) {
+ $remaining = array_keys($dbs);
+ $retval = $dbs[$remaining[0]]['label']
+ . ' <input type="hidden" name="db_type" value="'
+ . $remaining[0] . '"' . XHTML . '>' . LB;
+ } else {
+ $retval = '<select name="db_type">' . LB . $retval . '</select>' . LB;
+ }
+
return $retval;
}
+
/**
* Check for blank database password in production environment
*
@@ -1285,4 +1301,5 @@
return false;
}
}
+
?>
More information about the geeklog-cvs
mailing list