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

Method updateShareDomain

lib/Db/ShareMapper.php:228–237  ·  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

226 * @throws Exception
227 */
228 public function updateShareDomain($shareId, $domain)
229 {
230 $sql = $this->db->getQueryBuilder();
231 $sql->update(self::TABLE_NAME)
232 ->set('domain', $sql->createNamedParameter($domain))
233 ->where($sql->expr()->eq('uid_initiator', $sql->createNamedParameter($this->userSession->getUser()->getUID())))
234 ->andWhere($sql->expr()->eq('id', $sql->createNamedParameter($shareId)));
235 $sql->executeStatement();
236 return true;
237 }
238
239 /**
240 * 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