/** * Get a shortened URL * * @param string $url URL * @return string */ public static function getShortURL($url) { $hash = Hasher::getHashFromURL($url); if (!$hash && $this->shorten) { $hash = Hasher::hash($url); } if ($hash) { return elgg_normalize_url(implode('/', array(PAGEHANDLER, $hash))); } return $url; }