4 * GForge Forum Renamer - forum names are now unix-format for email gateway
6 * Copyright 2004 GForge, LLC
9 * This file is part of FusionForge.
11 * GForge is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * GForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with GForge; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
26 require_once dirname(__FILE__).'/../www/env.inc.php';
27 require_once $gfcommon.'include/pre.php';
30 // Convert forum names to new legal syntax
33 $res=db_query_params ('SELECT group_forum_id,forum_name FROM forum_group_list',
42 for ($i=0; $i<db_numrows($res); $i++) {
44 $res2 = db_query_params ('UPDATE forum_group_list SET forum_name=$1 WHERE group_forum_id=$2',
45 array (ereg_replace('[^_\.0-9a-z-]','-', strtolower(db_result($res,$i,'forum_name'))),
46 db_result($res,$i,'group_forum_id'))) ;
55 // Long-standing oddity in GForge -
56 // forums were ZERO-pen Discussion, not Oh-pen Discussion
58 $res = db_query_params ('UPDATE forum_group_list SET forum_name=$1
60 array('open-discussion',
75 // c-file-style: "bsd"