function replaceLinks($content)
 {
     global $REX;
     // -- preg match redaxo://[ARTICLEID]-[CLANG] --
     preg_match_all('/redaxo:\\/\\/([0-9]*)\\-([0-9]*)\\/?/im', $content, $matches, PREG_SET_ORDER);
     foreach ($matches as $match) {
         if (empty($match)) {
             continue;
         }
         $url = rex_getURL($match[1], $match[2]);
         $content = str_replace($match[0], $url, $content);
     }
     // -- preg match redaxo://[ARTICLEID] --
     preg_match_all('/redaxo:\\/\\/([0-9]*)\\/?/im', $content, $matches, PREG_SET_ORDER);
     foreach ($matches as $match) {
         if (empty($match)) {
             continue;
         }
         $url = rex_getURL($match[1], $this->clang);
         $content = str_replace($match[0], $url, $content);
     }
     return $content;
 }
 function replaceLinks($content)
 {
     // Hier beachten, dass man auch ein Zeichen nach dem jeweiligen Link mitmatched,
     // damit beim ersetzen von z.b. redaxo://11 nicht auch innerhalb von redaxo://112
     // ersetzt wird
     // siehe dazu: http://forum.redaxo.de/ftopic7563.html
     // -- preg match redaxo://[ARTICLEID]-[CLANG] --
     preg_match_all('@redaxo://([0-9]*)\\-([0-9]*)(.){1}/?@im', $content, $matches, PREG_SET_ORDER);
     foreach ($matches as $match) {
         if (empty($match)) {
             continue;
         }
         $url = rex_getURL($match[1], $match[2]);
         $content = str_replace($match[0], $url . $match[3], $content);
     }
     // -- preg match redaxo://[ARTICLEID] --
     preg_match_all('@redaxo://([0-9]*)(.){1}/?@im', $content, $matches, PREG_SET_ORDER);
     foreach ($matches as $match) {
         if (empty($match)) {
             continue;
         }
         $url = rex_getURL($match[1], $this->clang);
         $content = str_replace($match[0], $url . $match[2], $content);
     }
     return $content;
 }
 function replaceLinks($content)
 {
     // -- preg match REX_LINK_INTERN[ARTICLEID] --
     preg_match_all("/REX_LINK_INTERN\\[([0-9]*)\\]/im", $content, $matches);
     if (isset($matches[0][0]) and $matches[0][0] != '') {
         for ($m = 0; $m < count($matches[0]); $m++) {
             $url = rex_getURL($matches[1][$m], $this->clang);
             $content = str_replace($matches[0][$m], $url, $content);
         }
     }
     // -- preg match redaxo://[ARTICLEID] --
     preg_match_all("/redaxo:\\/\\/([0-9]*)\\/?/im", $content, $matches);
     if (isset($matches[0][0]) and $matches[0][0] != '') {
         for ($m = 0; $m < count($matches[0]); $m++) {
             $url = rex_getURL($matches[1][$m], $this->clang);
             $content = str_replace($matches[0][$m], $url, $content);
         }
     }
     return $content;
 }