X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Feventz%2Fset_bookmark_category.inc;fp=wwwroot%2Finc%2Feventz%2Fset_bookmark_category.inc;h=159a0859ff08f528f8ffcf522fa24618d524c0b3;hb=51ff32267c4949bad6a8dddc502cbc01ed56edc8;hp=0000000000000000000000000000000000000000;hpb=dcee763368a1e3f380d07320a5254d91a09304e6;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/eventz/set_bookmark_category.inc b/wwwroot/inc/eventz/set_bookmark_category.inc new file mode 100644 index 0000000..159a085 --- /dev/null +++ b/wwwroot/inc/eventz/set_bookmark_category.inc @@ -0,0 +1,40 @@ +query("start transaction"); + + $q="update node_access set bookmark_category='$category_id' where node_id='$chosen_id' and user_id='".$_SESSION['user_id']."'"; + $db->query($q); + + $q="update neurons set dst='$category_id' where src='$chosen_id' and synapse_creator='".$_SESSION['user_id']."' and link='bookmark'"; + $result=$db->update($q); + if (!$result) $db->query("insert into neurons set synapse_creator='".$_SESSION['user_id']."',src='$chosen_id',dst='$category_id',link='bookmark'"); +$db->query("update nodes set lastdescendant_created=NOW() where node_id='$category_id'"); +$db->query("commit"); + } + + return true; +} +?> + +