summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-28 00:02:55 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-28 00:02:55 +0100
commit48a1a36222ddcf1cb637302bdd09e2bcf9b15844 (patch)
tree186a41f678052018e275576b5d9eb3c5bd04be30
parent33e200dc04b21e24e7b6e277ad1fe1b361411fbe (diff)
Correction bug base_url
À appliquer aussi à la 0.7-beta
-rw-r--r--app/i18n/install.en.php2
-rw-r--r--app/i18n/install.fr.php4
-rw-r--r--lib/Minz/Request.php9
3 files changed, 11 insertions, 4 deletions
diff --git a/app/i18n/install.en.php b/app/i18n/install.en.php
index 74245d63b..8df48989f 100644
--- a/app/i18n/install.en.php
+++ b/app/i18n/install.en.php
@@ -55,7 +55,7 @@ return array (
'update_start' => 'Start update process',
'update_long' => 'This can take a long time, depending on the size of your database. You may have to wait for this page to time out (~5 minutes) and then refresh this page.',
- 'installation_is_ok' => 'The installation process was successful.<br />The final step will now attempt to delete the <kbd>./public/install.php</kbd> file and any database backup created during the update process.<br />You may choose to skip this step and delete <kbd>./public/install.php</kbd> manually.',
+ 'installation_is_ok' => 'The installation process was successful.<br />The final step will now attempt to delete the <kbd>./p/i/install.php</kbd> file and any database backup created during the update process.<br />You may choose to skip this step and delete <kbd>./p/i/install.php</kbd> manually.',
'finish_installation' => 'Complete installation',
'install_not_deleted' => 'Something went wrong; you must delete the file <em>%s</em> manually.',
);
diff --git a/app/i18n/install.fr.php b/app/i18n/install.fr.php
index 9b7a9bdff..a1ae8fcb5 100644
--- a/app/i18n/install.fr.php
+++ b/app/i18n/install.fr.php
@@ -41,7 +41,7 @@ return array (
'general_conf_is_ok' => 'La configuration générale a été enregistrée.',
'random_string' => 'Chaîne aléatoire',
'change_value' => 'Vous devriez changer cette valeur par n’importe quelle autre',
- 'base_url' => 'Base de l’url',
+ 'base_url' => 'Base de l’URL',
'do_not_change_if_doubt' => 'Laissez tel quel dans le doute',
'bdd_conf_is_ok' => 'La configuration de la base de données a été enregistrée.',
@@ -55,7 +55,7 @@ return array (
'update_start' => 'Lancer la mise à jour',
'update_long' => 'Ce processus peut prendre longtemps, selon la taille de votre base de données. Vous aurez peut-être à attendre que cette page dépasse son temps maximum d’exécution (~5 minutes) puis à la recharger.',
- 'installation_is_ok' => 'L’installation s’est bien passée.<br />La dernière étape va maintenant tenter de supprimer le fichier <kbd>/public/install.php</kbd>, ainsi que d’éventuelles copies de base de données créées durant le processus de mise à jour.<br />Vous pouvez choisir de sauter cette étape et de supprimer <kbd>/public/install.php</kbd> manuellement.',
+ 'installation_is_ok' => 'L’installation s’est bien passée.<br />La dernière étape va maintenant tenter de supprimer le fichier <kbd>./p/i/install.php</kbd>, ainsi que d’éventuelles copies de base de données créées durant le processus de mise à jour.<br />Vous pouvez choisir de sauter cette étape et de supprimer <kbd>./p/i/install.php</kbd> manuellement.',
'finish_installation' => 'Terminer l’installation',
'install_not_deleted' => 'Quelque chose s’est mal passé, vous devez supprimer le fichier <em>%s</em> à la main.',
);
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index fb48bd7a2..d4e1355d7 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -96,7 +96,14 @@ class Minz_Request {
* @return la base de l'url
*/
public static function getBaseUrl () {
- return Minz_Configuration::baseUrl ();
+ $defaultBaseUrl = Minz_Configuration::baseUrl();
+ if (!empty($defaultBaseUrl)) {
+ return $defaultBaseUrl;
+ } elseif (isset($_SERVER['REQUEST_URI'])) {
+ return dirname($_SERVER['REQUEST_URI']) . '/';
+ } else {
+ return '/';
+ }
}
/**