summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2013-03-30 22:36:55 +0100
committerBrice Maron <brice@bmaron.net>2013-03-30 22:36:55 +0100
commit63804f415328e76d1474fb5373134124c8caf029 (patch)
treef4b0845178b2076409d09545e43956fba7585208 /lib
parent2b8cf4959afc4fdbcf6c6e0f6a3870c7292c1d86 (diff)
downloadnextcloud-server-63804f415328e76d1474fb5373134124c8caf029.tar.gz
nextcloud-server-63804f415328e76d1474fb5373134124c8caf029.zip
Change logQuery from define() to OC::Config
Diffstat (limited to 'lib')
-rw-r--r--lib/config.php3
-rw-r--r--lib/db.php4
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/config.php b/lib/config.php
index e04e96bc279..c94eb278159 100644
--- a/lib/config.php
+++ b/lib/config.php
@@ -159,9 +159,6 @@ class OC_Config{
if (defined('DEBUG') && DEBUG) {
$content .= "define('DEBUG',true);\n";
}
- if (defined('LOG_QUERIES') && LOG_QUERIES) {
- $content .= "define('LOG_QUERIES',true);\n";
- }
$content .= "\$CONFIG = ";
$content .= var_export(self::$cache, true);
$content .= ";\n";
diff --git a/lib/db.php b/lib/db.php
index 6bf8c74fce0..f28ed24df41 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -367,7 +367,7 @@ class OC_DB {
// Optimize the query
$query = self::processQuery( $query );
- if(defined('LOG_QUERIES') && LOG_QUERIES === true) {
+ if(OC_Config::getValue( "log_query", false)) {
OC_Log::write('core', 'DB prepare : '.$query, OC_Log::DEBUG);
}
self::connect();
@@ -954,7 +954,7 @@ class PDOStatementWrapper{
* make execute return the result instead of a bool
*/
public function execute($input=array()) {
- if(defined('LOG_QUERIES') && LOG_QUERIES === true) {
+ if(OC_Config::getValue( "log_query", false)) {
$params_str = str_replace("\n"," ",var_export($input,true));
OC_Log::write('core', 'DB execute with arguments : '.$params_str, OC_Log::DEBUG);
}