diff options
author | nikrou <nikrou@piwigo.org> | 2009-11-16 19:17:01 +0000 |
---|---|---|
committer | nikrou <nikrou@piwigo.org> | 2009-11-16 19:17:01 +0000 |
commit | 8a299654501db00316a56efda76448a6bb3975e1 (patch) | |
tree | b34f9693380c3e4a69d7c9c45c011fb327560be1 | |
parent | 9a773f003c2c88f3916942b65c36912ff81cecf6 (diff) |
Feature 928 resolved.
Replace include/mysql.inc.php by include/config_database.inc.php to be independant of database engine
Rename database configurations variables by ones in $conf array.
git-svn-id: http://piwigo.org/svn/trunk@4280 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/include/functions_upgrade.php | 2 | ||||
-rw-r--r-- | include/common.inc.php | 6 | ||||
-rw-r--r-- | include/config_default.inc.php | 5 | ||||
-rw-r--r-- | include/constants.php | 2 | ||||
-rw-r--r-- | install.php | 10 | ||||
-rw-r--r-- | install/db/65-database.php | 2 | ||||
-rw-r--r-- | install/db/80-database.php | 6 | ||||
-rw-r--r-- | install/upgrade_1.3.1.php | 4 | ||||
-rw-r--r-- | language/de_DE/install.lang.php | 2 | ||||
-rw-r--r-- | language/de_DE/upgrade.lang.php | 2 | ||||
-rw-r--r-- | language/en_UK/install.lang.php | 2 | ||||
-rw-r--r-- | language/en_UK/upgrade.lang.php | 2 | ||||
-rw-r--r-- | language/es_ES/install.lang.php | 2 | ||||
-rw-r--r-- | language/es_ES/upgrade.lang.php | 2 | ||||
-rw-r--r-- | language/fr_FR/install.lang.php | 2 | ||||
-rw-r--r-- | language/fr_FR/upgrade.lang.php | 2 | ||||
-rw-r--r-- | language/it_IT/install.lang.php | 2 | ||||
-rw-r--r-- | language/it_IT/upgrade.lang.php | 2 | ||||
-rw-r--r-- | language/nl_NL/install.lang.php | 2 | ||||
-rw-r--r-- | language/nl_NL/upgrade.lang.php | 2 | ||||
-rw-r--r-- | language/pl_PL/install.lang.php | 2 | ||||
-rw-r--r-- | language/pl_PL/upgrade.lang.php | 2 | ||||
-rwxr-xr-x | tools/pwg_rel_create.sh | 6 | ||||
-rw-r--r-- | upgrade.php | 12 | ||||
-rw-r--r-- | upgrade_feed.php | 6 |
25 files changed, 46 insertions, 43 deletions
diff --git a/admin/include/functions_upgrade.php b/admin/include/functions_upgrade.php index c7aa23873..1d0fbd969 100644 --- a/admin/include/functions_upgrade.php +++ b/admin/include/functions_upgrade.php @@ -159,7 +159,7 @@ WHERE username = "'.$username.'" { $query = ' SELECT u.password, ui.status -FROM '.$conf['users_table'].' AS u +FROM '.USERS_TABLE.' AS u INNER JOIN '.USER_INFOS_TABLE.' AS ui ON u.'.$conf['user_fields']['id'].'=ui.user_id WHERE '.$conf['user_fields']['username'].'="'.$username.'" diff --git a/include/common.inc.php b/include/common.inc.php index 29bc6b29b..a0ec209ef 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -70,7 +70,7 @@ $header_msgs = array(); $header_notes = array(); $filter = array(); -@include(PHPWG_ROOT_PATH .'include/mysql.inc.php'); +@include(PHPWG_ROOT_PATH .'include/config_database.inc.php'); if (!defined('PHPWG_INSTALLED')) { header('Location: install.php'); @@ -104,8 +104,8 @@ include(PHPWG_ROOT_PATH . 'include/functions.inc.php'); include( PHPWG_ROOT_PATH .'include/template.class.php'); // Database connection -@mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) or my_error( 'mysql_connect', true ); -@mysql_select_db( $cfgBase ) or my_error( 'mysql_select_db', true ); +@mysql_connect( $conf['db_host'], $conf['db_user'], $conf['db_password'] ) or my_error( 'mysql_connect', true ); +@mysql_select_db( $conf['db_base'] ) or my_error( 'mysql_select_db', true ); defined('PWG_CHARSET') and defined('DB_CHARSET') or fatal_error('PWG_CHARSET and/or DB_CHARSET is not defined'); diff --git a/include/config_default.inc.php b/include/config_default.inc.php index a9ef63607..94fcdbb55 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -494,7 +494,10 @@ $conf['apache_authentication'] = false; // // All informations contained in these tables and column are related to // piwigo_users table. -$conf['users_table'] = $prefixeTable.'users'; +// +// You can use a different table for users, if you define associated constant +// default configuration : +// define('USERS_TABLE', $prefixeTable.'users'); // Other tables can be changed, if you define associated constants // Example: diff --git a/include/constants.php b/include/constants.php index 7e429a91c..9c29f0c91 100644 --- a/include/constants.php +++ b/include/constants.php @@ -68,7 +68,7 @@ if (!defined('USER_ACCESS_TABLE')) if (!defined('USER_GROUP_TABLE')) define('USER_GROUP_TABLE', $prefixeTable.'user_group'); if (!defined('USERS_TABLE')) - define('USERS_TABLE', $conf['users_table']); + define('USERS_TABLE', $prefixeTable.'users'); if (!defined('USER_INFOS_TABLE')) define('USER_INFOS_TABLE', $prefixeTable.'user_infos'); if (!defined('USER_FEED_TABLE')) diff --git a/install.php b/install.php index 2e82a9709..135c7fb47 100644 --- a/install.php +++ b/install.php @@ -168,7 +168,7 @@ $infos = array(); $errors = array(); // Open config.php ... if it exists -$config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php'; +$config_file = PHPWG_ROOT_PATH.'include/config_database.inc.php'; if (@file_exists($config_file)) { include($config_file); @@ -291,10 +291,10 @@ if ( isset( $_POST['install'] )) { $step = 2; $file_content = '<?php -$cfgBase = \''.$dbname.'\'; -$cfgUser = \''.$dbuser.'\'; -$cfgPassword = \''.$dbpasswd.'\'; -$cfgHote = \''.$dbhost.'\'; +$conf[\'db_base\'] = \''.$dbname.'\'; +$conf[\'db_user\'] = \''.$dbuser.'\'; +$conf[\'db_password\'] = \''.$dbpasswd.'\'; +$conf[\'db_host\'] = \''.$dbhost.'\'; $prefixeTable = \''.$table_prefix.'\'; diff --git a/install/db/65-database.php b/install/db/65-database.php index b6a5a0a74..2d445ea3f 100644 --- a/install/db/65-database.php +++ b/install/db/65-database.php @@ -255,7 +255,7 @@ ALTER TABLE t1 CHANGE c1 c1 TEXT CHARACTER SET utf8; // +-----------------------------------------------------------------------+ -// changes to write in mysql.inc.php +// changes to write in config_database.inc.php array_push($mysql_changes, 'define(\'PWG_CHARSET\', \''.$pwg_charset.'\'); define(\'DB_CHARSET\', \''.$db_charset.'\'); diff --git a/install/db/80-database.php b/install/db/80-database.php index fd403d8d7..dbc7c5b57 100644 --- a/install/db/80-database.php +++ b/install/db/80-database.php @@ -173,7 +173,7 @@ $list_files = array( 'include_phpwebgallery', 'include_phpwebgallery/config.php', 'include_phpwebgallery/index.htm', -'include_phpwebgallery/mysql.inc.php', +'include_phpwebgallery/config_database.inc.php', 'index.htm', // Comparison between phpwebgallery-1.2.1 and phpwebgallery-1.1.0 'admin/isadmin.php', @@ -927,7 +927,7 @@ $list_files = array( // Comparison between trunk-r3105 and phpwebgallery-2.0.0RC4 'admin/template/goto/theme/roma/images/bottom-left-bg.png', 'admin/template/goto/theme/roma/images/top-left-bg.png', -'include/mysql.inc.php', +'include/config_database.inc.php', 'template-common/lib/ui/ui.accordion.packed.js', 'template-common/lib/ui/ui.core.packed.js', 'template-common/lib/ui/ui.datepicker.css', @@ -943,7 +943,7 @@ $list_files = array( ); $list_exlude_files = array( -'include/mysql.inc.php', +'include/config_database.inc.php', ); diff --git a/install/upgrade_1.3.1.php b/install/upgrade_1.3.1.php index 69257dc5c..40657c7f7 100644 --- a/install/upgrade_1.3.1.php +++ b/install/upgrade_1.3.1.php @@ -579,7 +579,7 @@ UPDATE '.CATEGORIES_TABLE.' } // load the config file -$config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php'; +$config_file = PHPWG_ROOT_PATH.'include/config_database.inc.php'; $config_file_contents = @file_get_contents($config_file); if ($config_file_contents === false) { @@ -595,7 +595,7 @@ if (!is_writable($config_file)) die('FILE NOT WRITABLE '.$config_file); } -// changes to write in mysql.inc.php +// changes to write in config_database.inc.php array_push($mysql_changes, 'define(\'PHPWG_INSTALLED\', true);'); // Send infos diff --git a/language/de_DE/install.lang.php b/language/de_DE/install.lang.php index 8ae41d833..d435d66a0 100644 --- a/language/de_DE/install.lang.php +++ b/language/de_DE/install.lang.php @@ -54,7 +54,7 @@ $lang['step2_pwd'] = 'Passwort'; $lang['step2_pwd_info'] = 'Administratorpasswort'; $lang['step2_pwd_conf'] = 'Passwort [Bestätigung]'; $lang['step2_pwd_conf_info'] = 'Wiederholen Sie das eingegebene Passwort'; -$lang['step1_err_copy'] = 'Kopieren Sie den rosa Text ohne die Bindestriche und fügen Sie ihn in die Datei "include / mysql.inc.php" auf dem Webserver ein (Warnung: die Datei "mysql.inc.php" darf nur die rosa Zeichen enthalten, nicht mehr und nicht weniger)'; +$lang['step1_err_copy'] = 'Kopieren Sie den rosa Text ohne die Bindestriche und fügen Sie ihn in die Datei "include / config_database.inc.php" auf dem Webserver ein (Warnung: die Datei "config_database.inc.php" darf nur die rosa Zeichen enthalten, nicht mehr und nicht weniger)'; $lang['install_help'] = 'Brauchen Sie Hilfe? Stellen Sie Ihre Frage auf der <a href="%s"> Forum Piwigo </a>.'; $lang['install_end_message'] = 'Die Konfiguration der Piwigo abgeschlossen ist, hier ist der nächste Schritt<br><br> * Gehen Sie zum Anmelden auf die Startseite: [ <a href="./identification.php">Identifizierung</a> ] und verwenden Sie die Login / Passwort für Webmaster<br> diff --git a/language/de_DE/upgrade.lang.php b/language/de_DE/upgrade.lang.php index 75b246eaf..117cb12ac 100644 --- a/language/de_DE/upgrade.lang.php +++ b/language/de_DE/upgrade.lang.php @@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Führen Sie einen Wartungs-Check am [Adm $lang['deactivated plugins'] = 'Als Vorsichtsmaßnahme folgenden Plugins wurden deaktiviert. Sie müssen prüfen, ob Plugins aktualisieren, bevor sie reactiving:'; $lang['upgrade login message'] = 'Nur Administrator können Upgrade ausführen : Bitte melden Sie sich an unter.'; $lang['You do not have access rights to run upgrade'] = 'Sie haben nicht das Recht auf Zugang zum Upgrade ausführen'; -$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, vor <b>?></b>, wird Folgendes eingefügt:'; +$lang['in include/config_database.inc.php, before ?>, insert:'] = 'In <i>include/config_database.inc.php</i>, vor <b>?></b>, wird Folgendes eingefügt:'; // Upgrade informations from upgrade_1.3.1.php $lang['all sub-categories of private categories become private'] = 'Alle Unter-Kategorien von privaten Gruppen wirden privaten'; diff --git a/language/en_UK/install.lang.php b/language/en_UK/install.lang.php index a921e0c76..716393b7d 100644 --- a/language/en_UK/install.lang.php +++ b/language/en_UK/install.lang.php @@ -37,7 +37,7 @@ $lang['step1_err_db'] = 'Connection to server succeed, but it was impossible to $lang['step1_err_server'] = 'Can\'t connect to server'; $lang['step1_err_copy_2'] = 'The next step of the installation is now possible'; $lang['step1_err_copy_next'] = 'next step'; -$lang['step1_err_copy'] = 'Copy the text in pink between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in pink, no line return or space character)'; +$lang['step1_err_copy'] = 'Copy the text in pink between hyphens and paste it into the file "include/config_database.inc.php"(Warning : config_database.inc.php must only contain what is in pink, no line return or space character)'; $lang['step1_host'] = 'MySQL host'; $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr'; diff --git a/language/en_UK/upgrade.lang.php b/language/en_UK/upgrade.lang.php index 275bc8e2e..01f64e50d 100644 --- a/language/en_UK/upgrade.lang.php +++ b/language/en_UK/upgrade.lang.php @@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Perform a maintenance check in [Administ $lang['deactivated plugins'] = 'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'; $lang['upgrade login message'] = 'Only administrator can run upgrade: please sign in below.'; $lang['You do not have access rights to run upgrade'] = 'You do not have access rights to run upgrade'; -$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:'; +$lang['in include/config_database.inc.php, before ?>, insert:'] = 'In <i>include/config_database.inc.php</i>, before <b>?></b>, insert:'; // Upgrade informations from upgrade_1.3.1.php $lang['all sub-categories of private categories become private'] = 'All sub-categories of private categories become private'; diff --git a/language/es_ES/install.lang.php b/language/es_ES/install.lang.php index 8a9335716..e4d9d71e6 100644 --- a/language/es_ES/install.lang.php +++ b/language/es_ES/install.lang.php @@ -54,7 +54,7 @@ $lang['step2_pwd'] = 'Palabra de paso'; $lang['step2_pwd_info'] = 'Debe quedar confidencial, permite acceder al tabla de administración.'; $lang['step2_pwd_conf'] = 'Palabra de paso [Confirmar]'; $lang['step2_pwd_conf_info'] = 'Comprobación'; -$lang['step1_err_copy'] = 'Copie el texto en rosa entre las rayas y pegúelo en el fichero mysql.inc.php que se encuentra en el repertorio " include " a la base del lugar donde usted instaló a Piwigo (el fichero mysql.inc.php debe contener SÓLO lo que está en rosa entre las rayas, ninguna vuelta a la lÃnea o espacio es autorizado)'; +$lang['step1_err_copy'] = 'Copie el texto en rosa entre las rayas y pegúelo en el fichero config_database.inc.php que se encuentra en el repertorio " include " a la base del lugar donde usted instaló a Piwigo (el fichero config_database.inc.php debe contener SÓLO lo que está en rosa entre las rayas, ninguna vuelta a la lÃnea o espacio es autorizado)'; $lang['install_help'] = '¿ Necesidad de ayudante? Plantee su cuestión sobre él <a href="%s">foro de Piwigo</a>.'; $lang['install_end_message'] = 'La configuración de la aplicación correctamente se celebró, coloca en la etapa próxima<br><br> * Vaya sobre la página de identificación y conéctese con pseudo dado para el webmaster<br> diff --git a/language/es_ES/upgrade.lang.php b/language/es_ES/upgrade.lang.php index 1a9a24999..4177e4156 100644 --- a/language/es_ES/upgrade.lang.php +++ b/language/es_ES/upgrade.lang.php @@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Por favor, efectúes un mantenimiento en $lang['deactivated plugins'] = 'Por precaución, el plugins siguiente han sido desactivados. Verifique si existen unas posturas al dÃa antes de reactivarlas:'; $lang['upgrade login message'] = 'Sólo un administrador puede lanzar la puesta al dÃa: por favor, identifiqúese más abajo.'; $lang['You do not have access rights to run upgrade'] = 'Usted no tiene los derechos necessaires para lanzar la puesta al dÃa.'; -/* TODO */$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:'; +/* TODO */$lang['in include/config_database.inc.php, before ?>, insert:'] = 'In <i>include/config_database.inc.php</i>, before <b>?></b>, insert:'; // Upgrade informations from upgrade_1.3.1.php $lang['all sub-categories of private categories become private'] = 'Todas las subcategorÃas de categorÃas privadas se vuelven privadas'; diff --git a/language/fr_FR/install.lang.php b/language/fr_FR/install.lang.php index 6a593ab32..860dd7b4a 100644 --- a/language/fr_FR/install.lang.php +++ b/language/fr_FR/install.lang.php @@ -54,7 +54,7 @@ $lang['step2_pwd'] = 'Mot de passe'; $lang['step2_pwd_info'] = 'Il doit rester confidentiel, il permet d\'accéder au panneau d\'administration.'; $lang['step2_pwd_conf'] = 'Mot de passe [ Confirmer ]'; $lang['step2_pwd_conf_info'] = 'Vérification'; -$lang['step1_err_copy'] = 'Copiez le texte en rose entre les tirets et collez-le dans le fichier mysql.inc.php qui se trouve dans le répertoire "include" à la base de l\'endroit où vous avez installé Piwigo (le fichier mysql.inc.php ne doit comporter QUE ce qui est en rose entre les tirets, aucun retour à la ligne ou espace n\'est autorisé)'; +$lang['step1_err_copy'] = 'Copiez le texte en rose entre les tirets et collez-le dans le fichier config_database.inc.php qui se trouve dans le répertoire "include" à la base de l\'endroit où vous avez installé Piwigo (le fichier config_database.inc.php ne doit comporter QUE ce qui est en rose entre les tirets, aucun retour à la ligne ou espace n\'est autorisé)'; $lang['install_help'] = 'Besoin d\'aide ? Posez votre question sur le <a href="%s">forum de Piwigo</a>.'; $lang['install_end_message'] = 'La configuration de l\'application s\'est correctement déroulée, place à la prochaine étape<br><br> * allez sur la page d\'identification et connectez-vous avec le pseudo donné pour le webmaster<br> diff --git a/language/fr_FR/upgrade.lang.php b/language/fr_FR/upgrade.lang.php index 565c8c606..83a7c90ca 100644 --- a/language/fr_FR/upgrade.lang.php +++ b/language/fr_FR/upgrade.lang.php @@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Veuillez effectuer une maintenance dans $lang['deactivated plugins'] = 'Par précaution, les plugins suivants ont été désactivés. Vérifiez s\'il existe des mises à jour avant de les réactiver:'; $lang['upgrade login message'] = 'Seul un administrateur peut lancer la mise à jour: veuillez vous identifier ci-dessous.'; $lang['You do not have access rights to run upgrade'] = 'Vous n\'avez pas les droits necessaires pour lancer la mise à jour.'; -$lang['in include/mysql.inc.php, before ?>, insert:'] = 'Dans le fichier <i>include/mysql.inc.php</i>, avant <b>?></b>, insérez:'; +$lang['in include/config_database.inc.php, before ?>, insert:'] = 'Dans le fichier <i>include/config_database.inc.php</i>, avant <b>?></b>, insérez:'; // Upgrade informations from upgrade_1.3.1.php $lang['all sub-categories of private categories become private'] = 'Toutes les sous-catégories de catégories privées deviennent privées'; diff --git a/language/it_IT/install.lang.php b/language/it_IT/install.lang.php index 7c524c3aa..1072bbe64 100644 --- a/language/it_IT/install.lang.php +++ b/language/it_IT/install.lang.php @@ -54,7 +54,7 @@ $lang['step2_pwd'] = 'Password'; $lang['step2_pwd_info'] = 'da conservare con cura. Permette l\'accesso al pannello di amministrazione'; $lang['step2_pwd_conf'] = 'Password [confermare]'; $lang['step2_pwd_conf_info'] = 'verifica'; -$lang['step1_err_copy'] = 'Copiate il testo in rosa trà i trattini e mettetelo nel file mysql.inc.php che si trova nella directory "include" alla base del vostro sito dove aveto installato Piwigo (il file mysql.inc.php non deve contenere altro che ciò che è in rosa tra i trattini, nessun ritorno a capo o spazio è autorizzato)'; +$lang['step1_err_copy'] = 'Copiate il testo in rosa trà i trattini e mettetelo nel file config_database.inc.php che si trova nella directory "include" alla base del vostro sito dove aveto installato Piwigo (il file config_database.inc.php non deve contenere altro che ciò che è in rosa tra i trattini, nessun ritorno a capo o spazio è autorizzato)'; $lang['install_help'] = 'Bisogno di un aiuto? Visitate il <a href="%s">forum di Piwigo</a>.'; $lang['install_end_message'] = 'La configurazione di Piwigo è conclusa. Procedete al prossimo step<br><br> * collegatevi alla pagina d\'accesso e usare come nome d\'utente e password quello del Webmaster<br> diff --git a/language/it_IT/upgrade.lang.php b/language/it_IT/upgrade.lang.php index e0f247c40..cebda9ca6 100644 --- a/language/it_IT/upgrade.lang.php +++ b/language/it_IT/upgrade.lang.php @@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Se riscontrate dei problemi, effettuare $lang['deactivated plugins'] = 'Per precauzione, i plugins sono stati disattivati. Verificate se non esistono degli aggiornamenti prima di riattivarli:'; $lang['upgrade login message'] = 'Solo un\'amministratore può eseguire l\'aggiornamento: identificatevi.'; $lang['You do not have access rights to run upgrade'] = 'Non avete le autorizzazioni necessarie per effettuare l\'aggiornamento'; -$lang['in include/mysql.inc.php, before ?>, insert:'] = 'Nel file <i>include/mysql.inc.php</i>, prima di <b>?></b>, inserire:'; +$lang['in include/config_database.inc.php, before ?>, insert:'] = 'Nel file <i>include/config_database.inc.php</i>, prima di <b>?></b>, inserire:'; // Upgrade informations from upgrade_1.3.1.php $lang['all sub-categories of private categories become private'] = 'Tutte le sottocategorie delle categorie private diventono private'; diff --git a/language/nl_NL/install.lang.php b/language/nl_NL/install.lang.php index e8399e473..e0f635207 100644 --- a/language/nl_NL/install.lang.php +++ b/language/nl_NL/install.lang.php @@ -37,7 +37,7 @@ $lang['step1_err_db'] = 'De verbinding met de server is geslaagd, maar het is ni $lang['step1_err_server'] = 'Geen verbinding met de server'; $lang['step1_err_copy_2'] = 'Het is nu mogelijk om verder te gaan met de volgende stap van de installatie'; $lang['step1_err_copy_next'] = 'volgende stap'; -$lang['step1_err_copy'] = 'Kopieer de tekst tussen de lijnen en plak deze in het bestand "include/mysql.inc.php"(Waarschuwing: mysql.inc.php mag alleen het roze gedeelte bevatten, geen return of extra spatie). Dit moet alleen wanneer dit bestand geen schrijfrechten'; +$lang['step1_err_copy'] = 'Kopieer de tekst tussen de lijnen en plak deze in het bestand "include/config_database.inc.php"(Waarschuwing: config_database.inc.php mag alleen het roze gedeelte bevatten, geen return of extra spatie). Dit moet alleen wanneer dit bestand geen schrijfrechten'; $lang['step1_host'] = 'MySQL host'; $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr'; diff --git a/language/nl_NL/upgrade.lang.php b/language/nl_NL/upgrade.lang.php index 87a6ddb29..ba1d1c9d6 100644 --- a/language/nl_NL/upgrade.lang.php +++ b/language/nl_NL/upgrade.lang.php @@ -35,7 +35,7 @@ $lang['perform a maintenance check'] = 'Perform a maintenance check in [Administ $lang['deactivated plugins'] = 'As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'; $lang['upgrade login message'] = 'Only administrator can run upgrade: please sign in below.'; $lang['You do not have access rights to run upgrade'] = 'You do not have access rights to run upgrade'; -$lang['in include/mysql.inc.php, before ?>, insert:'] = 'In <i>include/mysql.inc.php</i>, before <b>?></b>, insert:'; +$lang['in include/config_database.inc.php, before ?>, insert:'] = 'In <i>include/config_database.inc.php</i>, before <b>?></b>, insert:'; // Upgrade informations from upgrade_1.3.1.php $lang['all sub-categories of private categories become private'] = 'All sub-categories of private categories become private'; diff --git a/language/pl_PL/install.lang.php b/language/pl_PL/install.lang.php index 37ada6308..266b70c09 100644 --- a/language/pl_PL/install.lang.php +++ b/language/pl_PL/install.lang.php @@ -37,7 +37,7 @@ $lang['step1_err_db'] = 'PoÅ‚Ä…czenie do serwera powiodÅ‚o siÄ™, ale nie byÅ‚o m $lang['step1_err_server'] = 'Nie można poÅ‚Ä…czyć sie do serwera'; $lang['step1_err_copy_2'] = 'Teraz mozliwy jest nastÄ™pny krok instalacji'; $lang['step1_err_copy_next'] = 'nastÄ™pny krok'; -$lang['step1_err_copy'] = 'Skopiuj tekst zaznaczony na różowo pomiÄ™dzy cudzysÅ‚owiami i wklej do pliku "include/mysql.inc.php"(Uwaga : mysql.inc.php musi zawierać tylko to co jest na różowo bez żadnych znaków koÅ„ca linii czy spacji)'; +$lang['step1_err_copy'] = 'Skopiuj tekst zaznaczony na różowo pomiÄ™dzy cudzysÅ‚owiami i wklej do pliku "include/config_database.inc.php"(Uwaga : config_database.inc.php musi zawierać tylko to co jest na różowo bez żadnych znaków koÅ„ca linii czy spacji)'; $lang['step1_host'] = 'MySQL host'; $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr'; diff --git a/language/pl_PL/upgrade.lang.php b/language/pl_PL/upgrade.lang.php index 2dcdad47d..ec4d32887 100644 --- a/language/pl_PL/upgrade.lang.php +++ b/language/pl_PL/upgrade.lang.php @@ -34,7 +34,7 @@ $lang['perform a maintenance check'] = 'Jeżeli napotkasz jakiÅ› problem wykonaj $lang['deactivated plugins'] = 'W ramach zabezpieczenia zostÄ…Å‚y deaktywowane nastÄ™pujÄ…ce wtyczki. Przed ich ponownÄ… aktywacjÄ… musisz sprawdzić dostÄ™pność aktualizacji dla nich:'; $lang['upgrade login message'] = 'Tylko administrator może wykonać aktualizacjÄ™: zaloguj siÄ™ poniżej.'; $lang['You do not have access rights to run upgrade'] = 'Nie masz uprawnieÅ„ do wykonania aktualizacji'; -$lang['in include/mysql.inc.php, before ?>, insert:'] = 'W pliku <i>include/mysql.inc.php</i>, przed <b>?></b>, wstaw:'; +$lang['in include/config_database.inc.php, before ?>, insert:'] = 'W pliku <i>include/config_database.inc.php</i>, przed <b>?></b>, wstaw:'; // Upgrade informations from upgrade_1.3.1.php $lang['all sub-categories of private categories become private'] = 'Wszystkie podkategorie kategorii prywatnych stanÄ… siÄ™ prywatne'; diff --git a/tools/pwg_rel_create.sh b/tools/pwg_rel_create.sh index 0dadbe759..424b703d9 100755 --- a/tools/pwg_rel_create.sh +++ b/tools/pwg_rel_create.sh @@ -34,9 +34,9 @@ mkdir $version # cvs export -r $tag -d $version phpwebgallery svn export http://piwigo.org/svn/tags/$tag $name -# creating mysql.inc.php empty and writeable -touch $name/include/mysql.inc.php -chmod a+w $name/include/mysql.inc.php +# creating config_database.inc.php empty and writeable +touch $name/include/config_database.inc.php +chmod a+w $name/include/config_database.inc.php # find $name -name "*.php" \ # | xargs grep -l 'branch 1.7' \ diff --git a/upgrade.php b/upgrade.php index 5dc698f3c..a425ec731 100644 --- a/upgrade.php +++ b/upgrade.php @@ -24,7 +24,7 @@ define('PHPWG_ROOT_PATH', './'); // load config file -$config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php'; +$config_file = PHPWG_ROOT_PATH.'include/config_database.inc.php'; $config_file_contents = @file_get_contents($config_file); if ($config_file_contents === false) { @@ -40,7 +40,7 @@ include_once(PHPWG_ROOT_PATH.'include/functions.inc.php'); include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php'); -include(PHPWG_ROOT_PATH.'include/mysql.inc.php'); +include(PHPWG_ROOT_PATH.'include/config_database.inc.php'); include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); @include(PHPWG_ROOT_PATH. 'include/config_local.inc.php'); @@ -50,8 +50,8 @@ include_once(PHPWG_ROOT_PATH.'include/constants.php'); define('PREFIX_TABLE', $prefixeTable); // Database connection -mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) or die ( "Could not connect to database server" ); -mysql_select_db( $cfgBase ) or die ( "Could not connect to database" ); +mysql_connect( $conf['db_host'], $conf['db_user'], $conf['db_password'] ) or die ( "Could not connect to database server" ); +mysql_select_db( $conf['db_base'] ) or die ( "Could not connect to database" ); if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') and defined('DB_CHARSET') and DB_CHARSET!='' ) { @@ -262,7 +262,7 @@ if (isset($_POST['submit']) and check_upgrade()) $conf['die_on_sql_error'] = false; include($upgrade_file); - // Something to add in mysql.inc.php? + // Something to add in config_database.inc.php? if (!empty($mysql_changes)) { $config_file_contents = @@ -273,7 +273,7 @@ if (isset($_POST['submit']) and check_upgrade()) if (!@file_put_contents($config_file, $config_file_contents)) { array_push($page['infos'], - l10n('in include/mysql.inc.php, before ?>, insert:') . ' + l10n('in include/config_database.inc.php, before ?>, insert:') . ' <p><textarea rows="4" cols="40">'.implode("\r\n" , $mysql_changes).'</textarea></p>' ); } diff --git a/upgrade_feed.php b/upgrade_feed.php index 4d70d66bb..21b10393d 100644 --- a/upgrade_feed.php +++ b/upgrade_feed.php @@ -32,7 +32,7 @@ define('PHPWG_ROOT_PATH', './'); include_once(PHPWG_ROOT_PATH.'include/functions.inc.php'); include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php'); -include(PHPWG_ROOT_PATH.'include/mysql.inc.php'); +include(PHPWG_ROOT_PATH.'include/config_database.inc.php'); include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); @include(PHPWG_ROOT_PATH. 'include/config_local.inc.php'); @@ -54,8 +54,8 @@ define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db'); // | Database connection | // +-----------------------------------------------------------------------+ -mysql_connect($cfgHote, $cfgUser, $cfgPassword) or die("Could not connect to database server"); -mysql_select_db($cfgBase) or die("Could not connect to database"); +mysql_connect($conf['db_host'], $conf['db_user'], $conf['db_password']) or die("Could not connect to database server"); +mysql_select_db($conf['db_base']) or die("Could not connect to database"); if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') and defined('DB_CHARSET') and DB_CHARSET!='' ) { |