diff --git a/doc/update_08212000_to_09072000.php b/doc/update_08212000_to_09072000.php new file mode 100644 index 0000000000..d9afefb85f --- /dev/null +++ b/doc/update_08212000_to_09072000.php @@ -0,0 +1,37 @@ + accounts -> edit -> submit) + + include("/home/httpd/html/phpgroupware/inc/globalconfig.inc.php"); + include("/home/httpd/html/phpgroupware/inc/phpgwapi/phpgw_db_pgsql.inc.php"); + + $db = new db; + $db->Host = $phpgw_info["server"]["db_host"]; + $db->Type = $phpgw_info["server"]["db_type"]; +// $db->Database = $phpgw_info["server"]["db_name"]; + $db->Database = "phpgroupware"; + $db->User = $phpgw_info["server"]["db_user"]; + $db->Password = $phpgw_info["server"]["db_pass"]; + + $i=0; + $db->query("select * from accounts"); + while ($db->next_record()) { + $old_groups[$i]["con"] = $db->f("con"); + $old_groups[$i]["groups"] = $db->f("groups"); + $i++; + } + + for ($j=0; $jquery("update accounts set groups='$new_string' where con='" . $old_groups[$j]["con"] . "'"); + } + echo "Finished upgrading";