mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-28 03:04:15 +00:00
More E_NOTICE fixing.
This commit is contained in:
parent
1c16a45e3a
commit
8d9099b076
@ -38,7 +38,7 @@ class RSCDSUser extends User
|
|||||||
$html = "";
|
$html = "";
|
||||||
dbg_error_log("User", ":Render: type=$this->WriteType, edit_mode=$this->EditMode" );
|
dbg_error_log("User", ":Render: type=$this->WriteType, edit_mode=$this->EditMode" );
|
||||||
|
|
||||||
$ef = new EntryForm( $REQUEST_URI, $this->Values, $this->EditMode );
|
$ef = new EntryForm( $_SERVER['REQUEST_URI'], $this->Values, $this->EditMode );
|
||||||
$ef->NoHelp(); // Prefer this style, for the moment
|
$ef->NoHelp(); // Prefer this style, for the moment
|
||||||
|
|
||||||
$html = '<div id="entryform">';
|
$html = '<div id="entryform">';
|
||||||
@ -118,19 +118,19 @@ class RSCDSUser extends User
|
|||||||
* Present an extra editable row at the bottom of the browse.
|
* Present an extra editable row at the bottom of the browse.
|
||||||
*/
|
*/
|
||||||
if ( $ef->EditMode ) { // && $session->AllowedTo("MaintainRelationships") ) {
|
if ( $ef->EditMode ) { // && $session->AllowedTo("MaintainRelationships") ) {
|
||||||
if ( isset($this->roles['Group']) ) {
|
|
||||||
/**
|
|
||||||
* We only allow individuals to link to groups at this stage.
|
|
||||||
*/
|
|
||||||
$group_target = 'AND NOT EXISTS (SELECT 1 FROM role_member WHERE role_no = 2 AND user_no=usr.user_no)';
|
|
||||||
}
|
|
||||||
$sql = <<<EOSQL
|
$sql = <<<EOSQL
|
||||||
SELECT user_no, fullname FROM usr
|
SELECT user_no, fullname FROM usr
|
||||||
WHERE NOT EXISTS ( SELECT 0 FROM relationship
|
WHERE NOT EXISTS ( SELECT 0 FROM relationship
|
||||||
WHERE (to_user = usr.user_no AND from_user = $this->user_no)
|
WHERE (to_user = usr.user_no AND from_user = $this->user_no)
|
||||||
OR (from_user = usr.user_no AND to_user = $this->user_no))
|
OR (from_user = usr.user_no AND to_user = $this->user_no))
|
||||||
$group_target
|
|
||||||
EOSQL;
|
EOSQL;
|
||||||
|
if ( isset($this->roles['Group']) ) {
|
||||||
|
/**
|
||||||
|
* We only allow individuals to link to groups at this stage.
|
||||||
|
*/
|
||||||
|
$sql .= 'AND NOT EXISTS (SELECT 1 FROM role_member WHERE role_no = 2 AND user_no=usr.user_no)';
|
||||||
|
}
|
||||||
|
|
||||||
if ( isset($this->roles['Group']) )
|
if ( isset($this->roles['Group']) )
|
||||||
$nullvalue = translate( "--- select a user, group or resource ---" );
|
$nullvalue = translate( "--- select a user, group or resource ---" );
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user