Commit f1f2b17e authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-927 Check if user is in special log with the logger class.

Released under the Affero GNU General Public License (AGPL) version 3.
parent b615b999
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
class ZLog { class ZLog {
static private $wbxmlDebug = ''; static private $wbxmlDebug = '';
static private $lastLogs = array(); static private $lastLogs = array();
static private $userLog = false;
/** /**
* @var Log $logger * @var Log $logger
*/ */
...@@ -138,7 +138,7 @@ class ZLog { ...@@ -138,7 +138,7 @@ class ZLog {
* @return * @return
*/ */
static public function WriteEnd() { static public function WriteEnd() {
if (LOGLEVEL_DEBUG <= LOGLEVEL || (LOGLEVEL_DEBUG <= LOGUSERLEVEL && self::$userLog)) { if (LOGLEVEL_DEBUG <= LOGLEVEL || (LOGLEVEL_DEBUG <= LOGUSERLEVEL && self::getLogger()->IsAuthUserInSpecialLogUsers())) {
if (version_compare(phpversion(), '5.4.0') < 0) { if (version_compare(phpversion(), '5.4.0') < 0) {
$time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 2, ',', '.'); $time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 2, ',', '.');
} }
......
...@@ -127,7 +127,7 @@ abstract class Log { ...@@ -127,7 +127,7 @@ abstract class Log {
* @access public * @access public
* @return bool * @return bool
*/ */
public function IsAuthUserInSpecialLogUsers(){ public function IsAuthUserInSpecialLogUsers() {
if ($this->isAuthUserInSpecialLogUsers) { if ($this->isAuthUserInSpecialLogUsers) {
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment