Kyberia v2.3 - 1st revision from SVN (Without patches of kyberia.sk team)
[mirrors/Kyberia-bloodline.git] / scripts / submissionthread.php
diff --git a/scripts/submissionthread.php b/scripts/submissionthread.php
new file mode 100644 (file)
index 0000000..12ee5bf
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+//requiring main config file with path/database etc. constants
+require('../config/config.inc');
+
+//connecting to database and creating universal $db object
+require(SYSTEM_ROOT.'/inc/log.inc');
+require(SYSTEM_ROOT.'/inc/database.inc');
+require(SYSTEM_ROOT.'/inc/nodes.inc');
+$db=new CLASS_DATABASE();
+
+$q="select * from nodes where node_type='forum'";
+$set=$db->query($q);
+
+while ($set->next()) {
+       $forum_vector=$set->getString('node_thread_vector');
+       $forum_id=$set->getString('node_id');
+       $db->query("update nodes set node_thread_vector='$forum_vector;$forum_id' where node_parent='$forum_id'");
+}
This page took 0.126006 seconds and 4 git commands to generate.