cvs: phd / mktoc.php /include PhDReader.class.php
| From: | Hannes Magnusson | Date: | Sun, 19 Oct 2008 16:39:58 +0000 |
| Subject: | cvs: phd / mktoc.php /include PhDReader.class.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2267@lists.php.net to get a copy of this message | ||
bjori Sun Oct 19 16:39:58 2008 UTC
Modified files:
/phd mktoc.php
/phd/include PhDReader.class.php
Log:
Fixed bug#46252 (Class properties links to a function if theres one with the same name)
http://cvs.php.net/viewvc.cgi/phd/mktoc.php?r1=1.15&r2=1.16&diff_format=u
Index: phd/mktoc.php
diff -u phd/mktoc.php:1.15 phd/mktoc.php:1.16
--- phd/mktoc.php:1.15 Sun Oct 19 14:50:46 2008
+++ phd/mktoc.php Sun Oct 19 16:39:58 2008
@@ -29,7 +29,7 @@
* PhDHelper::getRefnameLink(), and allows easy refname->link resolution.
*
* @package PhD
-* @version CVS: $Id: mktoc.php,v 1.15 2008/10/19 14:50:46 bjori Exp $
+* @version CVS: $Id: mktoc.php,v 1.16 2008/10/19 16:39:58 bjori Exp $
*/
$r = new PhDReader();
@@ -48,9 +48,12 @@
if (empty($IDs[$lastid]["sdesc"])) {
if ($name == "refname") {
$IDs[$lastid]["sdesc"] = $refname = trim($r->readContent($name));
- $ref = strtolower(str_replace(array("_", "::",
"->"), array("-", "-", "-"), $refname));
- $REFS[$ref] = $lastid;
- $VARS[$refname] = $lastid;
+ if ($r->getTagNameByDepth($r->depth-2) == "phpdoc:varentry") {
+ $VARS[$refname] = $lastid;
+ } else {
+ $ref = strtolower(str_replace(array("_", "::",
"->"), array("-", "-", "-"), $refname));
+ $REFS[$ref] = $lastid;
+ }
continue;
}
else if ($name == "titleabbrev") {
@@ -64,8 +67,11 @@
} else if ($name == "refname") {
$refname = trim($r->readContent($name));
$ref = strtolower(str_replace(array("_", "::", "->"),
array("-", "-", "-"), $refname));
- $REFS[$ref] = $lastid;
- $VARS[$refname] = $lastid;
+ if ($r->getTagNameByDepth($r->depth-2) == "phpdoc:varentry") {
+ $VARS[$refname] = $lastid;
+ } else {
+ $REFS[$ref] = $lastid;
+ }
}
if (empty($IDs[$lastid]["ldesc"])) {
if ($name == "title" || $name == "refpurpose") {
http://cvs.php.net/viewvc.cgi/phd/include/PhDReader.class.php?r1=1.18&r2=1.19&diff_format=u
Index: phd/include/PhDReader.class.php
diff -u phd/include/PhDReader.class.php:1.18 phd/include/PhDReader.class.php:1.19
--- phd/include/PhDReader.class.php:1.18 Fri Oct 10 07:28:58 2008
+++ phd/include/PhDReader.class.php Sun Oct 19 16:39:58 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: PhDReader.class.php,v 1.18 2008/10/10 07:28:58 cweiske Exp $ */
+/* $Id: PhDReader.class.php,v 1.19 2008/10/19 16:39:58 bjori Exp $ */
//6271
class PhDReader extends XMLReader {
@@ -112,6 +112,9 @@
public function getParentTagName() { /* {{{ */
return $this->STACK[$this->depth-1];
} /* }}} */
+ public function getTagNameByDepth($depth) { /* {{{ */
+ return $this->STACK[$depth];
+ } /* }}} */
public function getPreviousSiblingTagName() { /* {{{ */
return $this->PREVIOUS_SIBLING;
} /* }}} */