cvs: phd / config.php /themes/php phpdotnet.php

From: Date: Sat, 03 May 2008 23:59:38 +0000
Subject: cvs: phd / config.php /themes/php phpdotnet.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1597@lists.php.net to get a copy of this message
bjori Sat May 3 23:59:38 2008 UTC Modified files: /phd config.php /phd/themes/php phpdotnet.php Log: - Fixed bug#44750 (request for generic phd logger) - Added VERBOSE_NOVERSION (disabled by default) - Loop over all refnames when trying to find version info http://cvs.php.net/viewvc.cgi/phd/config.php?r1=1.39&r2=1.40&diff_format=u Index: phd/config.php diff -u phd/config.php:1.39 phd/config.php:1.40 --- phd/config.php:1.39 Sat May 3 23:33:36 2008 +++ phd/config.php Sat May 3 23:59:38 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: config.php,v 1.39 2008/05/03 23:33:36 bjori Exp $ */ +/* $Id: config.php,v 1.40 2008/05/03 23:59:38 bjori Exp $ */ /* {{{ PhD error & message handler */ @@ -17,8 +17,9 @@ define('VERBOSE_PARTIAL_CHILD_READING', VERBOSE_PARTIAL_READING << 1); 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_ALL', (VERBOSE_CHUNK_WRITING << 1)-1); +define('VERBOSE_ALL', (VERBOSE_NOVERSION << 1)-1); /* {{{ Print info messages: v("printf-format-text" [, $arg1, ...], $verbose-level) */ @@ -56,6 +57,7 @@ VERBOSE_PARTIAL_CHILD_READING => 'VERBOSE_PARTIAL_CHILD_READING', VERBOSE_TOC_WRITING => 'VERBOSE_TOC_WRITING', VERBOSE_CHUNK_WRITING => 'VERBOSE_CHUNK_WRITING', + VERBOSE_NOVERSION => 'VERBOSE_NOVERSION', ); static $recursive = false; @@ -81,6 +83,7 @@ case VERBOSE_PARTIAL_CHILD_READING: case VERBOSE_TOC_WRITING: case VERBOSE_CHUNK_WRITING: + case VERBOSE_NOVERSION: fprintf($OPTIONS["phd_info_output"], "[%s - %s] %s\n", $time, $err[$errno], $msg); break; @@ -143,7 +146,7 @@ 'enforce_revisions' => false, 'compatibility_mode' => true, 'build_log_file' => 'none', - 'verbose' => VERBOSE_ALL^(VERBOSE_PARTIAL_CHILD_READING|VERBOSE_CHUNK_WRITING), + 'verbose' => VERBOSE_ALL^(VERBOSE_PARTIAL_CHILD_READING|VERBOSE_CHUNK_WRITING|VERBOSE_NOVERSION), 'date_format' => "H:i:s", 'render_ids' => array( ), http://cvs.php.net/viewvc.cgi/phd/themes/php/phpdotnet.php?r1=1.51&r2=1.52&diff_format=u Index: phd/themes/php/phpdotnet.php diff -u phd/themes/php/phpdotnet.php:1.51 phd/themes/php/phpdotnet.php:1.52 --- phd/themes/php/phpdotnet.php:1.51 Sat May 3 16:30:42 2008 +++ phd/themes/php/phpdotnet.php Sat May 3 23:59:38 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: phpdotnet.php,v 1.51 2008/05/03 16:30:42 bjori Exp $ */ +/* $Id: phpdotnet.php,v 1.52 2008/05/03 23:59:38 bjori Exp $ */ abstract class phpdotnet extends PhDTheme { protected $elementmap = array( @@ -297,7 +297,11 @@ array("::", "->", "__", "_", '$', '()'), array("-", "-", "-", "-", "", ''), strtolower($funcname)); - return isset($this->versions[$funcname]) ? $this->versions[$funcname] : "No version information available, might be only in CVS"; + if(isset($this->versions[$funcname])) { + return $this->versions[$funcname]; + } + v("No version info for $funcname", VERBOSE_NOVERSION); + return false; } public function acronymInfo($acronym) { return isset($this->acronyms[$acronym]) ? $this->acronyms[$acronym] : false; @@ -314,8 +318,19 @@ if ($open) { $retval = ""; if ($this->cchunk["verinfo"]) { - $refname = current($this->cchunk["refname"]); - $retval = '<p class="verinfo">(' .(htmlspecialchars($this->versionInfo($refname), ENT_QUOTES, "UTF-8")). ')</p>'; + $verinfo = ""; + foreach($this->cchunk["refname"] as $refname) { + $verinfo = $this->versionInfo($refname); + + if ($verinfo) { + break; + } + } + if (!$verinfo) { + $verinfo = "No version information available, might be only in CVS"; + } + + $retval = '<p class="verinfo">(' .(htmlspecialchars($verinfo, ENT_QUOTES, "UTF-8")). ')</p>'; } $refnames = implode('</span> -- <span class="refname">', $this->cchunk["refname"]);

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