X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fbackend%2Fmysql%2Fbackend.inc;h=71c3936226d32338bb6f79b25bcd53795efe07f6;hb=8300ec1a1a56adf502e9a250b4c6233d3c7b024d;hp=a3ee375bd645043ceb6950fa60464bbbc13935a1;hpb=f6d69fcd72522578e817fa447b899811460f51b4;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index a3ee375..71c3936 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -68,14 +68,18 @@ function addNode($params) { global $db,$node,$error,$error_messages; $parent_id=$params['node_parent']; + if ($params['flag']=='registration') $params['node_creator']=UBIK_ID; + if (!is_numeric($parent_id)) { $parent_id=$node['node_id']; } $parent_permissions=permissions::checkPerms($parent_id); + print_r($parent_permissions); if (!$parent_permissions['w']) { $error=$error_messages['WRITE_PERMISSION_ERROR']; logger::log('add','error','WRITE_PERMISSION_ERROR'); + die("trralalala1"); return false; } @@ -84,11 +88,8 @@ function addNode($params) { $kset->next(); $user_k=$kset->getString('user_k'); - if ($params['flag']=='registration') $params['node_creator']=UBIK_ID; - if (!$user_k && $params['node_creator']!=UBIK_ID) { $error=$error_messages['K_SPENT']; - return false; }