Seite 1 von 2
welche Datei? -> Benutzergruppenrechte ändern
Verfasst: 25.05.2006 21:22
von leopittoni
Hallo
Die Rechte für Benutzergruppen werden doch in der "admin_ug_auth.php" vergeben, oder? Aber wo, ich finde leider die Stelle nicht...
Wer kann mir helfen?
Danke, Léo
Verfasst: 25.05.2006 21:53
von S2B
Code: Alles auswählen
if ( $action == 'insert' )
{
$sql_field = '';
$sql_value = '';
while ( list($auth_type, $value) = @each($update_acl_status[$forum_id]) )
{
$sql_field .= ( ( $sql_field != '' ) ? ', ' : '' ) . $auth_type;
$sql_value .= ( ( $sql_value != '' ) ? ', ' : '' ) . $value;
}
$sql_field .= ( ( $sql_field != '' ) ? ', ' : '' ) . 'auth_mod';
$sql_value .= ( ( $sql_value != '' ) ? ', ' : '' ) . ( ( !isset($update_mod_status[$forum_id]) ) ? 0 : $update_mod_status[$forum_id]);
$sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (forum_id, group_id, $sql_field)
VALUES ($forum_id, $group_id, $sql_value)";
}
else
{
$sql_values = '';
while ( list($auth_type, $value) = @each($update_acl_status[$forum_id]) )
{
$sql_values .= ( ( $sql_values != '' ) ? ', ' : '' ) . $auth_type . ' = ' . $value;
}
$sql_values .= ( ( $sql_values != '' ) ? ', ' : '' ) . 'auth_mod = ' . ( ( !isset($update_mod_status[$forum_id]) ) ? 0 : $update_mod_status[$forum_id]);
$sql = "UPDATE " . AUTH_ACCESS_TABLE . "
SET $sql_values
WHERE group_id = $group_id
AND forum_id = $forum_id";
}
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update private forum permissions", "", __LINE__, __FILE__, $sql);
}

Verfasst: 25.05.2006 22:14
von leopittoni
Hmm, in welcher Datei hast Du denn das gefunden, finde es nirgens...
Wie kann ich "manuell" einen Eintag vornehmen?
also:
Code: Alles auswählen
$sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce)
VALUES ('1', '1', '1', '1', '1', '0', '0', '0');
gibt leider eine Fehlermeldung...
Hat jemand eine Idee?
Danke, Léo
Verfasst: 26.05.2006 11:17
von S2B
leopittoni hat geschrieben:Hmm, in welcher Datei hast Du denn das gefunden, finde es nirgens...
admin/admin_ug_auth.php, Zeile 360.
leopittoni hat geschrieben:Code: Alles auswählen
$sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce)
VALUES ('1', '1', '1', '1', '1', '0', '0', '0');
gibt leider eine Fehlermeldung...
Und welche?

Verfasst: 26.05.2006 11:19
von leopittoni
Code: Alles auswählen
Couldn't update auth access
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; WHERE group_id = 21' at line 2
INSERT INTO phpbb_auth_access (auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce) VALUES ('1', '1', '1', '1', '1', '0', '0', '0'); WHERE group_id = 21
Line : 438
File : admin_forums.php
Danke, Léo
Verfasst: 26.05.2006 11:23
von S2B
Dein Code sieht so ähnlich aus, richtig?
Code: Alles auswählen
$sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce)
VALUES ('1', '1', '1', '1', '1', '0', '0', '0');
WHERE group_id = $variable";
Versuch mal das:
Code: Alles auswählen
[...]
VALUES ('1', '1', '1', '1', '1', '0', '0', '0')";
Verfasst: 26.05.2006 11:41
von leopittoni
Ok, danke! Nun kommt keine Fehlermeldung mehr, die Rechte für das entsprechende Forum werden aber nicht vergeben...
Léo
Verfasst: 26.05.2006 12:00
von leopittoni
Ich habe es mal so versucht:
Code: Alles auswählen
$sql = "UPDATE " . AUTH_ACCESS_TABLE . " (auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_pollcreate, auth_attachments, auth_mod)
VALUES (1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0);
WHERE group_id = $new_group_id";
Dann kommt aber folgende Fehlermeldung:
Code: Alles auswählen
Couldn't update auth access
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_de
UPDATE phpbb_auth_access (auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_pollcreate, auth_attachments, auth_mod) VALUES (1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0); WHERE group_id = 3
Line : 439
File : admin_forums.php
Wer kann mir helfen?
Danke, Léo
Verfasst: 26.05.2006 12:35
von fanrpg
Code: Alles auswählen
$sql = "INSERT INTO " . AUTH_ACCESS_TABLE . " (auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_pollcreate, auth_attachments, auth_mod)
VALUES (1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0)
WHERE group_id = $new_group_id";
Verfasst: 26.05.2006 12:59
von leopittoni
Hallo
Mit "INSERT INTO" ists dasselbe, kommt auch die Fehlermeldung...
Léo