From 8d9099b076fd9a8f4a32b60d585d4ab0680db495 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 3 Dec 2006 17:21:46 +1300 Subject: [PATCH] More E_NOTICE fixing. --- inc/RSCDSUser.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/RSCDSUser.php b/inc/RSCDSUser.php index 397625f3..412c271d 100644 --- a/inc/RSCDSUser.php +++ b/inc/RSCDSUser.php @@ -38,7 +38,7 @@ class RSCDSUser extends User $html = ""; 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 $html = '
'; @@ -118,19 +118,19 @@ class RSCDSUser extends User * Present an extra editable row at the bottom of the browse. */ 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 = <<user_no) OR (from_user = usr.user_no AND to_user = $this->user_no)) - $group_target 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']) ) $nullvalue = translate( "--- select a user, group or resource ---" ); else