MCPcopy Create free account
hub / github.com/Rello/analytics / updateShareDomain

Method updateShareDomain

lib/Db/ShareMapper.php:225–234  ·  view source on GitHub ↗

* Update the domain of a share * used for injecting charts into external sites * @param $shareId * @param $domain * @return bool * @throws Exception */

($shareId, $domain)

Source from the content-addressed store, hash-verified

223 * @throws Exception
224 */
225 public function updateShareDomain($shareId, $domain)
226 {
227 $sql = $this->db->getQueryBuilder();
228 $sql->update(self::TABLE_NAME)
229 ->set('domain', $sql->createNamedParameter($domain))
230 ->where($sql->expr()->eq('uid_initiator', $sql->createNamedParameter($this->userSession->getUser()->getUID())))
231 ->andWhere($sql->expr()->eq('id', $sql->createNamedParameter($shareId)));
232 $sql->executeStatement();
233 return true;
234 }
235
236 /**
237 * Update the permissions of a share

Callers 1

updateMethod · 0.80

Calls 3

setMethod · 0.80
updateMethod · 0.45
getUIDMethod · 0.45

Tested by

no test coverage detected