public function getFaceUrl($image_id, $face_id, $full = false)
{
global $conf;
// If we won't be using img.php to generate it, make sure the image
// is generated before returning a url to access it.
if ($conf['vfs']['src'] != 'php') {
$this->viewExists($image_id, $face_id, true);
}
// If not viewing directly out of the VFS, hand off to img.php
if ($conf['vfs']['src'] != 'direct') {
return Horde::url('faces/img.php', $full)->add('face', $face_id);
} else {
$path = substr(str_pad($image_id, 2, 0, STR_PAD_LEFT), -2) . '/faces';
return $GLOBALS['conf']['vfs']['path'] . htmlspecialchars($path . '/' . $face_id . Ansel_Faces::getExtension());
}
}