X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fecrire%2Freq%2Fmysql.php;fp=www%2Fecrire%2Freq%2Fmysql.php;h=3532ea15f6db9a3a5409cb555f1bfc0b33d0fa2d;hb=122c920eb07e3f665789f8734965b576e6c25515;hp=3bbd435f73bbfbe70bf0f1adefd25aed2699e826;hpb=226942065cd4f604eb464addf45a065c9e5bc916;p=lhc%2Fweb%2Fwww.git diff --git a/www/ecrire/req/mysql.php b/www/ecrire/req/mysql.php index 3bbd435f..3532ea15 100644 --- a/www/ecrire/req/mysql.php +++ b/www/ecrire/req/mysql.php @@ -3,7 +3,7 @@ /* *************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2012 * + * Copyright (c) 2001-2014 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -180,13 +180,15 @@ function spip_mysql_query($query, $serveur='',$requeter=true) { $connexion['last'] = $query; // ajouter un debug utile dans log/mysql-slow.log ? - $debug = (!defined('_DEBUG_SLOW_QUERIES') || !_DEBUG_SLOW_QUERIES) - ? '' - : ' /* ' - .str_replace('*/','@/', - $_SERVER['REQUEST_URI'].' + '.$GLOBALS['ip'] - ) - .' */'; + $debug = ''; + if (defined('_DEBUG_SLOW_QUERIES') AND _DEBUG_SLOW_QUERIES){ + if($GLOBALS['debug']['aucasou']){ + list(,$id,, $infos) = $GLOBALS['debug']['aucasou']; + $debug .= " BOUCLE$id @ ".$infos[0] ." | "; + } + $debug .= " " . $_SERVER['REQUEST_URI'].' + '.$GLOBALS['ip']; + $debug = ' /*'.str_replace('*/','@/',$debug).' */'; + } $r = $link ? mysql_query($query.$debug, $link) : mysql_query($query.$debug);