Allow a user to maintain their relationships, now they are granting

permission to their own calendars.
This commit is contained in:
Andrew McMillan 2008-02-19 21:05:33 +13:00
parent 7900b008d0
commit 3206ae3dc8

View File

@ -312,7 +312,7 @@ EOSQL;
CreateHomeCalendar($username);
CreateDefaultRelationships($username);
}
if ( $this->AllowedTo("Admin") && isset($_POST['relate_to']) && $_POST['relate_to'] != '' && isset($_POST['relate_as']) && $_POST['relate_as'] != '' && isset($_POST['submit']) && $_POST['submit'] == htmlspecialchars(translate('Add Relationship')) ) {
if ( isset($_POST['relate_to']) && $_POST['relate_to'] != '' && isset($_POST['relate_as']) && $_POST['relate_as'] != '' && isset($_POST['submit']) && $_POST['submit'] == htmlspecialchars(translate('Add Relationship')) ) {
dbg_error_log("User",":Write: Adding relationship as %d to %d", $_POST['relate_as'], isset($_POST['relate_to'] ) );
$qry = new PgQuery("INSERT INTO relationship (from_user, to_user, rt_id ) VALUES( ?, $this->user_no, ? )", $_POST['relate_to'], $_POST['relate_as'] );
if ( $qry->Exec() ) {