]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - Classes/class-log.php
Fix del_usermeta() not working for both sql_db and file_db
[irc/unrealircd/unrealircd-webpanel.git] / Classes / class-log.php
index f50573d60bc0c51e121e1b1b2489b097db0e8458..7c64949cad2c75207a79b43138f9cd89ca540d50 100644 (file)
@@ -1,41 +1,42 @@
 <?php
 
 if (!defined('UPATH'))
-    die("Access denied");
+       die("Access denied");
 
 
 class Log
 {
-    function __construct()
-    {
+       function __construct()
+       {
 
-        if (!is_dir("log/"))
-            mkdir("log/");
-        $filename = "log/".date("Y-m-d")."log";
-        if (!file_exists($filename))
-        {
-            $open = fopen($filename, 'w');
-            $close = fclose($open);
-        }
-    }
-    function it(...$string)
-    {
-        foreach($string as $str)
-        {
-            if (UNREALIRCD_DEBUG) {
-                highlight_string(var_export($str, true));
-            }
-        }
-    }
+               /*
+               if (!is_dir("log/"))
+                       mkdir("log/");
+               $filename = "log/".date("Y-m-d")."log";
+               if (!file_exists($filename))
+               {
+                       $open = fopen($filename, 'w');
+                       $close = fclose($open);
+               } */
+       }
+       function it(...$string)
+       {
+               foreach($string as $str)
+               {
+                       if (get_config("debug")) {
+                               highlight_string(var_export($str, true));
+                       }
+               }
+       }
 }
 
 function do_log(...$strings)
 {
-    $log = new Log();
-    $log->it($strings);
+       $log = new Log();
+       $log->it($strings);
 }
 
 function get_date($year, $month, $day, $hour, $minute)
 {
-    return "$year-$month-$day" . "T$hour-$minute" . "Z";
+       return "$year-$month-$day" . "T$hour-$minute" . "Z";
 }
\ No newline at end of file