* get all shared panoramas * @return array * @throws Exception */
()
| 88 | * @throws Exception |
| 89 | */ |
| 90 | public function getAllSharedPanoramas() |
| 91 | { |
| 92 | $sql = $this->db->getQueryBuilder(); |
| 93 | $sql->from(self::TABLE_NAME_PANORAMA, 'PANORAMA') |
| 94 | ->rightJoin('PANORAMA', self::TABLE_NAME, 'SHARE', $sql->expr()->eq('PANORAMA.id', 'SHARE.item_source')) |
| 95 | ->select('PANORAMA.*') |
| 96 | ->selectAlias('SHARE.id', 'shareId') |
| 97 | ->selectAlias('SHARE.type', 'shareType') |
| 98 | ->selectAlias('SHARE.uid_owner', 'shareUid_owner') |
| 99 | ->addSelect('SHARE.permissions') |
| 100 | ->where($sql->expr()->eq('SHARE.item_type', $sql->createNamedParameter('panorama'))); |
| 101 | $statement = $sql->executeQuery(); |
| 102 | $result = $statement->fetchAll(); |
| 103 | $statement->closeCursor(); |
| 104 | return $result; |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Create a new share |