Skip to content
Extraits de code Groupes Projets
Valider 1edb98e4 rédigé par marcimat's avatar marcimat
Parcourir les fichiers

Quelques notices PHP en moins lors de l'utilisation de SPIP en ligne de commande (PHP cli).

parent bd4e2301
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -1942,7 +1942,7 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) { ...@@ -1942,7 +1942,7 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
// Sommes-nous dans l'empire du Mal ? // Sommes-nous dans l'empire du Mal ?
// (ou sous le signe du Pingouin, ascendant GNU ?) // (ou sous le signe du Pingouin, ascendant GNU ?)
if (strpos($_SERVER['SERVER_SOFTWARE'], '(Win') !== false){ if (isset($_SERVER['SERVER_SOFTWARE']) AND strpos($_SERVER['SERVER_SOFTWARE'], '(Win') !== false){
if (!defined('_OS_SERVEUR')) define('_OS_SERVEUR', 'windows'); if (!defined('_OS_SERVEUR')) define('_OS_SERVEUR', 'windows');
if (!defined('_SPIP_LOCK_MODE')) define('_SPIP_LOCK_MODE',1); // utiliser le flock php if (!defined('_SPIP_LOCK_MODE')) define('_SPIP_LOCK_MODE',1); // utiliser le flock php
} }
...@@ -2015,7 +2015,7 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) { ...@@ -2015,7 +2015,7 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
$GLOBALS['REQUEST_URI'] = $_SERVER['REQUEST_URI']; $GLOBALS['REQUEST_URI'] = $_SERVER['REQUEST_URI'];
} else { } else {
$GLOBALS['REQUEST_URI'] = $_SERVER['PHP_SELF']; $GLOBALS['REQUEST_URI'] = $_SERVER['PHP_SELF'];
if ($_SERVER['QUERY_STRING'] if (!empty($_SERVER['QUERY_STRING'])
AND !strpos($_SERVER['REQUEST_URI'], '?')) AND !strpos($_SERVER['REQUEST_URI'], '?'))
$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
} }
...@@ -2142,10 +2142,11 @@ function spip_initialisation_suite(){ ...@@ -2142,10 +2142,11 @@ function spip_initialisation_suite(){
// Mettre a "index.php" si DirectoryIndex ne le fait pas ou pb connexes: // Mettre a "index.php" si DirectoryIndex ne le fait pas ou pb connexes:
// les anciens IIS n'acceptent pas les POST sur ecrire/ (#419) // les anciens IIS n'acceptent pas les POST sur ecrire/ (#419)
// meme pb sur thttpd cf. http://forum.spip.org/fr_184153.html // meme pb sur thttpd cf. http://forum.spip.org/fr_184153.html
if (!defined('_SPIP_ECRIRE_SCRIPT')) {
if (!defined('_SPIP_ECRIRE_SCRIPT')) define('_SPIP_ECRIRE_SCRIPT', // true ? #decommenter ici et commenter la define('_SPIP_ECRIRE_SCRIPT', (empty($_SERVER['SERVER_SOFTWARE']) ? '' :
preg_match(',IIS|thttpd,', $_SERVER['SERVER_SOFTWARE']) ? preg_match(',IIS|thttpd,', $_SERVER['SERVER_SOFTWARE']) ?
'index.php' : ''); 'index.php' : ''));
}
if (!defined('_SPIP_AJAX')) if (!defined('_SPIP_AJAX'))
......
...@@ -445,6 +445,7 @@ if (!headers_sent()) { ...@@ -445,6 +445,7 @@ if (!headers_sent()) {
header(_HEADER_COMPOSED_BY . " @ www.spip.net"); header(_HEADER_COMPOSED_BY . " @ www.spip.net");
} }
spip_log($_SERVER['REQUEST_METHOD'].' '.self() . ' - '._FILE_CONNECT,_LOG_DEBUG); $methode = (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ((php_sapi_name() == 'cli') ? 'cli' : ''));
spip_log($methode.' '.self() . ' - '._FILE_CONNECT,_LOG_DEBUG);
?> ?>
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