]> git.datanom.net - qtadmin.git/blobdiff - lib/utils.inc.php
Add change row per page
[qtadmin.git] / lib / utils.inc.php
index 773e45fceee4d66dc6335f891cfe516fb7ca13d9..7ad8969601565a2e86fc482a3ab4317385003dbf 100644 (file)
@@ -1,6 +1,7 @@
 <?php
-/* vim: set ts=4 tw=0 sw=4 noet: */
+/* vim: set ts=4 tw=4 sw=4 noet: */
 require_once $CFG->root .'config.php';
+require_once $CFG->root . 'lib/session_handler.inc.php';
 
 class Utils {
 
@@ -18,6 +19,7 @@ class Utils {
     </script>
     <script src="__ROOT__js/timer.js"></script>
     <script src="__ROOT__js/checkbox.js"></script>
+    <script src="__ROOT__js/forms.js"></script>
     <title>__TITLE__</title>
 </head>
 <body>';
@@ -91,10 +93,11 @@ class Utils {
                 } else {
                     $file = $CFG->root.'qtadmin.log';
                 }
-                file_put_contents($file, "[$time]: $message", FILE_APPEND | LOCK_EX);
+                file_put_contents($file, "[$time]: $message\n", FILE_APPEND | LOCK_EX);
+                chmod($file, 0600);
                 break;
             case 'stderr':
-                file_put_contents('php://stderr', "[$time]: $message");
+                file_put_contents('php://stderr', "[$time]: $message\n");
                 break;
             case 'syslog':
                 syslog($priority, $message);
This page took 0.0341 seconds and 5 git commands to generate.