mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-26 07:40:12 +01:00
added an option to syslog sphinx queries
This commit is contained in:
parent
79282987a5
commit
e96eab3c1b
@ -18,7 +18,7 @@ define('ENABLE_FOLDER_RESTRICTIONS', 0);
|
|||||||
define('ENABLE_GOOGLE_LOGIN', 0);
|
define('ENABLE_GOOGLE_LOGIN', 0);
|
||||||
define('SEARCH_RESULT_CHECKBOX_CHECKED', 1);
|
define('SEARCH_RESULT_CHECKBOX_CHECKED', 1);
|
||||||
define('HELPER_URL', '');
|
define('HELPER_URL', '');
|
||||||
|
define('ENABLE_SYSLOG', 0);
|
||||||
define('GOOGLE_CLIENT_ID', 'xxxxxxxxxxx');
|
define('GOOGLE_CLIENT_ID', 'xxxxxxxxxxx');
|
||||||
define('GOOGLE_CLIENT_SECRET', 'xxxxxxxxxxxxx');
|
define('GOOGLE_CLIENT_SECRET', 'xxxxxxxxxxxxx');
|
||||||
define('GOOGLE_DEVELOPER_KEY', 'xxxxxxxxxxxx');
|
define('GOOGLE_DEVELOPER_KEY', 'xxxxxxxxxxxx');
|
||||||
|
@ -32,6 +32,9 @@ $language = new Language();
|
|||||||
Registry::set('language', $language);
|
Registry::set('language', $language);
|
||||||
|
|
||||||
|
|
||||||
|
if(ENABLE_SYSLOG == 1) { openlog("piler-webui", LOG_PID, LOG_MAIL); }
|
||||||
|
|
||||||
|
|
||||||
/* check if user has authenticated himself. If not, we send him to login */
|
/* check if user has authenticated himself. If not, we send him to login */
|
||||||
|
|
||||||
Registry::set('username', getAuthenticatedUsername());
|
Registry::set('username', getAuthenticatedUsername());
|
||||||
|
@ -303,7 +303,7 @@ class ModelSearchSearch extends Model {
|
|||||||
$query = $this->sphx->query("SELECT id FROM " . SPHINX_MAIN_INDEX . " WHERE $a $date $attachment $direction $size $folders MATCH('$match') $sortorder LIMIT 0," . MAX_SEARCH_HITS);
|
$query = $this->sphx->query("SELECT id FROM " . SPHINX_MAIN_INDEX . " WHERE $a $date $attachment $direction $size $folders MATCH('$match') $sortorder LIMIT 0," . MAX_SEARCH_HITS);
|
||||||
}
|
}
|
||||||
|
|
||||||
//print $query->query; print "<p>" . $query->exec_time . "</p>\n";
|
if(ENABLE_SYSLOG == 1) { syslog(LOG_INFO, sprintf("sphinx query: %s in %.2f s", $query->query, $query->exec_time)); }
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user