X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Freq%2Fmysql.php;fp=www%2Fecrire%2Freq%2Fmysql.php;h=07debbbb7c4ce4f219263b5b37fc815ce99854ac;hp=3bbd435f73bbfbe70bf0f1adefd25aed2699e826;hb=f08ec3a19775a7a173534b2d5cb7e9920b6253a6;hpb=58a2baa86ad2e12b4ff338d137f826a0a10ccbd7 diff --git a/www/ecrire/req/mysql.php b/www/ecrire/req/mysql.php index 3bbd435f..07debbbb 100644 --- a/www/ecrire/req/mysql.php +++ b/www/ecrire/req/mysql.php @@ -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);