projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use specific version for markerclusterer until the released version contains the...
[platal.git]
/
include
/
vcard.inc.php
diff --git
a/include/vcard.inc.php
b/include/vcard.inc.php
index
ddaa420
..
de0b49d
100644
(file)
--- a/
include/vcard.inc.php
+++ b/
include/vcard.inc.php
@@
-25,17
+25,19
@@
class VCard extends PlVCard
private $count = 0;
private $freetext = null;
private $photos = true;
private $count = 0;
private $freetext = null;
private $photos = true;
+ private $visibility;
public function __construct($photos = true, $freetext = null)
{
PlVCard::$folding = false;
public function __construct($photos = true, $freetext = null)
{
PlVCard::$folding = false;
+ $this->visibility = new ProfileVisibility(ProfileVisibility::VIS_PRIVATE);
$this->freetext = $freetext;
$this->photos = $photos;
}
public function addProfile($profile)
{
$this->freetext = $freetext;
$this->photos = $photos;
}
public function addProfile($profile)
{
- $profile = Profile::get($profile, Profile::FETCH_ALL);
+ $profile = Profile::get($profile, Profile::FETCH_ALL
, $this->visibility
);
if ($profile) {
$this->profile_list[] = $profile;
$this->count++;
if ($profile) {
$this->profile_list[] = $profile;
$this->count++;
@@
-75,9
+77,10
@@
class VCard extends PlVCard
// Emails
if (!is_null($user)) {
$entry->addMail(null, $user->bestalias, true);
// Emails
if (!is_null($user)) {
$entry->addMail(null, $user->bestalias, true);
- $entry->addMail(null, $user->bestalias_alternate);
if ($user->forlife != $user->bestalias) {
$entry->addMail(null, $user->forlife);
if ($user->forlife != $user->bestalias) {
$entry->addMail(null, $user->forlife);
+ }
+ if ($user->forlife_alternate != $user->bestalias) {
$entry->addMail(null, $user->forlife_alternate);
}
}
$entry->addMail(null, $user->forlife_alternate);
}
}
@@
-144,7
+147,7
@@
class VCard extends PlVCard
// Melix
if (!is_null($user)) {
// Melix
if (!is_null($user)) {
- $alias = $user->emailAlias
es
();
+ $alias = $user->emailAlias();
if (!is_null($alias) && $pf->alias_pub == 'public') {
$entry->addMail(null, $alias);
}
if (!is_null($alias) && $pf->alias_pub == 'public') {
$entry->addMail(null, $alias);
}
@@
-181,8
+184,9
@@
class VCard extends PlVCard
if ($this->photos) {
$res = XDB::query(
"SELECT attach, attachmime
if ($this->photos) {
$res = XDB::query(
"SELECT attach, attachmime
- FROM profile_photos AS p
- WHERE p.pid = {?}", $pf->id());
+ FROM profile_photos
+ WHERE pid = {?} AND pub IN ('public', {?})",
+ $pf->id(), $this->visibility->level());
if ($res->numRows()) {
list($data, $type) = $res->fetchOneRow();
$entry->setPhoto($data, strtoupper($type));
if ($res->numRows()) {
list($data, $type) = $res->fetchOneRow();
$entry->setPhoto($data, strtoupper($type));