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

Method deleteShare

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

260 * @throws Exception
261 */
262 public function deleteShare($shareId)
263 {
264 $sql = $this->db->getQueryBuilder();
265 $sql->delete(self::TABLE_NAME)
266 ->where($sql->expr()->eq('id', $sql->createNamedParameter($shareId)))
267 ->andWhere($sql->expr()->orX(
268 $sql->expr()->eq('uid_initiator', $sql->createNamedParameter($this->userSession->getUser()->getUID())),
269 $sql->expr()->eq('uid_owner', $sql->createNamedParameter($this->userSession->getUser()->getUID()))
270 ));
271 $sql->executeStatement();
272 return true;
273 }
274
275 /**
276 * 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