com phd: Kill bogus files: phpdotnet/phd/PI/PHPDOCHandler.php.orig phpdotnet/phd/PI/PHPDOCHandler.php.rej

From: Date: Tue, 27 Nov 2012 22:15:06 +0000
Subject: com phd: Kill bogus files: phpdotnet/phd/PI/PHPDOCHandler.php.orig phpdotnet/phd/PI/PHPDOCHandler.php.rej
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-10774@lists.php.net to get a copy of this message
Commit: 97f73b1d8e98838e5695de2b98557f7255fd7a9f Author: Hannes Magnusson <bjori@10gen.com> Tue, 27 Nov 2012 14:15:06 -0800 Parents: 46c57a689a8ba54f816f1a9c4af920a0776a0a4a Branches: master Link: http://git.php.net/?p=phd.git;a=commitdiff;h=97f73b1d8e98838e5695de2b98557f7255fd7a9f Log: Kill bogus files Changed paths: D phpdotnet/phd/PI/PHPDOCHandler.php.orig D phpdotnet/phd/PI/PHPDOCHandler.php.rej

diff --git a/phpdotnet/phd/PI/PHPDOCHandler.php.orig b/phpdotnet/phd/PI/PHPDOCHandler.php.orig deleted file mode 100644 index 13eb84f..0000000 --- a/phpdotnet/phd/PI/PHPDOCHandler.php.orig +++ /dev/null @@ -1,125 +0,0 @@ -<?php -namespace phpdotnet\phd; -/* $Id$ */ - -class PI_PHPDOCHandler extends PIHandler { - - public function __construct($format) { - parent::__construct($format); - } - - public function parse($target, $data) { - $pattern = "/(?<attr>[\w]+[\w\-\.]*)[\s]*=[\s]*\"(?<value>[^\"]*)\"/"; - - preg_match($pattern, $data, $matches); - switch($matches["attr"]) { - case "print-version-for": - // FIXME: Figureout a way to detect the current language (for unknownversion) - return $this->format->autogenVersionInfo($matches["value"], "en"); - case "generate-index-for": - switch($matches["value"]) { - case "function": - case "refentry": - $tmp = $this->format->getRefs(); - $ret = ""; - $refs = array(); - $info = array(); - foreach($tmp as $id) { - $filename = $this->format->createLink($id, $desc); - $refs[$filename] = $desc; - $info[$filename] = array($this->format->getLongDescription($id, $islong), $islong); - } - - natcasesort($refs); - - // Nav bar to jump directly to a character - $chars = array_count_values(array_map(function($ref){ return strtolower($ref[0]); }, $refs)); - $ret = '<p class="gen-index index-for-'.$matches["value"].'-toc">'."\n"; - foreach ($chars as $char => $count) { - $ret .= '<a href="#'.$matches["value"].'-index-for-'.$char.'">'.$char.'</a>'."\n"; - } - $ret .= "</p>\n"; - - // Workaround for 5.3 that doesn't allow func()[index] - $current = current($refs); - $char = $current[0]; - - $ret .= "<ul class='gen-index index-for-{$matches["value"]}'>"; - $ret .= "<li class='gen-index index-for-{$char}'>$char<ul id='{$matches["value"]}-index-for-{$char}'>\n"; - foreach($refs as $filename => $data) { - if ($data[0] != $char && strtolower($data[0]) != $char) { - $char = strtolower($data[0]); - $ret .= "</ul></li>\n"; - $ret .= "<li class='gen-index index-for-{$char}'>$char<ul id='{$matches["value"]}-index-for-{$char}'>\n"; - } - $longdesc = $info[$filename][1] ? " - {$info[$filename][0]}" : ""; - $ret .= '<li><a href="'.$filename. '" class="index">' .$data. '</a>' . $longdesc . '</li>'."\n"; - } - $ret .= "</ul></li></ul>\n\n"; - return $ret; - break; - - case "examples": - $ret = "<ul class='gen-index index-for-{$matches["value"]}'>"; - foreach($this->format->getExamples() as $idx => $id) { - $link = $this->format->createLink($id, $desc); - $ret .= '<li><a href="'.$link.'" class="index">Example#' .$idx. ' - ' .$desc. '</a></li>'."\n"; - } - $ret .= "</ul>"; - return $ret; - break; - default: - trigger_error("Don't know how to handle {$matches["value"]} for {$matches["attr"]}", E_USER_WARNING); - break; - } - break; - - case "generate-changelog-for": - $parents = explode(" ", $matches["value"]); - $changelogs = $this->format->getChangelogsForChildrenOf($parents); - usort($changelogs, array(__CLASS__, "_sortByVersion")); - - $ret = "<table class='doctable table'><thead><tr>"; - $ret .= "<th>" . $this->format->autogen("Version", "en") . "</th>"; - $ret .= "<th>" . $this->format->autogen("Function", "en") . "</th>"; - $ret .= "<th>" . $this->format->autogen("Description", "en") . "</th>"; - $ret .= "</tr></thead><tbody>"; - - $version = ""; - foreach($changelogs as $entry) { - $link = $this->format->createLink($entry["docbook_id"], $desc); - if ($version == $entry["version"]) { - $v = "&nbsp;"; - } - else { - $version = $entry["version"]; - $v = $version; - } - $ret .= sprintf("<tr><td>%s</td><td><a href='%s'>%s</a></td><td>%s</td></tr>", $v, $link, $desc, $entry["description"]); - } - - return $ret . "</tbody></table>"; - - break; - - default: - trigger_error("Don't know how to handle {$matches["attr"]}", E_USER_WARNING); - break; - } - - } - - // usort() callback function used in generate-changelog-for, higest (newest) version first - // 1.2.11 comes before 1.2.2 - protected static function _sortByVersion($a, $b) { - return -1 * strnatcasecmp($a["version"], $b["version"]); - } - -} - -/* -* vim600: sw=4 ts=4 syntax=php et -* vim<600: sw=4 ts=4 -*/ - - diff --git a/phpdotnet/phd/PI/PHPDOCHandler.php.rej b/phpdotnet/phd/PI/PHPDOCHandler.php.rej deleted file mode 100644 index 2dbb81d..0000000 --- a/phpdotnet/phd/PI/PHPDOCHandler.php.rej +++ /dev/null @@ -1,115 +0,0 @@ -*************** -*** 15,22 **** - switch($matches["attr"]) { - case "print-version-for": - // FIXME: Figureout a way to detect the current language (for unknownversion) - return $this->format->autogenVersionInfo($matches["value"], "en"); - case "generate-index-for": - switch($matches["value"]) { - case "function": - case "refentry": ---- 16,30 ---- - switch($matches["attr"]) { - case "print-version-for": - // FIXME: Figureout a way to detect the current language (for unknownversion) -+ if (!$this->format instanceof Index) { - return $this->format->autogenVersionInfo($matches["value"], "en"); -+ } -+ return; -+ - case "generate-index-for": -+ if ($this->format instanceof Index) { -+ return; -+ } - switch($matches["value"]) { - case "function": - case "refentry": -*************** -*** 74,82 **** - } - break; - - case "generate-changelog-for": - $parents = explode(" ", $matches["value"]); - $changelogs = $this->format->getChangelogsForChildrenOf($parents); - usort($changelogs, array(__CLASS__, "_sortByVersion")); - - $ret = "<table class='doctable table'><thead><tr>"; ---- 82,126 ---- - } - break; - -+ case "extension-membership": -+ if ($this->format instanceof Index) { -+ return $this->format->setMembership($matches["value"]); -+ } -+ return; -+ -+ case "generate-changelog-for-membership": -+ if ($this->format instanceof Index) { -+ return; -+ } -+ -+ $changelogs = $this->format->getChangelogsForMembershipOf($matches["value"]); -+ return $this->generateChangelogMarkup($changelogs); -+ break; -+ - case "generate-changelog-for": -+ if ($this->format instanceof Index) { -+ return; -+ } -+ - $parents = explode(" ", $matches["value"]); - $changelogs = $this->format->getChangelogsForChildrenOf($parents); -+ return $this->generateChangelogMarkup($changelogs); -+ break; -+ -+ default: -+ trigger_error("Don't know how to handle {$matches["attr"]}", E_USER_WARNING); -+ break; -+ } -+ -+ } -+ -+ // usort() callback function used in generate-changelog-for, higest (newest) version first -+ // 1.2.11 comes before 1.2.2 -+ protected static function _sortByVersion($a, $b) { -+ return -1 * strnatcasecmp($a["version"], $b["version"]); -+ } -+ -+ protected function generateChangelogMarkup($changelogs) { - usort($changelogs, array(__CLASS__, "_sortByVersion")); - - $ret = "<table class='doctable table'><thead><tr>"; -*************** -*** 99,120 **** - } - - return $ret . "</tbody></table>"; -- -- break; -- -- default: -- trigger_error("Don't know how to handle {$matches["attr"]}", E_USER_WARNING); -- break; -- } -- -- } -- -- // usort() callback function used in generate-changelog-for, higest (newest) version first -- // 1.2.11 comes before 1.2.2 -- protected static function _sortByVersion($a, $b) { -- return -1 * strnatcasecmp($a["version"], $b["version"]); - } -- - } - - /* ---- 143,149 ---- - } - - return $ret . "</tbody></table>"; - } - } - - /*
« previous php.doc.cvs (#10774) next »