diff --git a/db/mongo.php b/db/mongo.php index d26d1676..0d460de8 100644 --- a/db/mongo.php +++ b/db/mongo.php @@ -78,7 +78,7 @@ function log($flag=TRUE) { PHP_EOL; } else { $this->log=FALSE; - if ($legacy) + if ($this->legacy) $this->db->setprofilinglevel(-1); else $this->db->command(['profile'=>-1]); @@ -93,7 +93,7 @@ function log($flag=TRUE) { function drop() { $out=$this->db->drop(); if ($this->log!==FALSE) { - if ($legacy) + if ($this->legacy) $this->db->setprofilinglevel(2); else $this->db->command(['profile'=>2]);