File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2138,7 +2138,10 @@ public function getResourceUrl()
21382138 {
21392139 $ url = parent ::getResourceUrl ();
21402140 if (!is_null ($ this ->webUrl )) {
2141- return str_replace ("/_api " , "{$ this ->webUrl }/_api " , $ url );
2141+ $ urlInfo = parse_url ($ this ->getContext ()->getBaseUrl ());
2142+ $ rootSiteUrl = $ urlInfo ['scheme ' ] . ':// ' . $ urlInfo ['host ' ];
2143+ return "{$ rootSiteUrl }{$ this ->webUrl }/_api/web " ;
2144+ #return str_replace("/_api", "{$this->webUrl}/_api", $url);
21422145 }
21432146 return $ url ;
21442147 }
Original file line number Diff line number Diff line change @@ -98,8 +98,8 @@ public function testAssignUniquePermissions(Web $targetWeb)
9898 ->breakRoleInheritance (true )
9999 ->executeQuery ();
100100
101- $ targetWeb ->select ("HasUniqueRoleAssignments " )->get ()->executeQuery ();
102- self ::assertTrue ($ targetWeb ->getHasUniqueRoleAssignments ());
101+ $ result = $ targetWeb ->select ([ "HasUniqueRoleAssignments " ] )->get ()->executeQuery ();
102+ self ::assertTrue ($ result ->getHasUniqueRoleAssignments ());
103103 }
104104
105105 /**
You can’t perform that action at this time.
0 commit comments