|
@@ 148-158 (lines=11) @@
|
| 145 |
|
$addressBooks = []; |
| 146 |
|
|
| 147 |
|
$result = $query->execute(); |
| 148 |
|
while($row = $result->fetch()) { |
| 149 |
|
$addressBooks[$row['id']] = [ |
| 150 |
|
'id' => $row['id'], |
| 151 |
|
'uri' => $row['uri'], |
| 152 |
|
'principaluri' => $this->convertPrincipal($row['principaluri'], false), |
| 153 |
|
'{DAV:}displayname' => $row['displayname'], |
| 154 |
|
'{' . Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'], |
| 155 |
|
'{http://calendarserver.org/ns/}getctag' => $row['synctoken'], |
| 156 |
|
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
| 157 |
|
]; |
| 158 |
|
} |
| 159 |
|
$result->closeCursor(); |
| 160 |
|
|
| 161 |
|
// query for shared calendars |
|
@@ 209-219 (lines=11) @@
|
| 206 |
|
$addressBooks = []; |
| 207 |
|
|
| 208 |
|
$result = $query->execute(); |
| 209 |
|
while($row = $result->fetch()) { |
| 210 |
|
$addressBooks[$row['id']] = [ |
| 211 |
|
'id' => $row['id'], |
| 212 |
|
'uri' => $row['uri'], |
| 213 |
|
'principaluri' => $this->convertPrincipal($row['principaluri'], false), |
| 214 |
|
'{DAV:}displayname' => $row['displayname'], |
| 215 |
|
'{' . Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'], |
| 216 |
|
'{http://calendarserver.org/ns/}getctag' => $row['synctoken'], |
| 217 |
|
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
| 218 |
|
]; |
| 219 |
|
} |
| 220 |
|
$result->closeCursor(); |
| 221 |
|
|
| 222 |
|
return array_values($addressBooks); |