mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 04:01:58 +01:00
auditors may see the relevant part of the sphinx query
This commit is contained in:
parent
75b552e5e0
commit
aa0d5e35c8
@ -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)); }
|
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;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,6 +136,10 @@
|
|||||||
|
|
||||||
<?php if(ENABLE_DELETE == 1) { ?><i class="icon-exclamation-sign" title="<?php print $text_compliance_warning; ?>"></i><?php } ?>
|
<?php if(ENABLE_DELETE == 1) { ?><i class="icon-exclamation-sign" title="<?php print $text_compliance_warning; ?>"></i><?php } ?>
|
||||||
|
|
||||||
|
<?php if(Registry::get('auditor_user') == 1 && $session->get("sphx_query")) { ?>
|
||||||
|
<span style="margin-left: 30px;"><a href="#" onclick="Piler.show_message('messagebox1', '<?php print $session->get("sphx_query"); ?>', 5);">sphinx</a></span>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php } else { print $text_none_found; } ?>
|
<?php } else { print $text_none_found; } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -101,6 +101,10 @@
|
|||||||
<?php if($next_page <= $total_pages){ ?><a href="#" onclick="Piler.navigation(<?php print $next_page; ?>);">> </a> <?php } else { ?><span class="navlink">> </span><?php } ?>
|
<?php if($next_page <= $total_pages){ ?><a href="#" onclick="Piler.navigation(<?php print $next_page; ?>);">> </a> <?php } else { ?><span class="navlink">> </span><?php } ?>
|
||||||
<?php if($page < $total_pages) { ?> <a href="#" onclick="Piler.navigation(<?php print $total_pages; ?>);"> >> </a><?php } else { ?> <span class="navlink"> >></span><?php } ?>
|
<?php if($page < $total_pages) { ?> <a href="#" onclick="Piler.navigation(<?php print $total_pages; ?>);"> >> </a><?php } else { ?> <span class="navlink"> >></span><?php } ?>
|
||||||
|
|
||||||
|
<?php if(Registry::get('auditor_user') == 1 && $session->get("sphx_query")) { ?>
|
||||||
|
<span style="margin-left: 30px;"><a href="#" onclick="Piler.show_message('messagebox1', '<?php print $session->get("sphx_query"); ?>', 5);">sphinx</a></span>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<?php } else { ?> <?php } ?>
|
<?php } else { ?> <?php } ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user