From 682220bded5b06a15943d2c0b65978fbcf3c43f1 Mon Sep 17 00:00:00 2001 From: patdenice Date: Wed, 15 Oct 2008 17:50:12 +0000 Subject: - Install process now looks like goto/roma. - Move install.tpl to goto template. - add charset utf8 to fatal error function. - Check php version on install and upgrade, and die if < 5. git-svn-id: http://piwigo.org/svn/trunk@2747 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/template/goto/install.tpl | 152 ++++++++++++++++++ admin/template/goto/theme/roma/theme.css | 4 +- include/functions_html.inc.php | 3 +- install.php | 31 +++- language/de_DE/install.lang.php | 12 +- language/en_UK/install.lang.php | 12 +- language/es_ES/install.lang.php | 12 +- language/fr_FR/install.lang.php | 12 +- language/it_IT/install.lang.php | 54 ++++--- language/nl_NL/install.lang.php | 10 +- template/yoga/install.tpl | 255 ------------------------------- upgrade.php | 6 + upgrade_feed.php | 6 + 13 files changed, 243 insertions(+), 326 deletions(-) create mode 100644 admin/template/goto/install.tpl delete mode 100644 template/yoga/install.tpl diff --git a/admin/template/goto/install.tpl b/admin/template/goto/install.tpl new file mode 100644 index 000000000..0fdf9b709 --- /dev/null +++ b/admin/template/goto/install.tpl @@ -0,0 +1,152 @@ +{* $Id$ *} + + + + + + + + + + +{literal} + +{/literal} +Piwigo {$RELEASE} - {'Installation'|@translate} + + + +
{* Dummy block for double background management *} +
+
+ +

Piwigo {$RELEASE} - {'Installation'|@translate}

+ +{if isset($errors)} +
+
    + {foreach from=$errors item=error} +
  • {$error}
  • + {/foreach} +
+
+{/if} + +{if isset($infos)} +
+
    + {foreach from=$infos item=info} +
  • {$info}
  • + {/foreach} +
+
+{/if} + +{if isset($install)} +
+ + + + + + + + + +
{'Initial_config'|@translate}
{'Default_lang'|@translate} + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{'step1_title'|@translate}
{'step1_host'|@translate}{'step1_host_info'|@translate}
{'step1_user'|@translate}{'step1_user_info'|@translate}
{'step1_pass'|@translate}{'step1_pass_info'|@translate}
{'step1_database'|@translate}{'step1_database_info'|@translate}
{'step1_prefix'|@translate}{'step1_prefix_info'|@translate}
+ + + + + + + + + + + + + + + + + + + + + + + + + +
{'step2_title'|@translate}
{'install_webmaster'|@translate}{'install_webmaster_info'|@translate}
{'step2_pwd'|@translate}{'step2_pwd_info'|@translate}
{'step2_pwd_conf'|@translate}{'step2_pwd_conf_info'|@translate}
{'conf_mail_webmaster'|@translate}{'conf_mail_webmaster_info'|@translate}
+ + + + + +
+ +
+
+{/if} +
{* content *} +
{$L_INSTALL_HELP}
+ + diff --git a/admin/template/goto/theme/roma/theme.css b/admin/template/goto/theme/roma/theme.css index 135b46f54..2cbd6f649 100644 --- a/admin/template/goto/theme/roma/theme.css +++ b/admin/template/goto/theme/roma/theme.css @@ -10,10 +10,10 @@ INPUT[type="submit"], INPUT[type="reset"] { color:#999; border: 1px solid #666; input.rateButton, legend, h3 { color: #666; } #theAdminPage h2 { color: #333; } .content .infos { color: #f70; border:0; background-color: transparent; -padding:5px 0px 0pt 10pt; min-height: 48px; text-align:left; } +padding:5px 60px 0pt 10pt; min-height: 48px; text-align:left; } .content .infos li, .content .errors li { list-style-type:none; } .content .errors { color: #f30; border:0; background-color: transparent; -padding:5px 0px 0pt 10pt; min-height: 48px; text-align:left; font-weight:bold; } +padding:5px 60px 0pt 10pt; min-height: 48px; text-align:left; font-weight:bold; } #copyright { color:#666; margin:60px auto 0px 240px; text-align:center; padding-bottom: 15px; } .header_notes { background: transparent url(../../icon/note.png) no-repeat right top; diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 2b3994aa8..0a09ab31a 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -671,7 +671,8 @@ function fatal_error($msg) $msg .= "\n"; } - $display = "

Piwigo encountered a non recoverable error

+ $display = " +

Piwigo encountered a non recoverable error

 $msg
 $btrace_msg
diff --git a/install.php b/install.php
index f629fb06e..ac8577943 100644
--- a/install.php
+++ b/install.php
@@ -21,6 +21,12 @@
 // | USA.                                                                  |
 // +-----------------------------------------------------------------------+
 
+//------------------------------------------------- check php version
+if (version_compare(PHP_VERSION, '5', '<'))
+{
+  die('Piwigo requires PHP 5 or above.');
+}
+
 //----------------------------------------------------------- include
 define('PHPWG_ROOT_PATH','./');
 
@@ -210,7 +216,7 @@ load_language( 'admin.lang', '', array('language'=>$language, 'target_charset'=>
 load_language( 'install.lang', '', array('language'=>$language, 'target_charset'=>'utf-8') );
 
 //----------------------------------------------------- template initialization
-$template=new Template(PHPWG_ROOT_PATH.'template/yoga', 'clear');
+$template=new Template(PHPWG_ROOT_PATH.'admin/template/goto', 'roma');
 $template->set_filenames( array('install'=>'install.tpl') );
 $step = 1;
 //---------------------------------------------------------------- form analyze
@@ -290,7 +296,10 @@ define(\'DB_COLLATE\', \'\');
     {
       $html_content = htmlentities( $file_content, ENT_QUOTES );
       $html_content = nl2br( $html_content );
-      $template->assign('error_copy', $html_content);
+      $error_copy = l10n('step1_err_copy');
+      $error_copy .= '
--------------------------------------------------------------------
'; + $error_copy .= '' . $html_content . ''; + $error_copy .= '
--------------------------------------------------------------------
'; } @fputs($fp, $file_content, strlen($file_content)); @fclose($fp); @@ -388,6 +397,19 @@ $template->assign( )); //------------------------------------------------------ errors & infos display +if ($step == 1) +{ + $template->assign('install', true); +} +else +{ + array_push($infos, l10n('install_end_message')); + + if (isset($error_copy)) + { + array_push($errors, $error_copy); + } +} if (count($errors) != 0) { $template->assign('errors', $errors); @@ -398,11 +420,6 @@ if (count($infos) != 0 ) $template->assign('infos', $infos); } -if ($step == 1) -{ - $template->assign('install', true); -} - //----------------------------------------------------------- html code display $template->pparse('install'); ?> diff --git a/language/de_DE/install.lang.php b/language/de_DE/install.lang.php index e04012b01..bd8d14e19 100644 --- a/language/de_DE/install.lang.php +++ b/language/de_DE/install.lang.php @@ -21,7 +21,7 @@ // | USA. | // +-----------------------------------------------------------------------+ -$lang['install_message'] = 'Anzeige'; +$lang['Installation'] = 'Installation'; $lang['Initial_config'] = 'Base-Konfiguration'; $lang['Default_lang'] = 'Standardsprache der Galerie'; $lang['step1_title'] = 'Konfiguration der Datenbank'; @@ -54,15 +54,13 @@ $lang['step2_pwd'] = 'Passwort'; $lang['step2_pwd_info'] = 'Sie bleiben vertraulich, es ermöglicht den Zugang zum Administration.'; $lang['step2_pwd_conf'] = 'Passwort [Bestätigung]'; $lang['step2_pwd_conf_info'] = 'Prüfung'; -$lang['step1_err_copy'] = 'Kopieren Sie den Text in roter zwischen Bindestriche und fügen Sie ihn in die Datei "include / mysql.inc.php" (Warnung: mysql.inc.php müssen nur enthalten, was in blau, keine Zeile zurück oder Leerzeichen)'; +$lang['step1_err_copy'] = 'Kopieren Sie den Text in rosaen zwischen Bindestriche und fügen Sie ihn in die Datei "include / mysql.inc.php" (Warnung: mysql.inc.php müssen nur enthalten, was in rosa, keine Zeile zurück oder Leerzeichen)'; $lang['install_help'] = 'Brauchen Sie Hilfe? Stellen Sie Ihre Frage auf der Forum Piwigo .'; $lang['install_end_message'] = 'Die Konfiguration der Piwigo abgeschlossen ist, hier ist der nächste Schritt

Aus Sicherheitsgründen, bitte löschen Datei "install.php"
-Sobald diese Datei gelöscht, folgen Sie dieser Anleitung: -
'; +Sobald diese Datei gelöscht, folgen Sie dieser Anleitung:
+* Gehen Sie auf die Identifizierung Seite: [ Identifizierung ] und verwenden Sie die Login / Passwort für Webmaster
+* diesem Login ermöglicht Ihnen den Zugang zu den Verwaltungs-Panel und den Anweisungen, um Platz Bilder in Ihre Verzeichnisse.'; $lang['conf_mail_webmaster'] = 'Webmaster Mail-Adresse'; $lang['conf_mail_webmaster_info'] = 'Besucher können sich nicht Kontakt Site Administrator mit diesem E-Mail'; ?> \ No newline at end of file diff --git a/language/en_UK/install.lang.php b/language/en_UK/install.lang.php index 5e67d9a33..92cbe08d6 100644 --- a/language/en_UK/install.lang.php +++ b/language/en_UK/install.lang.php @@ -21,7 +21,7 @@ // | USA. | // +-----------------------------------------------------------------------+ -$lang['install_message'] = 'Message'; +$lang['Installation'] = 'Installation'; $lang['Initial_config'] = 'Basic configuration'; $lang['Default_lang'] = 'Default gallery language'; $lang['step1_title'] = 'Database configuration'; @@ -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 red between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)'; +$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_host'] = 'MySQL host'; $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr'; @@ -60,11 +60,9 @@ $lang['step2_pwd_conf_info'] = 'verification'; $lang['install_help'] = 'Need help ? Ask your question on Piwigo message board.'; $lang['install_end_message'] = 'The configuration of Piwigo is finished, here is the next step

For security reason, please delete file "install.php"
-Once this file deleted , follow this instructions : -'; +Once this file deleted , follow this instructions :
+* go to the identification page : [ identification ] and use the login/password given for webmaster
+* this login will enable you to access to the administration panel and to the instructions in order to place pictures in your directories'; $lang['conf_mail_webmaster'] = 'Webmaster mail address'; $lang['conf_mail_webmaster_info'] = 'Visitors will be able to contact site administrator with this mail'; ?> \ No newline at end of file diff --git a/language/es_ES/install.lang.php b/language/es_ES/install.lang.php index 9eca984e2..e39d8e375 100644 --- a/language/es_ES/install.lang.php +++ b/language/es_ES/install.lang.php @@ -21,7 +21,7 @@ // | USA. | // +-----------------------------------------------------------------------+ -$lang['install_message'] = 'Mensaje'; +$lang['Installation'] = 'Instalación'; $lang['Initial_config'] = 'Configuración de Base'; $lang['Default_lang'] = 'Lengua por defecto de la galería'; $lang['step1_title'] = 'Configuración de la Base de datos'; @@ -54,15 +54,13 @@ $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 rojo 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 azul 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 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['install_help'] = '¿ Necesidad de ayudante? Plantee su cuestión sobre él foro de Piwigo.'; $lang['install_end_message'] = 'La configuración de la aplicación correctamente se celebró, coloca en la etapa próxima

Por medida de seguridad, gracias por suprimir el fichero "install.php"
-La vez suprimido este fichero, por favor seguir estas indicaciones: -'; +La vez suprimido este fichero, por favor seguir estas indicaciones:
+* Vaya sobre la página de identificación : [ identificación ] Y conéctese con pseudo dado para el webmaster
+* Éste le permite acceder a la parte administración y a las instrucciones para colocar las imágenes en los repertorios.'; $lang['conf_mail_webmaster'] = 'Dirige e-mail del Administrador'; $lang['conf_mail_webmaster_info'] = 'Los visitadores podrán ponerse en contacto con usted por este mail'; ?> \ No newline at end of file diff --git a/language/fr_FR/install.lang.php b/language/fr_FR/install.lang.php index a08fa9cc4..012499550 100644 --- a/language/fr_FR/install.lang.php +++ b/language/fr_FR/install.lang.php @@ -21,7 +21,7 @@ // | USA. | // +-----------------------------------------------------------------------+ -$lang['install_message'] = 'Message'; +$lang['Installation'] = 'Installation'; $lang['Initial_config'] = 'Configuration de Base'; $lang['Default_lang'] = 'Langue par défaut de la galerie'; $lang['step1_title'] = 'Configuration de la Base de données'; @@ -54,15 +54,13 @@ $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 rouge 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 bleu 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 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['install_help'] = 'Besoin d\'aide ? Posez votre question sur le forum de Piwigo.'; $lang['install_end_message'] = 'La configuration de l\'application s\'est correctement déroulée, place à la prochaine étape

Par mesure de sécurité, merci de supprimer le fichier "install.php"
-Un fois ce fichier supprimé, veuillez suivre ces indications : -'; +Un fois ce fichier supprimé, veuillez suivre ces indications :
+* allez sur la page d\'identification : [ identification ] et connectez-vous avec le pseudo donné pour le webmasterbr
+* celui-ci vous permet d\'accéder à la partie administration et aux instructions pour placer les images dans les répertoires.'; $lang['conf_mail_webmaster'] = 'Adresse e-mail de l\'Administrateur'; $lang['conf_mail_webmaster_info'] = 'Les visiteurs pourront vous contacter par ce mail'; ?> \ No newline at end of file diff --git a/language/it_IT/install.lang.php b/language/it_IT/install.lang.php index 94e281083..cac665502 100644 --- a/language/it_IT/install.lang.php +++ b/language/it_IT/install.lang.php @@ -1,27 +1,27 @@ forum di PhpWebGallery.'; $lang['install_end_message'] = 'La configurazione di PhpWebGallery è conclusa. Procedete al prossimo step

Per ragioni di sicurezza vi consigliamo di cancellare il file "install.php"
-Una volta che il file è stato cancellato seguire le istruzioni: -'; +Una volta che il file è stato cancellato seguire le istruzioni:
+* collegatevi alla pagina di accesso: [ Accedi ora ] e usate il vostro nome utente e password del Webmaster
+* a questo punto sarete abilitati all\'accesso al pannello di amministrazione in cui troverete le istruzioni per l\'inserimento delle immagini nelle vostre directory'; $lang['conf_mail_webmaster'] = 'Indirizzo email del Amministratore'; $lang['conf_mail_webmaster_info'] = 'i visitatori potranno contattarvi utilizzando questo indirizzo email'; ?> \ No newline at end of file diff --git a/language/nl_NL/install.lang.php b/language/nl_NL/install.lang.php index 6eb29d16d..8925e2320 100644 --- a/language/nl_NL/install.lang.php +++ b/language/nl_NL/install.lang.php @@ -21,7 +21,7 @@ // | USA. | // +-----------------------------------------------------------------------+ -$lang['install_message'] = 'Bericht'; +$lang['Installation'] = 'Installatie'; $lang['Initial_config'] = 'Basis configuratie'; $lang['Default_lang'] = 'Standaard gallery taal'; $lang['step1_title'] = 'Database configuratie'; @@ -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 blauwe 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/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_host'] = 'MySQL host'; $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr'; @@ -59,9 +59,9 @@ $lang['step2_pwd_conf'] = 'Wachtwoord [bevestigen]'; $lang['step2_pwd_conf_info'] = 'verificatie'; $lang['install_help'] = 'Hulp nodig ? stel een vraag op het Piwigo forum.'; $lang['install_end_message'] = 'Het installeren van Piwigo is klaar, de volgende stap is

het verwijderen van "install.php" dit is om de veiligheid te waarborgen
-Vervolg de instructies nadat "install.php" is verwijderd:'; - +Vervolg de instructies nadat "install.php" is verwijderd:
+* Ga naar de Indentificatie pagina: [ Indentificatie ] gebruik hiervoor het eerder opgegeven gebruikersnaam met wachtwoord
+* Deze gebruikersnaam geeft u toegang tot de beheermenu zodat u afbeeldingen op uw website kan plaatsen'; $lang['conf_mail_webmaster'] = 'Webmaster email adres'; $lang['conf_mail_webmaster_info'] = 'Het is mogelijk dat bezoekers contact opnemen met de beheerder middels e-mail'; ?> \ No newline at end of file diff --git a/template/yoga/install.tpl b/template/yoga/install.tpl deleted file mode 100644 index bebe728e7..000000000 --- a/template/yoga/install.tpl +++ /dev/null @@ -1,255 +0,0 @@ -{* $Id$ *} - - - - - - -Piwigo {$RELEASE} -{literal} - -{/literal} - - - - - - -
-
Piwigo {$RELEASE}
- - {if isset($errors)} - - - - {/if} - {if isset($infos)} - - - - {/if} - - - -
-
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
-
-
-
-
    - {foreach from=$infos item=info} -
  • {$info}
  • - {/foreach} -
-
-
- -{if isset($error_copy)} -{'step1_err_copy'|@translate} : -
-----------------------------------------------------
-
{$error_copy}
------------------------------------------------------
-{/if} - -{if isset($install)} -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{'Initial_config'|@translate}
{'Default_lang'|@translate} - -
 
{'step1_title'|@translate}
{'step1_host'|@translate}{'step1_host_info'|@translate}
{'step1_user'|@translate}{'step1_user_info'|@translate}
{'step1_pass'|@translate}{'step1_pass_info'|@translate}
{'step1_database'|@translate}{'step1_database_info'|@translate}
{'step1_prefix'|@translate}{'step1_prefix_info'|@translate}
 
{'step2_title'|@translate}
{'install_webmaster'|@translate}{'install_webmaster_info'|@translate}
{'step2_pwd'|@translate}{'step2_pwd_info'|@translate}
{'step2_pwd_conf'|@translate}{'step2_pwd_conf_info'|@translate}
{'conf_mail_webmaster'|@translate}{'conf_mail_webmaster_info'|@translate}
 
- -
 
-
-{else} -
-{'install_end_title'|@translate} -
-
-{'install_end_message'|@translate} -
-{/if} - -
-
{$L_INSTALL_HELP}
-
- - diff --git a/upgrade.php b/upgrade.php index bf726cc6e..0c324d10a 100644 --- a/upgrade.php +++ b/upgrade.php @@ -21,6 +21,12 @@ // | USA. | // +-----------------------------------------------------------------------+ +//check php version +if (version_compare(PHP_VERSION, '5', '<')) +{ + die('Piwigo requires PHP 5 or above.'); +} + define('PHPWG_ROOT_PATH', './'); include_once(PHPWG_ROOT_PATH.'include/functions.inc.php'); diff --git a/upgrade_feed.php b/upgrade_feed.php index 1d04ba650..872fca870 100644 --- a/upgrade_feed.php +++ b/upgrade_feed.php @@ -21,6 +21,12 @@ // | USA. | // +-----------------------------------------------------------------------+ +//check php version +if (version_compare(PHP_VERSION, '5', '<')) +{ + die('Piwigo requires PHP 5 or above.'); +} + define('PHPWG_ROOT_PATH', './'); include_once(PHPWG_ROOT_PATH.'include/functions.inc.php'); -- cgit v1.2.3