detectHttps();
return $s->url(
$email,
array(
'size' => $size,
'default' => Tools::fullUrl('phorkie/anonymous.png')
)
);
}
public function getLanguageOptions(File $file = null)
{
$html = '';
$fileExt = null;
if ($file !== null) {
$fileExt = $file->getExt();
}
foreach ($GLOBALS['phorkie']['languages'] as $ext => $arLang) {
if (isset($arLang['show']) && !$arLang['show']) {
continue;
}
$html .= sprintf(
'',
$ext,
$fileExt == $ext ? ' selected="selected"' : '',
$arLang['title']
) . "\n";
}
return $html;
}
public function getDomain($url)
{
return parse_url($url, PHP_URL_HOST);
}
public function fullUrl($path = '')
{
return Tools::fullUrl($path);
}
public function mayWriteLocally()
{
if ($GLOBALS['phorkie']['auth']['securityLevel'] == 0) {
//everyone may do everything
return true;
}
$logged_in = false;
if (!isset($_SESSION['identity'])) {
//not logged in
} else if ($GLOBALS['phorkie']['auth']['listedUsersOnly']) {
if (in_array($_SESSION['identity'], $GLOBALS['phorkie']['auth']['users'])) {
$logged_in = true;
}
} else {
//session identity exists, no special checks required
$logged_in = true;
}
return $logged_in;
}
public function getRepositoryEmbedCode(Repository $repo)
{
return '';
}
}
?>