Exemple #1
0
 /**
  * Process replace URL
  *
  * @param $matches array
  *            Matches
  *
  * @return string Replaced URL
  */
 function processReplateURL($matches)
 {
     $buffer = JResponse::getBody();
     if (!preg_match('#<head>.*' . str_replace('#', '\\#', preg_quote($matches[0])) . '.*<\\/head>#smU', $buffer)) {
         // by pass if this url in head
         $url = T3Path::getURL($matches[4]);
         if ($url) {
             return "{$matches[1]}={$matches[2]}{$url}{$matches[2]}";
         }
     }
     return $matches[0];
 }