psql db schema test
[mirrors/Kyberia-bloodline.git] / scripts / forumprivate.php
CommitLineData
b42b2bf9
H
1<?php
2//requiring main config file with path/database etc. constants
3require('../config/config.inc');
4
5//connecting to database and creating universal $db object
6require(SYSTEM_ROOT.'/inc/log.inc');
7require(SYSTEM_ROOT.'/inc/database.inc');
8require(SYSTEM_ROOT.'/inc/nodes.inc');
9$db=new CLASS_DATABASE();
10$db_old=new CLASS_DATABASE("kyberia","kyberia","cyb3ry","127.0.0.1");
11
12$forumset=$db_old->query("select forum_id from forum where forum_public='private'");
13while ($forumset->next()) {
14 $old_id=$forumset->getString('forum_id');
15 $db->query("update nodes set node_system_access='private' where old_id='$old_id' and node_type='3'");
16}
17$forumset2=$db_old->query("select forum_id from forum where forum_public='moderated'");
18while ($forumset2->next()) {
19 $old_id=$forumset2->getString('forum_id');
20 $db->query("update nodes set node_system_access='moderated' where old_id='$old_id' and node_type='3'");
21}
22
23?>
This page took 0.317999 seconds and 4 git commands to generate.