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

Method deleteShare

lib/Db/ShareMapper.php:265–276  ·  view source on GitHub ↗

* Delete an own share (sharee or receiver) * @param $shareId * @return bool * @throws Exception */

($shareId)

Source from the content-addressed store, hash-verified

263 * @throws Exception
264 */
265 public function deleteShare($shareId)
266 {
267 $sql = $this->db->getQueryBuilder();
268 $sql->delete(self::TABLE_NAME)
269 ->where($sql->expr()->eq('id', $sql->createNamedParameter($shareId)))
270 ->andWhere($sql->expr()->orX(
271 $sql->expr()->eq('uid_initiator', $sql->createNamedParameter($this->userSession->getUser()->getUID())),
272 $sql->expr()->eq('uid_owner', $sql->createNamedParameter($this->userSession->getUser()->getUID()))
273 ));
274 $sql->executeStatement();
275 return true;
276 }
277
278 /**
279 * Delete all shares of a report

Callers

nothing calls this directly

Calls 2

deleteMethod · 0.45
getUIDMethod · 0.45

Tested by

no test coverage detected