1. Ronald Oussoren
  2. pyobjc

Commits

Ronald Oussoren  committed 5608770

Check for absolute URLs in navbox

  • Participants
  • Parent commits 9ea0276
  • Branches default

Comments (0)

Files changed (1)

File pyobjc-web/docroot/header.inc

View file
 <?
-/* $Id: header.inc,v 1.1 2002/11/12 07:41:06 bbum Exp $ */
+/* $Id: header.inc,v 1.2 2002/11/13 15:18:24 ronaldoussoren Exp $ */
 
 // section navigation (always visible)
 $sections = array(
     $link = $navbox[$i];
     if (substr($link,-2) == ".*")
       $link = substr($link,0,-2);
-    $link = '<a href="'.$root.$link.'">';
+    if (substr($link, 0, 7) == "http://") {
+      $link = '<a href="'.$link.'">';
+    } else {
+      $link = '<a href="'.$root.$link.'">';
+    }
   } else {
     $link = 0;
   }