/** * @return bool * @param string $s_input * @param string[] field names $a_keys * @desc Test whether a short URL is already taken by another page */ public function Test($s_input, $a_keys) { $short_url = new ShortUrl($s_input); $short_url->SetFormat($this->object_with_short_url->GetShortUrlFormat()); $short_url->SetParameterValuesFromObject($this->object_with_short_url); $manager = new ShortUrlManager($this->GetSiteSettings(), $this->GetDataConnection()); $taken = $manager->IsUrlTaken($short_url); unset($manager); return !$taken; }