The new OO skeletons mandate that methods be named as
xml:id="classname.methodname". Unfortunately, PhD hasn't been taught to
handle these new names properly (Thanks Hannes!) This patch fixes this.
We may want to consider factoring the function name <=> munged function
name <=> doc filename into its own function as it is something that
shows up quite often.
-- 
 Edward Z. Yang                        GnuPG: 0x869C48DA
 HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter
 [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
Index: themes/php/phpdotnet.php
===================================================================
RCS file: /repository/phd/themes/php/phpdotnet.php,v
retrieving revision 1.29
diff -u -r1.29 phpdotnet.php
--- themes/php/phpdotnet.php    25 Nov 2007 20:29:30 -0000      1.29
+++ themes/php/phpdotnet.php    26 Nov 2007 02:05:51 -0000
@@ -367,9 +367,20 @@
     
     public function format_function_text($value, $tag, $display_value = null) {
         if ($display_value === null) $display_value = $value;
+        
         $link = strtolower(str_replace(array("__", "_", "::", "->"), array("", 
"-", "-", "-"), $value));
-
-        if ($this->CURRENT_FUNCTION === $link || !($filename = 
PhDHelper::getFilename("function.$link"))) {
+        $oop_link = strtolower(str_replace(array("_", "::", "->"), array("", 
".", "."), $value));
+        
+        if (
+            (
+                $this->CURRENT_FUNCTION === $link ||
+                !($filename = PhDHelper::getFilename("function.$link"))
+            ) &&
+            (
+                $this->CURRENT_ID === $oop_link ||
+                !($filename = PhDHelper::getFilename($oop_link))
+            )
+        ) {
             return '<b>' .$display_value.($tag == "function" ? "()" : ""). 
'</b>';
         }
 

Reply via email to