Skip to content
Extraits de code Groupes Projets
Valider 2b6d60d6 rédigé par Antoine Pitrou's avatar Antoine Pitrou
Parcourir les fichiers

Compatibilité multiniania

parent a8d8bbe7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -22,10 +22,10 @@ function envoyer_queue_mails() {
}
//
// Chez multimania, envoyer un mail coupe la connection MySQL (sic)
// Chez lyconiania, envoyer un mail coupe la connection MySQL (sic)
//
if ($GLOBALS['hebergeur'] == 'multimania') {
if ($GLOBALS['hebergeur'] == 'lycos') {
register_shutdown_function(envoyer_queue_mails);
}
......@@ -50,7 +50,7 @@ function envoyer_mail($email, $sujet, $texte, $from = "", $headers = "") {
if ($flag_wordwrap) $texte = wordwrap($texte);
switch($hebergeur) {
case 'multimania':
case 'lycos':
$queue_mails[] = array(
'email' => $email,
'sujet' => $sujet,
......
......@@ -100,6 +100,7 @@ feed_globals('HTTP_POST_VARS');
feed_globals('HTTP_COOKIE_VARS');
feed_globals('HTTP_SERVER_VARS');
//
// Avec register_globals a Off sous PHP4, il faut utiliser
// la nouvelle variable HTTP_POST_FILES pour les fichiers uploades
......@@ -127,15 +128,15 @@ $hebergeur = '';
$login_hebergeur = '';
$os_serveur = '';
// Multimania
if (ereg('^(.*)\.multimania\.(com|net|fr)$', $HTTP_X_HOST, $regs)) {
$hebergeur = 'multimania';
if ($regs[1] == 'www')
ereg('^/([^/]*)/', $REQUEST_URI, $regs);
$login_hebergeur = $regs[1].'_db';
// Lycos (ex-Multimachin)
if ($HTTP_X_HOST == 'membres.lycos.fr') {
$hebergeur = 'lycos';
ereg('^/([^/]*)', $REQUEST_URI, $regs);
$login_hebergeur = $regs[1];
}
// Altern
else if (ereg('altern\.com$', $SERVER_NAME)) {
if (ereg('altern\.com$', $SERVER_NAME)) {
$hebergeur = 'altern';
ereg('([^.]*\.[^.]*)$', $HTTP_HOST, $regs);
$login_hebergeur = ereg_replace('[^a-zA-Z0-9]', '_', $regs[1]);
......@@ -166,11 +167,11 @@ if (eregi('\(Win', $HTTP_SERVER_VARS['SERVER_SOFTWARE']))
// Infos sur le fichier courant
//
// Compatibilite avec serveurs ne fournissant pas $REQUEST_URI
if (!$REQUEST_URI) {
// Compatibilite avec serveurs ne fournissant pas, ou mal $REQUEST_URI
if (!$REQUEST_URI)
$REQUEST_URI = $PHP_SELF;
if ($QUERY_STRING) $REQUEST_URI .= '?'.$QUERY_STRING;
}
if (!strpos($REQUEST_URI, '?') && $QUERY_STRING)
$REQUEST_URI .= '?'.$QUERY_STRING;
if (!$PATH_TRANSLATED) {
if ($SCRIPT_FILENAME) $PATH_TRANSLATED = $SCRIPT_FILENAME;
......@@ -178,6 +179,7 @@ if (!$PATH_TRANSLATED) {
}
//
// Gestion des inclusions et infos repertoires
//
......@@ -209,14 +211,13 @@ $php_module = ($flag_sapi_name AND @php_sapi_name() == 'apache') OR
function tester_upload() {
global $hebergeur;
$test_upload = true;
if ($hebergeur == 'multimania') $test_upload = false;
if ($hebergeur == 'lycos') $test_upload = false;
return $test_upload;
}
function tester_accesdistant() {
global $hebergeur;
$test_acces = true;
// if ($hebergeur == 'multimania') $test_acces = false;
return $test_acces;
}
......
Ce diff est replié.
......@@ -32,7 +32,7 @@ if (strlen($fichier_cache) > 24)
$fichier_cache = substr(ereg_replace('([a-zA-Z]{1,3})[^-]*-', '\1-', $fichier_cache), -24);
if (!$fichier_cache)
$fichier_cache = 'slash-';
$fichier_cache = 'INDEX-';
$fichier_cache .= '.'.substr($md_cache, 1, 6);
$subdir_cache = substr($md_cache, 0, 1);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter