6 public function getIconUrl($email, $size = 32)
8 if ($email == 'anonymous@phorkie'
9 || !$GLOBALS['phorkie']['cfg']['avatars']
11 return 'phorkie/anonymous.png';
14 $s = new \Services_Libravatar();
19 'default' => Tools::fullUrl('phorkie/anonymous.png')
24 public function getLanguageOptions(File $file = null)
26 $html = '<option value="_auto_">* automatic *</option>';
29 $fileExt = $file->getExt();
31 foreach ($GLOBALS['phorkie']['languages'] as $ext => $arLang) {
32 if (isset($arLang['show']) && !$arLang['show']) {
36 '<option value="%s"%s>%s</option>',
38 $fileExt == $ext ? ' selected="selected"' : '',
45 public function getDomain($url)
47 return parse_url($url, PHP_URL_HOST);
50 public function fullUrl($path = '')
52 return Tools::fullUrl($path);
55 public function mayWriteLocally()
57 if ($GLOBALS['phorkie']['auth']['securityLevel'] == 0) {
58 //everyone may do everything
63 if (!isset($_SESSION['identity'])) {
65 } else if ($GLOBALS['phorkie']['auth']['listedUsersOnly']) {
66 if (in_array($_SESSION['identity'], $GLOBALS['phorkie']['auth']['users'])) {
70 //session identity exists, no special checks required