From 20f47494ae22fda00eeabc17c57f7f197177e12a Mon Sep 17 00:00:00 2001
From: moodler <moodler>
Date: Mon, 6 Jan 2003 08:23:36 +0000
Subject: [PATCH] Framed docs can now select a named anchor in a page

---
 doc/index.php | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/doc/index.php b/doc/index.php
index 2a5a302270..1e4d03b470 100644
--- a/doc/index.php
+++ b/doc/index.php
@@ -2,15 +2,20 @@
 
     require("../config.php");
 
-    optional_variable($file, "");    // docs file to view
+    optional_variable($file, "");     // docs file to view
     optional_variable($frame, "");    // docs file to view
-    optional_variable($lang, "");    // override current language
+    optional_variable($sub, "");      // sub-section (named anchor)
+    optional_variable($lang, "");     // override current language
 
     if (!empty($lang)) {
         $SESSION->doclang = $lang;
         save_session("SESSION");
     }
 
+    if (!empty($sub)) {
+        $sub = "#$sub";
+    }
+
     if (empty($file)) {
         $include = false;
         if (empty($frame)) {
@@ -38,6 +43,6 @@
     <FRAME NAME="top" SRC="top.php">
     <FRAMESET COLS="200,*">
         <FRAME NAME="contents" SRC="contents.php">
-        <FRAME NAME="main" SRC="index.php?file=<?PHP echo "$file"; ?>">
+        <FRAME NAME="main" SRC="index.php?file=<?PHP echo "$file$sub"; ?>">
     </FRAMESET>
 </FRAMESET>
-- 
2.39.5