cvs: phd / package.xml /themes/php phpdotnet.php
| From: | Hannes Magnusson | Date: | Thu, 10 Jan 2008 19:16:24 +0000 |
| Subject: | cvs: phd / package.xml /themes/php phpdotnet.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-1026@lists.php.net to get a copy of this message | ||
bjori Thu Jan 10 19:16:24 2008 UTC
Modified files:
/phd package.xml
/phd/themes/php phpdotnet.php
Log:
Fixed bug#43421 (All intra-document hyperlinks broken in the Single HTML file form of manual)
http://cvs.php.net/viewvc.cgi/phd/package.xml?r1=1.25&r2=1.26&diff_format=u
Index: phd/package.xml
diff -u phd/package.xml:1.25 phd/package.xml:1.26
--- phd/package.xml:1.25 Thu Jan 10 18:19:49 2008
+++ phd/package.xml Thu Jan 10 19:16:23 2008
@@ -27,6 +27,7 @@
- Removed support for phnotify
- Fixed E_NOTICE on empty references
- Fixed bug#43428 (Empty TOC)
+ - Fixed bug#43421 (All intra-document hyperlinks broken in the Single HTML file form of manual)
- Added index chaching (Edward Z.)
- Added option (-l/--list) to list the supported formats/themes
</notes>
http://cvs.php.net/viewvc.cgi/phd/themes/php/phpdotnet.php?r1=1.34&r2=1.35&diff_format=u
Index: phd/themes/php/phpdotnet.php
diff -u phd/themes/php/phpdotnet.php:1.34 phd/themes/php/phpdotnet.php:1.35
--- phd/themes/php/phpdotnet.php:1.34 Thu Jan 10 18:19:48 2008
+++ phd/themes/php/phpdotnet.php Thu Jan 10 19:16:24 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: phpdotnet.php,v 1.34 2008/01/10 18:19:48 bjori Exp $ */
+/* $Id: phpdotnet.php,v 1.35 2008/01/10 19:16:24 bjori Exp $ */
abstract class phpdotnet extends PhDTheme {
protected $elementmap = array(
@@ -182,13 +182,17 @@
if ($open) {
$content = $fragment = "";
$class = $name;
+
if(isset($attrs[PhDReader::XMLNS_DOCBOOK]["linkend"])) {
$linkto = $attrs[PhDReader::XMLNS_DOCBOOK]["linkend"];
$id = $href = PhDHelper::getFilename($linkto);
+
if ($id != $linkto) {
$fragment = "#$linkto";
}
- $href .= ".".$this->ext;
+ if ($this->chunked) {
+ $href .= ".".$this->ext;
+ }
} elseif(isset($attrs[PhDReader::XMLNS_XLINK]["href"])) {
$href = $attrs[PhDReader::XMLNS_XLINK]["href"];
$content = "» ";
@@ -215,11 +219,17 @@
return '<a href="' .$link.$href.$fragment. '"
class="' .$class. '">' .$content.$href.$fragment.
'</a>';
} else {
if ($this->chunked) {
- $link = "";
+ $link = $href.$fragment;
+ } elseif(isset($linkto)) {
+ if ($fragment) {
+ $link = $fragment;
+ } else {
+ $link = "#$href";
+ }
} else {
- $link = "#";
+ $link = $href;
}
- return '<a href="' .$link.$href.$fragment. '"
class="' .$class. '">' .$content;
+ return '<a href="' .$link. '" class="'
.$class. '">' .$content;
}
}
return "</a>";
@@ -289,7 +299,11 @@
}
$content = '<h2>'.$this->autogen("toc",
$props["lang"]). '</h2><ul class="chunklist
chunklist_'.$name.'">';
foreach($chunks as $chunkid => $junk) {
- $content .= '<li><a href="' .($this->chunked ?
"" : "#").$chunkid. '.' .$this->ext. '">'
.(PhDHelper::getDescription($chunkid, true)). '</a></li>';
+ if ($this->chunked) {
+ $content .= '<li><a href="'.$chunkid. '.'
.$this->ext. '">' .(PhDHelper::getDescription($chunkid, true)).
'</a></li>';
+ } else {
+ $content .= '<li><a href="#'.$chunkid.
'">' .(PhDHelper::getDescription($chunkid, true)).
'</a></li>';
+ }
}
$content .= "</ul>\n";
$this->tmp["container_chunk"] = $content;
@@ -303,7 +317,11 @@
if (count($chunks)) {
$content = '<h2>'.$this->autogen("toc",
$props["lang"]). '</h2><ul class="chunklist
chunklist_reference">';
foreach($chunks as $chunkid => $junk) {
- $content .= '<li><a href="' .($this->chunked ?
"" : "#").$chunkid. '.' .$this->ext. '">'
.(PhDHelper::getDescription($chunkid, false)). '</a> â '
.(PhDHelper::getDescription($chunkid, true)). '</li>';
+ if ($this->chunked) {
+ $content .= '<li><a href="'.$chunkid. '.'
.$this->ext. '">' .(PhDHelper::getDescription($chunkid, false)).
'</a> â ' .(PhDHelper::getDescription($chunkid, true)).
'</li>';
+ } else {
+ $content .= '<li><a
href="#'.$chunkid.'">' .(PhDHelper::getDescription($chunkid, false)).
'</a> â ' .(PhDHelper::getDescription($chunkid, true)).
'</li>';
+ }
}
$content .= "</ul>\n";
}
@@ -394,7 +412,11 @@
return '<b>' .$display_value.($tag == "function" ?
"()" : ""). '</b>';
}
- return '<a href="' .($this->chunked ? "" :
"#").$filename. '.' .$this->ext. '"
class="function">' .$display_value.($tag == "function" ? "()"
: ""). '</a>';
+ if ($this->chunked) {
+ return '<a href="'.$filename. '.' .$this->ext.
'" class="function">' .$display_value.($tag == "function" ?
"()" : ""). '</a>';
+ }
+ return '<a href="#'.$filename. '"
class="function">' .$display_value.($tag == "function" ? "()"
: ""). '</a>';
+
}
public function format_type_text($type, $tagname) {
$t = strtolower($type);