Skip to content

Commit

Permalink
Feature 1522 : move database config file to local directory
Browse files Browse the repository at this point in the history
(include/config_database.inc.php becomes local/config/database.inc.php)

git-svn-id: http://piwigo.org/svn/trunk@5213 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
nikrou committed Mar 21, 2010
1 parent 76b2701 commit 85c1c1b
Show file tree
Hide file tree
Showing 24 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion include/common.inc.php
Expand Up @@ -70,7 +70,7 @@ function sanitize_mysql_kv(&$v, $k)
$header_notes = array();
$filter = array();

@include(PHPWG_ROOT_PATH .'include/config_database.inc.php');
@include(PHPWG_ROOT_PATH .'local/config/database.inc.php');
if (!defined('PHPWG_INSTALLED'))
{
header('Location: install.php');
Expand Down
8 changes: 4 additions & 4 deletions install.php
Expand Up @@ -122,9 +122,9 @@
$infos = array();
$errors = array();

// database config file migration : mysql.inc.php et config_database.inc.php
// database config file migration : mysql.inc.php et database.inc.php
$old_config_file = PHPWG_ROOT_PATH . 'include/mysql.inc.php';
$config_file = PHPWG_ROOT_PATH . 'include/config_database.inc.php';
$config_file = PHPWG_ROOT_PATH . 'local/config/database.inc.php';
if (!file_exists($config_file) && file_exists($old_config_file))
{
$step = 3;
Expand Down Expand Up @@ -304,7 +304,7 @@
{
$html_content = htmlentities( $file_content, ENT_QUOTES );
$html_content = nl2br( $html_content );
$error_copy = l10n('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)');
$error_copy = l10n('Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)');
$error_copy .= '<br>--------------------------------------------------------------------<br>';
$error_copy .= '<span class="sql_content">' . $html_content . '</span>';
$error_copy .= '<br>--------------------------------------------------------------------<br>';
Expand Down Expand Up @@ -391,7 +391,7 @@
{
$html_content = htmlentities( $file_content, ENT_QUOTES );
$html_content = nl2br( $html_content );
$error_copy = l10n('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)');
$error_copy = l10n('Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)');
$error_copy .= '<br>--------------------------------------------------------------------<br>';
$error_copy .= '<span class="sql_content">' . $html_content . '</span>';
$error_copy .= '<br>--------------------------------------------------------------------<br>';
Expand Down
2 changes: 1 addition & 1 deletion install/db/65-database.php
Expand Up @@ -255,7 +255,7 @@ function upgrade65_change_table_to_charset($table, $field_definitions, $db_chars


// +-----------------------------------------------------------------------+
// changes to write in config_database.inc.php
// changes to write in database.inc.php
array_push($mysql_changes,
'define(\'PWG_CHARSET\', \''.$pwg_charset.'\');
define(\'DB_CHARSET\', \''.$db_charset.'\');
Expand Down
6 changes: 3 additions & 3 deletions install/db/80-database.php
Expand Up @@ -173,7 +173,7 @@
'include_phpwebgallery',
'include_phpwebgallery/config.php',
'include_phpwebgallery/index.htm',
'include_phpwebgallery/config_database.inc.php',
'include_phpwebgallery/local/config/database.inc.php',
'index.htm',
// Comparison between phpwebgallery-1.2.1 and phpwebgallery-1.1.0
'admin/isadmin.php',
Expand Down Expand Up @@ -927,7 +927,7 @@
// 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/config_database.inc.php',
'local/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',
Expand All @@ -943,7 +943,7 @@
);

$list_exlude_files = array(
'include/config_database.inc.php',
'local/config/database.inc.php',
);


Expand Down
4 changes: 2 additions & 2 deletions install/upgrade_1.3.1.php
Expand Up @@ -579,7 +579,7 @@
}

// load the config file
$config_file = PHPWG_ROOT_PATH.'include/config_database.inc.php';
$config_file = PHPWG_ROOT_PATH.'local/config/database.inc.php';
$config_file_contents = @file_get_contents($config_file);
if ($config_file_contents === false)
{
Expand All @@ -595,7 +595,7 @@
die('FILE NOT WRITABLE '.$config_file);
}

// changes to write in config_database.inc.php
// changes to write in database.inc.php
array_push($mysql_changes, 'define(\'PHPWG_INSTALLED\', true);');

// Send infos
Expand Down
2 changes: 1 addition & 1 deletion language/de_DE/install.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['Can\'t connect to server'] = "Es konnte keine Verbindung zum Datenbankserver aufgebaut werden";
$lang['The next step of the installation is now possible'] = "Der nächste Schritt der Installation ist nun möglich";
$lang['next step'] = "nächster Schritt";
$lang['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)'] = "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['Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)'] = "Kopieren Sie den rosa Text ohne die Bindestriche und fügen Sie ihn in die Datei \"local/config/database.inc.php\" auf dem Webserver ein (Warnung: die Datei \"database.inc.php\" darf nur die rosa Zeichen enthalten, nicht mehr und nicht weniger)";
$lang['Database type'] = "Database type";
$lang['The type of database your piwigo data will be store in'] = "The type of database your piwigo data will be store in";
$lang['Host'] = "Host";
Expand Down
2 changes: 1 addition & 1 deletion language/de_DE/upgrade.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'] = "Als Vorsichtsmaßnahme folgenden Plugins wurden deaktiviert. Sie müssen prüfen, ob Plugins aktualisieren, bevor sie reactiving:";
$lang['Only administrator can run upgrade: please sign in below.'] = "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 <i>include/config_database.inc.php</i>, before <b>?></b>, insert:'] = "In <i>include/config_database.inc.php</i>, vor <b>?></b>, wird Folgendes eingefügt:";
$lang['In <i>%s</i>, before <b>?></b>, insert:'] = "In <i>%s</i>, vor <b>?></b>, wird Folgendes eingefügt:";
$lang['All sub-categories of private categories become private'] = "Alle Unter-Kategorien von privaten Gruppen wirden privaten";
$lang['User permissions and group permissions have been erased'] = "Benutzer und Gruppen Berechtigungen wurden gelöscht";
$lang['Only thumbnails prefix and webmaster mail address have been saved from previous configuration'] = "Nur Miniaturansichten Präfix und Webmaster Mail-Adresse gespeichert wurden aus früheren Konfiguration";
Expand Down
2 changes: 1 addition & 1 deletion language/en_UK/install.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['Can\'t connect to server'] = "Can't connect to server";
$lang['The next step of the installation is now possible'] = "The next step of the installation is now possible";
$lang['next step'] = "next step";
$lang['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)'] = "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['Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)'] = "Copy the text in pink between hyphens and paste it into the file \"local/config/database.inc.php\"(Warning : database.inc.php must only contain what is in pink, no line return or space character)";
$lang['Database type'] = "Database type";
$lang['The type of database your piwigo data will be store in'] = "The type of database your piwigo data will be store in";
$lang['Host'] = "Host";
Expand Down
2 changes: 1 addition & 1 deletion language/en_UK/upgrade.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'] = "As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:";
$lang['Only administrator can run upgrade: please sign in below.'] = "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 <i>include/config_database.inc.php</i>, before <b>?></b>, insert:'] = "In <i>include/config_database.inc.php</i>, before <b>?></b>, insert:";
$lang['In <i>%s</i>, before <b>?></b>, insert:'] = "In <i>%s</i>, before <b>?></b>, insert:";
$lang['All sub-categories of private categories become private'] = "All sub-categories of private categories become private";
$lang['User permissions and group permissions have been erased'] = "User permissions and group permissions have been erased";
$lang['Only thumbnails prefix and webmaster mail address have been saved from previous configuration'] = "Only thumbnails prefix and webmaster mail address have been saved from previous configuration";
Expand Down
2 changes: 1 addition & 1 deletion language/es_ES/install.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['Can\'t connect to server'] = "Imposible conectarse al servidor";
$lang['The next step of the installation is now possible'] = "Puede seguir con la instalación sigiente";
$lang['next step'] = "Etapa siguiente";
$lang['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)'] = "Copie el texto en rosa entre los guillones y pegúelo en el fichero mysql.inc.php que se encuentra en el repertorio \" include \" a la base del lugar donde usted instaló 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['Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)'] = "Copie el texto en rosa entre los guillones y pegúelo en el fichero database.inc.php que se encuentra en el repertorio \"local/config\" a la base del lugar donde usted instaló Piwigo (el fichero 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['Database type'] = "Database type";
$lang['The type of database your piwigo data will be store in'] = "The type of database your piwigo data will be store in";
$lang['Host'] = "Huésped MySQL";
Expand Down
2 changes: 1 addition & 1 deletion language/es_ES/upgrade.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'] = "Por precaución, el plugins siguiente han sido desactivados. Verifique si existen unas actualización antes de reactivarlos:";
$lang['Only administrator can run upgrade: please sign in below.'] = "Sólo un administrador puede lanzar la actualización: por favor, identifiqúese más abajo.";
$lang['You do not have access rights to run upgrade'] = "";
$lang['In <i>include/config_database.inc.php</i>, before <b>?></b>, insert:'] = "";
$lang['In <i>%s</i>, before <b>?></b>, insert:'] = "";
$lang['All sub-categories of private categories become private'] = "Todas las subcategorías de categorías privadas se vuelven privadas";
$lang['User permissions and group permissions have been erased'] = "Las autorizaciones de los usuarios y de los grupos han sido borradas";
$lang['Only thumbnails prefix and webmaster mail address have been saved from previous configuration'] = "Sólo el prefijo de las miniaturas y el email del webmestre han sido salvaguardados por la configuración precedente";
Expand Down
2 changes: 1 addition & 1 deletion language/fr_FR/install.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['Can\'t connect to server'] = "Impossible de se connecter au serveur";
$lang['The next step of the installation is now possible'] = "La prochaine étape d'installation est désormais possible";
$lang['next step'] = "étape suivante";
$lang['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)'] = "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['Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)'] = "Copiez le texte en rose entre les tirets et collez-le dans le fichier database.inc.php qui se trouve dans le répertoire \"include\" à la base de l'endroit où vous avez installé Piwigo (le fichier 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['Database type'] = "Type de base de données";
$lang['The type of database your piwigo data will be store in'] = "La base de données à utiliser pour installer piwigo";
$lang['Host'] = "Hôte";
Expand Down
2 changes: 1 addition & 1 deletion language/fr_FR/upgrade.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'] = "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['Only administrator can run upgrade: please sign in below.'] = "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 <i>include/config_database.inc.php</i>, before <b>?></b>, insert:'] = "Dans le fichier <i>include/config_database.inc.php</i>, avant <b>?></b>, insérez:";
$lang['In <i>%s</i>, before <b>?></b>, insert:'] = "Dans le fichier <i>%s</i>, avant <b>?></b>, insérez:";
$lang['All sub-categories of private categories become private'] = "Toutes les sous-catégories de catégories privées deviennent privées";
$lang['User permissions and group permissions have been erased'] = "Les permissions des utilisateurs et des groupes ont été effacées";
$lang['Only thumbnails prefix and webmaster mail address have been saved from previous configuration'] = "Seuls le préfixe des miniatures et l'adresse email du webmestre ont étés sauvegardés de la configuration précédente";
Expand Down
2 changes: 1 addition & 1 deletion language/it_IT/install.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['Can\'t connect to server'] = "Non è stato possibile connettersi al server";
$lang['The next step of the installation is now possible'] = "Il prossimo step d'installazione è oramail possibile";
$lang['next step'] = "step successivo";
$lang['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)'] = "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['Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)'] = "Copiate il testo in rosa trà i trattini e mettetelo nel file database.inc.php che si trova nella directory \"local/config\" alla base del vostro sito dove aveto installato Piwigo (il file database.inc.php non deve contenere altro che ciò che è in rosa tra i trattini, nessun ritorno a capo o spazio è autorizzato)";
$lang['Database type'] = "Tipo di Database";
$lang['The type of database your piwigo data will be store in'] = "La base dati da utilizzare per installare Piwigo";
$lang['Host'] = "Host";
Expand Down
2 changes: 1 addition & 1 deletion language/it_IT/upgrade.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:'] = "Per precauzione, i plugins sono stati disattivati. Verificate se non esistono degli aggiornamenti prima di riattivarli:";
$lang['Only administrator can run upgrade: please sign in below.'] = "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 <i>include/config_database.inc.php</i>, before <b>?></b>, insert:'] = "Nel file <i>include/config_database.inc.php</i>, prima di <b>?></b>, inserire:";
$lang['In <i>%s</i>, before <b>?></b>, insert:'] = "Nel file <i>%s</i>, prima di <b>?></b>, inserire:";
$lang['All sub-categories of private categories become private'] = "Tutte le sottocategorie delle categorie private diventono private";
$lang['User permissions and group permissions have been erased'] = "I permessi degli utenti e dei gruppi sono stati cancellati";
$lang['Only thumbnails prefix and webmaster mail address have been saved from previous configuration'] = "Solo il prefisso delle miniature e l'email del webmaster sono stati recuperati dalla precedente configurazione";
Expand Down
2 changes: 1 addition & 1 deletion language/nl_NL/install.lang.php
Expand Up @@ -37,7 +37,7 @@
$lang['Can\'t connect to server'] = "Geen verbinding met de server";
$lang['The next step of the installation is now possible'] = "Het is nu mogelijk om verder te gaan met de volgende stap van de installatie";
$lang['next step'] = "volgende stap";
$lang['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)'] = "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['Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)'] = "Kopieer de tekst tussen de lijnen en plak deze in het bestand \"local/config/database.inc.php\"(Waarschuwing: database.inc.php mag alleen het roze gedeelte bevatten, geen return of extra spatie). Dit moet alleen wanneer dit bestand geen schrijfrechten";
$lang['Database type'] = "Database type";
$lang['The type of database your piwigo data will be store in'] = "The type of database your piwigo data will be store in";
$lang['Host'] = "Host";
Expand Down

0 comments on commit 85c1c1b

Please sign in to comment.