mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-02-09 02:43:34 +00:00
Remove erroneous messages when you just hi 'Enter' instead of clicking
submit.
This commit is contained in:
parent
2b9b5634c8
commit
e49987b069
@ -359,7 +359,7 @@ EOSQL;
|
||||
$this->CreateHomeCalendar();
|
||||
$this->CreateDefaultRelationships();
|
||||
}
|
||||
if ( $this->AllowedTo("Admin") && isset($_POST['relate_to']) && isset($_POST['relate_as']) && isset($_POST['submit']) && $_POST['submit'] == htmlspecialchars(translate('Add Relationship')) ) {
|
||||
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')) ) {
|
||||
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() ) {
|
||||
@ -374,5 +374,6 @@ EOSQL;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user