From: Harvie Date: Tue, 26 Oct 2010 23:36:17 +0000 (+0200) Subject: Logger converted to public static X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=fd15ea3a496d31453e21ac89ff4be0ae3fe671ef;p=mirrors%2FKyberia-bloodline.git Logger converted to public static --- diff --git a/wwwroot/inc/eventz/accesslist.inc b/wwwroot/inc/eventz/accesslist.inc index 337ccf1..87c342c 100644 --- a/wwwroot/inc/eventz/accesslist.inc +++ b/wwwroot/inc/eventz/accesslist.inc @@ -1,7 +1,7 @@ getString('user_id'); $db->query($q); } - $logger->log('add access',$node_id,'ok',$acc); + logger::log('add access',$node_id,'ok',$acc); } else { $error .= "$acc does not exist..."; } } diff --git a/wwwroot/inc/eventz/banlist.inc b/wwwroot/inc/eventz/banlist.inc index 9d46332..d817840 100644 --- a/wwwroot/inc/eventz/banlist.inc +++ b/wwwroot/inc/eventz/banlist.inc @@ -1,7 +1,7 @@ getString('user_id'); $db->query($q); } - $logger->log('add ban',$node_id,'ok',$ban); + logger::log('add ban',$node_id,'ok',$ban); } else { $error .= "$ban does not exist..."; } } diff --git a/wwwroot/inc/eventz/configure_parent.inc b/wwwroot/inc/eventz/configure_parent.inc index 31846ff..9fab234 100644 --- a/wwwroot/inc/eventz/configure_parent.inc +++ b/wwwroot/inc/eventz/configure_parent.inc @@ -1,6 +1,6 @@ update($q); $q="update nodes set node_children_count=node_children_count-1 where node_id='$old_parent'"; $db->update($q); - $logger->log('vector change',$changed,$old_vector,$node_vector); + logger::log('vector change',$changed,$old_vector,$node_vector); } return true; ?> diff --git a/wwwroot/inc/eventz/executelist.inc b/wwwroot/inc/eventz/executelist.inc index 18ff63c..a5e426a 100644 --- a/wwwroot/inc/eventz/executelist.inc +++ b/wwwroot/inc/eventz/executelist.inc @@ -1,6 +1,6 @@ getString('user_id'); $db->query($q); } - $logger->log('add execute',$node_id,'ok',$execute); + logger::log('add execute',$node_id,'ok',$execute); }else { $error .= "$execute does not exist..."; } } } diff --git a/wwwroot/inc/eventz/executorlist.inc b/wwwroot/inc/eventz/executorlist.inc index a00468c..8a0714f 100644 --- a/wwwroot/inc/eventz/executorlist.inc +++ b/wwwroot/inc/eventz/executorlist.inc @@ -1,7 +1,7 @@ getString('user_id')."'"; $q="insert into node_access set node_permission='exec',node_id=$node_id,user_id=".$set->getString('user_id'); $db->query($q); - $logger->log('add exec',$node_id,'ok',$executor); + $logger::log('add exec',$node_id,'ok',$executor); } } diff --git a/wwwroot/inc/eventz/logout.inc b/wwwroot/inc/eventz/logout.inc index 2d5ddb5..f2434e3 100644 --- a/wwwroot/inc/eventz/logout.inc +++ b/wwwroot/inc/eventz/logout.inc @@ -1,10 +1,10 @@ query($q); - $logger->log('logout',$node['node_id'],'ok',$_SESSION['user_name']); + $logger::log('logout',$node['node_id'],'ok',$_SESSION['user_name']); session_unset(); Header("Location: /main"); } diff --git a/wwwroot/inc/eventz/masterlist.inc b/wwwroot/inc/eventz/masterlist.inc index 62832f0..9d4fb42 100644 --- a/wwwroot/inc/eventz/masterlist.inc +++ b/wwwroot/inc/eventz/masterlist.inc @@ -1,7 +1,7 @@ getString('user_id'); $db->query($q); - $logger->log('add master',$node_id,'ok',$master); + logger::log('add master',$node_id,'ok',$master); } } diff --git a/wwwroot/inc/eventz/oplist.inc b/wwwroot/inc/eventz/oplist.inc index f78bc56..8fc130e 100644 --- a/wwwroot/inc/eventz/oplist.inc +++ b/wwwroot/inc/eventz/oplist.inc @@ -1,6 +1,6 @@ query($q); } - $logger->log('add op',$node_id,'ok',$op); + logger::log('add op',$node_id,'ok',$op); }else { $error .= "$op does not exist..."; } } } diff --git a/wwwroot/inc/eventz/silencelist.inc b/wwwroot/inc/eventz/silencelist.inc index eb59651..5cd1a79 100644 --- a/wwwroot/inc/eventz/silencelist.inc +++ b/wwwroot/inc/eventz/silencelist.inc @@ -1,7 +1,7 @@ getString('user_id'); $db->query($q); } - $logger->log('add silence',$node_id,'ok',$sil); + logger::log('add silence',$node_id,'ok',$sil); } else { $error .= "$sil does not exist..."; } } diff --git a/wwwroot/inc/eventz/unbook.inc b/wwwroot/inc/eventz/unbook.inc index 227f713..6ab4b46 100644 --- a/wwwroot/inc/eventz/unbook.inc +++ b/wwwroot/inc/eventz/unbook.inc @@ -1,18 +1,18 @@ update($q); $q="update node_access set last_visit='',node_bookmark='no' where user_id='".$_SESSION['user_id']."' and node_id='".$node['node_id']."'"; $result=$db->query($q); if ($result) { - $logger->log('unbook','ok'); + logger::log('unbook','ok'); return true; } else { - $logger->log('unbook','failed'); + logger::log('unbook','failed'); $error='unbook failed'; return false; } diff --git a/wwwroot/inc/log.inc b/wwwroot/inc/log.inc index f575f63..5a35b16 100644 --- a/wwwroot/inc/log.inc +++ b/wwwroot/inc/log.inc @@ -1,7 +1,7 @@ log('add','error','WRITE_PERMISSION_ERROR'); + logger::log('add','error','WRITE_PERMISSION_ERROR'); return false; } @@ -100,8 +100,7 @@ node_vector='".$params['node_vector']."'"; --$user_k; $db->query("update users set user_k='$user_k' where user_id='$params[node_creator]'"); $db->query("commit"); - global $logger; - $logger->log('add','ok',$id); + logger::log('add','ok',$id); if ($_POST['code']) { $params['node_creator']=UBIK_ID; diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php index ff90b6f..ef08441 100644 --- a/wwwroot/nodes.php +++ b/wwwroot/nodes.php @@ -42,7 +42,7 @@ require(INCLUDE_DIR.'error_messages.inc'); require(INCLUDE_DIR.'database.inc'); $db = new CLASS_DATABASE(); -$logger = new logger; //XXX +//$logger = new logger; //XXX if (!empty($_GET['template_id'])) { $template_id=$_GET['template_id']; @@ -283,7 +283,7 @@ if ($_SESSION['user_id']) { //if node is css if ($node['template_id']!='2019721'){ - $logger->log('enter',$node['node_id'],'ok',$node['node_user_subchild_count']); + logger::log('enter',$node['node_id'],'ok',$node['node_user_subchild_count']); if (!empty($_SESSION['user_id']) && is_numeric($node['node_id'])) { $q="update node_access set visits=visits+1,node_user_subchild_count='0',last_visit=NOW() where node_id='".$node['node_id']."' and user_id='".$_SESSION['user_id']."'"; // echo $q; @@ -330,7 +330,7 @@ elseif (!$permissions['r'] && $_GET['magic_word']) { else { - $logger->log('enter',$node['node_id'],'failed'); + logger::log('enter',$node['node_id'],'failed'); }