Kyberia v2.3 - 1st revision from SVN (Without patches of kyberia.sk team)
[mirrors/Kyberia-bloodline.git] / inc / eventz / configure_poll.inc
index ab186fab049f32f6a190b22966ce149915c12ed3..7d1ab154e90025cc9dda7c7a3bd79ef032a6b3ca 100644 (file)
@@ -1,10 +1,4 @@
 <?php
-/* This program is free software. It comes without any warranty, to
- * the extent permitted by applicable law. You can redistribute it
- * and/or modify it under the terms of the Do What The Fuck You Want
- * To Public License, Version 2, as published by Sam Hocevar. See
- * http://sam.zoy.org/wtfpl/COPYING for more details. */
-
 
 function configure_poll() {
        //poll is special node with serialized option.text and option.number array in node_content
@@ -24,24 +18,17 @@ function configure_poll() {
 
              $optionz=serialize($optionz);
 
-               $q="insert into nodes set
-node_name='".$_POST['question']."',node_parent='".$node['node_id']."',
-node_vector='".$node['node_vector'].";".$node['node_id']."'
-,node_system_access='public',node_external_access='".$node['node_external_access']."',
-node_creator='$user_id',node_type=11,node_views=0";
-
-               $db->query($q);
-               $id=$db->getLastInsertId();
-               $db->query("insert into node_content set node_id='$id',node_content='$optionz'");
-               log::log('add poll',$node['node_id'],'ok',$id);
-
+       $params['node_content']=$optionz;
+$params['node_name']=$_POST['question'];
+$params['template_id']="1549834";
+$params['node_creator']=$_SESSION['user_id'];
+nodes::addNode($params);
+ Header("Location: /id/".$node['node_parent']."/");
 
        }
 
-       else {
-               log::log('add poll',$node['node_id'],'failed','permissions');
-       }
 
 }
 
-?>
\ No newline at end of file
+?>
+
This page took 0.124558 seconds and 4 git commands to generate.