mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:27:03 +02:00
auditors may see the relevant part of the sphinx query
This commit is contained in:
@ -72,6 +72,17 @@ class Sphinx {
|
||||
|
||||
if(ENABLE_SYSLOG == 1) { syslog(LOG_INFO, sprintf("sphinx query: '%s' in %.2f s, %d hits, %d total found", $query->query, $query->exec_time, $query->num_rows, $query->total_found)); }
|
||||
|
||||
$session = Registry::get('session');
|
||||
$sphx_query = '';
|
||||
|
||||
$b = preg_split("/\ ORDER\ /", $query->query);
|
||||
$a = preg_split("/\ WHERE\ /", $b[0]);
|
||||
if(isset($a[1])) {
|
||||
$sphx_query = preg_replace("/\'/", "\'", $a[1]);
|
||||
}
|
||||
|
||||
$session->set("sphx_query", $sphx_query);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user