cvs: phd /include PhDErrors.php /themes/php phpdotnet.php

From: Date: Sat, 27 Dec 2008 22:16:38 +0000
Subject: cvs: phd /include PhDErrors.php /themes/php phpdotnet.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2845@lists.php.net to get a copy of this message
bjori Sat Dec 27 22:16:38 2008 UTC Modified files: /phd/include PhDErrors.php /phd/themes/php phpdotnet.php Log: Fixed bug#46941 (FR: Find broken links) http://cvs.php.net/viewvc.cgi/phd/include/PhDErrors.php?r1=1.3&r2=1.4&diff_format=u Index: phd/include/PhDErrors.php diff -u phd/include/PhDErrors.php:1.3 phd/include/PhDErrors.php:1.4 --- phd/include/PhDErrors.php:1.3 Sat May 24 15:04:50 2008 +++ phd/include/PhDErrors.php Sat Dec 27 22:16:38 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: PhDErrors.php,v 1.3 2008/05/24 15:04:50 gwynne Exp $ */ +/* $Id: PhDErrors.php,v 1.4 2008/12/27 22:16:38 bjori Exp $ */ /* {{{ PhD error & message handler */ @@ -18,8 +18,9 @@ define('VERBOSE_TOC_WRITING', VERBOSE_PARTIAL_CHILD_READING << 1); define('VERBOSE_CHUNK_WRITING', VERBOSE_TOC_WRITING << 1); define('VERBOSE_NOVERSION', VERBOSE_CHUNK_WRITING << 1); +define('VERBOSE_BROKEN_LINKS', VERBOSE_NOVERSION << 1); -define('VERBOSE_ALL', (VERBOSE_NOVERSION << 1)-1); +define('VERBOSE_ALL', (VERBOSE_BROKEN_LINKS << 1)-1); define('VERBOSE_DEFAULT', (VERBOSE_ALL^(VERBOSE_PARTIAL_CHILD_READING|VERBOSE_CHUNK_WRITING|VERBOSE_NOVERSION))); $olderrrep = error_reporting(); @@ -67,6 +68,7 @@ VERBOSE_TOC_WRITING => 'VERBOSE_TOC_WRITING', VERBOSE_CHUNK_WRITING => 'VERBOSE_CHUNK_WRITING', VERBOSE_NOVERSION => 'VERBOSE_NOVERSION', + VERBOSE_BROKEN_LINKS => 'VERBOSE_BROKEN_LINKS', ); static $recursive = false; @@ -93,6 +95,7 @@ case VERBOSE_TOC_WRITING: case VERBOSE_CHUNK_WRITING: case VERBOSE_NOVERSION: + case VERBOSE_BROKEN_LINKS: $color = PhDConfig::phd_info_color(); $output = PhDConfig::phd_info_output(); $data = $msg; http://cvs.php.net/viewvc.cgi/phd/themes/php/phpdotnet.php?r1=1.59&r2=1.60&diff_format=u Index: phd/themes/php/phpdotnet.php diff -u phd/themes/php/phpdotnet.php:1.59 phd/themes/php/phpdotnet.php:1.60 --- phd/themes/php/phpdotnet.php:1.59 Sat Nov 15 17:48:11 2008 +++ phd/themes/php/phpdotnet.php Sat Dec 27 22:16:38 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: phpdotnet.php,v 1.59 2008/11/15 17:48:11 bjori Exp $ */ +/* $Id: phpdotnet.php,v 1.60 2008/12/27 22:16:38 bjori Exp $ */ abstract class phpdotnet extends PhDTheme { protected $elementmap = array( @@ -524,12 +524,17 @@ } $ref = strtolower(str_replace(array("_", "::", "->"), array("-", "-", "-"), $value)); - if (($filename = $this->getRefnameLink($ref)) !== null && $this->CURRENT_ID !== $filename) { - if ($this->chunked) { - return '<a href="'.$filename. '.' .$this->ext. '" class="function"'.$rel.'>' .$display_value.($tag == "function" ? "()" : ""). '</a>'; + if (($filename = $this->getRefnameLink($ref)) !== null) { + if ($this->CURRENT_ID !== $filename) { + if ($this->chunked) { + return '<a href="'.$filename. '.' .$this->ext. '" class="function"'.$rel.'>' .$display_value.($tag == "function" ? "()" : ""). '</a>'; + } + return '<a href="#'.$filename. '" class="function"'.$rel.'>' .$display_value.($tag == "function" ? "()" : ""). '</a>'; } - return '<a href="#'.$filename. '" class="function"'.$rel.'>' .$display_value.($tag == "function" ? "()" : ""). '</a>'; + } elseif ($this->CURRENT_ID !== $filename) { + v("No link found for $value", VERBOSE_BROKEN_LINKS); } + return '<b>' .$display_value.($tag == "function" ? "()" : ""). '</b>'; }

« previous php.doc.cvs (#2845) next »