wrapper (supporting numeric as well as hash input parameter) around a new permission...
authorDaniel Hromada <hromi@Aphrodité.(none)>
Wed, 16 Mar 2011 00:06:42 +0000 (01:06 +0100)
committerDaniel Hromada <hromi@Aphrodité.(none)>
Wed, 16 Mar 2011 00:06:42 +0000 (01:06 +0100)
wwwroot/backend/mysql/backend.inc

index a3ee375bd645043ceb6950fa60464bbbc13935a1..71c3936226d32338bb6f79b25bcd53795efe07f6 100644 (file)
@@ -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;
         }
 
 
This page took 0.143582 seconds and 4 git commands to generate.