X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=inc%2Fsmarty%2Fnode_methodz%2Ffunction.get_k.php;h=91ce3e4aac0b8bdd7cdaa52e2836f8a5a9494d70;hb=b42b2bf946332ad8544d53f610be9cb05e80bf56;hp=5f58b112d58aba4bddf4a7cba45cc3a71bbc9271;hpb=e586807dafc64c3fe152ab518599e6cf3f0f84e1;p=mirrors%2FKyberia-bloodline.git diff --git a/inc/smarty/node_methodz/function.get_k.php b/inc/smarty/node_methodz/function.get_k.php index 5f58b11..91ce3e4 100644 --- a/inc/smarty/node_methodz/function.get_k.php +++ b/inc/smarty/node_methodz/function.get_k.php @@ -5,7 +5,7 @@ if (is_numeric($params['offset'])) $offset=$params['offset']; else $offset=0; if (is_numeric($params['listing_amount'])) $listing_amount=$params['listing_amount']; - else $listing_amount=23; + else $listing_amount=DEFAULT_LISTING_AMOUNT; if (!is_numeric($_POST['interval'])) $interval=1; else $interval = $_POST['interval']; if ($params['vector']) { @@ -14,10 +14,10 @@ } else $vector="00"; -$q="select node_content.node_content,nodes.*,parent.node_name as parent_name,users.login as creator - from nodes left join node_content on node_content.node_id=nodes.node_id left join nodes as parent on nodes.node_parent=parent.node_id +$q="select nodes.*,parent.node_name as parent_name,users.login as creator + from nodes left join nodes as parent on nodes.node_parent=parent.node_id left join users on users.user_id=nodes.node_creator where nodes.node_created>now()-interval $interval day - and nodes.node_vector like '$vector%' and nodes.k>0 order by nodes.k desc limit $offset,$listing_amount"; + and nodes.node_vector like '$vector%' and nodes.k>0 and nodes.node_system_access!='private' order by nodes.k desc limit $offset,$listing_amount"; $set=$db->query($q); while ($set->next()) {