Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
public function getNetworking($flags, $limit = null)
{
if ($this->networks == null && !$this->fetched(self::FETCH_NETWORKING)) {
- $this->setNetworking($this->getProfileField(self::FETCH_NETWORKING));
+ $nw = $this->getProfileField(self::FETCH_NETWORKING);
+ if ($nw) {
+ $this->setNetworking($nw);
+ }
}
if ($this->networks == null) {
return array();
return null;
}
$site = array_pop($site);
- return $site['address'];
+ return $site;
}
foreach ($this->networks as $id => $nw) {
// XXX hardcoded reference to web site index
if (
- (($flags & self::NETWORKING_WEB) && $nw['network_type'] == 0)
+ (($flags & Profile::NETWORKING_WEB) && $nw['network_type'] == 0)
||
- (! ($flags & self::NETWORKING_WEB))
+ (! ($flags & Profile::NETWORKING_WEB))
) {
$nws[$id] = $nw;
++$nb;