1 (edited by wobo 2007-07-05 20:08)

Topic: [Solved] Create a group - does not work

I create a group in the admin area, give it a name "scouts". But it does not show up in the list of "Existing groups".
Also when trying to add a user to a group only the default groups show up.

wobo

FSFE Fellow #359 - The Freedom of Knowledge is a Human Right

2 (edited by wobo 2007-07-05 12:41)

Re: [Solved] Create a group - does not work

Some more info: Here is the code in admin_groups.php and from my side it looks ok. The config file shows the proper data of the database, I get no error message, so everything should be ok. But the new group is not written into the database.

     

 if ($_POST['mode'] == 'add')
        {
                $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\'') or error('Unable to check group title collision', __FILE__, __LINE__, $db->error());
                if ($db->num_rows($result))
                        message('There is already a group with the title \''.pun_htmlspecialchars($title).'\'.');

                $db->query('INSERT INTO '.$db->prefix.'groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood, g_color) VALUES(\''.$db->escape($title).'\', '.$user_title.', '.$read_board.', '.$post_replies.', '.$post_topics.', '.$post_polls.', '.$edit_posts.', '.$delete_posts.', '.$delete_topics.', '.$set_title.', '.$search.', '.$search_users.', '.$edit_subjects_interval.', '.$post_flood.', '.$search_flood.', \''.$group_color.'\')') or error('Unable to add group', __FILE__, __LINE__, $db->error());
                $new_group_id = $db->insert_id();

Any ideas?

wobo

FSFE Fellow #359 - The Freedom of Knowledge is a Human Right

3

Re: [Solved] Create a group - does not work

Solved. I don't know where the problem was. I uploaded the admin_groups.php from my installation tarball and it worked. Will do a diff later to find out.

wobo

FSFE Fellow #359 - The Freedom of Knowledge is a Human Right