diff --git a/htdocs/batch_process.php b/htdocs/batch_process.php index 7e6b39c..f92d4f4 100755 --- a/htdocs/batch_process.php +++ b/htdocs/batch_process.php @@ -74,7 +74,7 @@ if ($nr) { Memc::flush(); $rp = $nr != 1 ? "reports" : "report"; - IRCNotify::send("#SingularityViewer", "[CrashProcessor] $nr new $rp. http://crash.singularityviewer.org/"); + //IRCNotify::send("#SingularityViewer", "[CrashProcessor] $nr new $rp. http://crash.singularityviewer.org/"); } Session::GC(); diff --git a/htdocs/lib/Comments.php b/htdocs/lib/Comments.php index 07175a8..4bd5018 100644 --- a/htdocs/lib/Comments.php +++ b/htdocs/lib/Comments.php @@ -2,14 +2,14 @@ class Comments { - function updateCommentCount($id) + static function updateCommentCount($id) { $q = kl_str_sql("update signature set has_comments=(select count(*) as count from comment where signature_id=!i) where id=!i", $id, $id); DBH::$db->query($q); Memc::flush(); } - function addSignatureComment($id, $text) + static function addSignatureComment($id, $text) { global $S; $q = kl_str_sql("insert into comment (signature_id, user_id, comment) values (!i, !i, !s)", $id, $S->user_id, $text); @@ -17,7 +17,7 @@ class Comments self::updateCommentCount($id); } - function getSignatureComments($id) + static function getSignatureComments($id) { $ret = array(); $q = kl_str_sql("select c.*, u.name, u.email from comment c join users u on c.user_id = u.user_id where signature_id=!i order by id asc;", $id); @@ -33,14 +33,14 @@ class Comments return $ret; } - function delSignatureComment($id, $del_id) + static function delSignatureComment($id, $del_id) { $q = kl_str_sql("delete from comment where id=!i", $del_id); DBH::$db->query($q); self::updateCommentCount($id); } - function renderComments($id) + static function renderComments($id) { global $S; $comments = self::getSignatureComments($id); @@ -78,7 +78,7 @@ class Comments - function renderCommentPanel($id) + static function renderCommentPanel($id) { diff --git a/htdocs/lib/CrashReport.php b/htdocs/lib/CrashReport.php index 617ec16..153bb32 100644 --- a/htdocs/lib/CrashReport.php +++ b/htdocs/lib/CrashReport.php @@ -28,7 +28,7 @@ class CrashReport public static $all_signatures; - function htmlFrame($f, $chan, $version) + static function htmlFrame($f, $chan, $version) { $urlBase = "https://github.com/singularity-viewer/SingularityViewer/blob/" . self::getHash($chan, $version); @@ -67,7 +67,8 @@ class CrashReport } return $ret; } - function getTotal($filter) + + static function getTotal($filter) { $where = $filter->getWhere(); $q = "select count(id) as total from reports $where"; @@ -84,7 +85,7 @@ class CrashReport } } - function getReports($filter, $fields = "id, reported, client_version, client_channel, client_arch, os, gpu, grid, region, signature_id") + static function getReports($filter, $fields = "id, reported, client_version, client_channel, client_arch, os, gpu, grid, region, signature_id") { $ret = array(); $q = "select $fields from reports " . $filter->getWhere() . kl_str_sql(" order by id desc limit !i offset !i", $filter->limit, $filter->offset); @@ -106,7 +107,7 @@ class CrashReport return $ret; } - function getReport($id) + static function getReport($id) { $ret = array(); if (!$res = DBH::$db->query(kl_str_sql("select * from reports where id=!i", $id))) diff --git a/htdocs/lib/DBH.php b/htdocs/lib/DBH.php index a97316d..6852363 100644 --- a/htdocs/lib/DBH.php +++ b/htdocs/lib/DBH.php @@ -34,7 +34,7 @@ class DBH @fwrite($f, "[".date('Y-m-d H:i')."] ".$line."\n"); } - function getInstance() + static function getInstance() { if (self::$db === null) { diff --git a/htdocs/lib/Layout.php b/htdocs/lib/Layout.php index 267780b..0ca8ee4 100644 --- a/htdocs/lib/Layout.php +++ b/htdocs/lib/Layout.php @@ -32,7 +32,7 @@ class Layout { - function getLoginGateway() + static function getLoginGateway() { $assoc_handle_expires = (int)Option::get('assoc_handle_expires'); $now = time(); @@ -53,7 +53,7 @@ class Layout return GoogleOpenID::createRequest(URL_ROOT . "/process_login.php", $handle, true); } - function since($since) + static function since($since) { $since = time() - $since; $chunks = array( @@ -175,7 +175,7 @@ class Layout
diff --git a/htdocs/lib/Memc.php b/htdocs/lib/Memc.php index 131493a..e264980 100644 --- a/htdocs/lib/Memc.php +++ b/htdocs/lib/Memc.php @@ -5,7 +5,7 @@ class Memc static $active = false; static $expire = 7200; - function init() + static function init() { if (!class_exists("Memcached", false)) return; @@ -24,7 +24,7 @@ class Memc self::$active = true; } - function getq($q) + static function getq($q) { if (!self::$active) return false; @@ -32,7 +32,7 @@ class Memc return self::$mem->get($key); } - function setq($q, $data) + static function setq($q, $data) { if (!self::$active) return false; @@ -40,7 +40,7 @@ class Memc return self::$mem->set($key, $data, self::$expire); } - function flush() + static function flush() { if (!self::$active) return false; self::$mem->flush(); diff --git a/htdocs/lib/ReportParser.php b/htdocs/lib/ReportParser.php index 894810b..3588cfb 100644 --- a/htdocs/lib/ReportParser.php +++ b/htdocs/lib/ReportParser.php @@ -35,7 +35,7 @@ class ReportParser { static $extracted = array(); - function parse($id) + static function parse($id) { $q = kl_str_sql("select * from raw_reports where report_id=!i", $id); if (!$res = DBH::$db->query($q) OR !$row = DBH::$db->fetchRow($res)) diff --git a/htdocs/lib/init.php b/htdocs/lib/init.php index 5d06a62..5cf6c37 100644 --- a/htdocs/lib/init.php +++ b/htdocs/lib/init.php @@ -3,7 +3,7 @@ if (!defined('SITE_ROOT')) { exit(1); } -error_reporting(E_ALL ^ E_NOTICE); +error_reporting(E_ALL & ~(E_NOTICE | E_STRICT)); ini_set('display_errors',1); if (!extension_loaded('kl')) {