4 * Copyright 2010 Roland Mas
6 * This file is part of FusionForge.
8 * FusionForge is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with FusionForge; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
23 require (dirname(__FILE__).'/../www/env.inc.php');
24 require $gfwww.'include/squal_pre.php';
29 require_once('common/include/Plugin.class.php') ;
30 require_once('common/include/PluginManager.class.php') ;
32 setup_plugin_manager () ;
34 $res = db_query_params ('SELECT group_id, group_name FROM groups',
37 $rows=db_numrows($res);
39 for ($i=0; $i<$rows; $i++) {
40 echo "Normalizing roles for group ".db_result($res,$i,'group_name')."\n" ;
42 $group = group_get_object(db_result($res,$i,'group_id')) ;
44 if ($group && !$group->isError()) {
45 $group->normalizeAllRoles () ;