2002-06-21 Olivier L. M�ller <om@omnis.ch>

* libraries/common.lib.php3, main.php3: be more tolerant with lazy
      sysadmins or users by letting them having an empty
      $cfg['PmaAbsoluteUri']. A default value (which should work according
      to the docs...) will be set and a warning displayed on main.php3.
This commit is contained in:
Olivier Müller
2002-06-21 21:38:15 +00:00
parent 0448a2913e
commit 9172958f7c
3 changed files with 32 additions and 6 deletions

View File

@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-06-21 Olivier L. M<>ller <om@omnis.ch>
* libraries/common.lib.php3, main.php3: be more tolerant with lazy
sysadmins or users by letting them having an empty
$cfg['PmaAbsoluteUri']. A default value (which should work according
to the docs...) will be set and a warning displayed on main.php3.
2002-06-21 Robin Johnson <robbat2@users.sourceforge.net>
* lang/english*: $strSplitWordsWithSpace
- 'splitted' changed to 'seperated'

View File

@@ -489,13 +489,27 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
* set properly and, depending on browsers, inserting or updating a
* record might fail
*/
$DisplayPmaAbsoluteUriWarning = 0;
if (empty($cfg['PmaAbsoluteUri'])) {
if (empty($GLOBALS['is_header_sent'])) {
include('./header.inc.php3');
}
echo '<p class="warning">'. $strPmaUriError . '</p>' . "\n";
include('./footer.inc.php3');
exit();
// if (empty($GLOBALS['is_header_sent'])) {
// include('./header.inc.php3');
// }
// echo '<p class="warning">'. $strPmaUriError . '</p>' . "\n";
// include('./footer.inc.php3');
// exit();
$DisplayPmaAbsoluteUriWarning = 1;
// Setup a default value to let the people and lazy syadmins work anyway,
// but display a big warning on the main.php3 page. --Olivier
$cfg['PmaAbsoluteUri'] = (!empty($HTTP_SERVER_VARS['HTTPS']) ? 'https' : 'http') . '://'
. $HTTP_SERVER_VARS['SERVER_NAME']
. (!empty($HTTP_SERVER_VARS['SERVER_PORT']) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : '')
. substr($HTTP_SERVER_VARS['SCRIPT_NAME'], 0, strrpos($HTTP_SERVER_VARS['SCRIPT_NAME'], '/')+1);
}
// Adds a trailing slash et the end of the phpMyAdmin uri if it does not
// exist

View File

@@ -562,6 +562,12 @@ echo "\n";
<?php
if ($DisplayPmaAbsoluteUriWarning) {
echo '<p class="warning">'. $strPmaUriError . '</p>' . "\n";
}
/**
* Displays the footer
*/