svn: /phd/trunk/phpdotnet/phd/ Index.php Package/PHP/ChunkedXHTML.php Reader.php
| From: | Moacir de Oliveira Miranda Júnior | Date: | Wed, 05 Aug 2009 12:59:12 +0000 |
| Subject: | svn: /phd/trunk/phpdotnet/phd/ Index.php Package/PHP/ChunkedXHTML.php Reader.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4615@lists.php.net to get a copy of this message | ||
moacir Wed, 05 Aug 2009 12:59:12 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=286839
Log:
fixing page titles
Changed paths:
U phd/trunk/phpdotnet/phd/Index.php
U phd/trunk/phpdotnet/phd/Package/PHP/ChunkedXHTML.php
U phd/trunk/phpdotnet/phd/Reader.php
Modified: phd/trunk/phpdotnet/phd/Index.php
===================================================================
--- phd/trunk/phpdotnet/phd/Index.php 2009-08-05 12:37:43 UTC (rev 286838)
+++ phd/trunk/phpdotnet/phd/Index.php 2009-08-05 12:59:12 UTC (rev 286839)
@@ -319,7 +319,7 @@
if ($open) {
if (empty($this->nfo[$this->currentid]["ldesc"])) {
/* FIXME: How can I mark that node with "reparse" flag? */
- $s = $this->getReader()->readInnerXml();
+ $s = htmlentities(trim($this->getReader()->readContent()));
$this->nfo[$this->currentid]["ldesc"] = $s;
}
}
@@ -328,7 +328,7 @@
if ($open) {
if (empty($this->nfo[$this->currentid]["sdesc"])) {
/* FIXME: How can I mark that node with "reparse" flag? */
- $s = $this->getReader()->readInnerXml();
+ $s = htmlentities(trim($this->getReader()->readContent()));
$this->nfo[$this->currentid]["sdesc"] = $s;
}
Modified: phd/trunk/phpdotnet/phd/Package/PHP/ChunkedXHTML.php
===================================================================
--- phd/trunk/phpdotnet/phd/Package/PHP/ChunkedXHTML.php 2009-08-05 12:37:43 UTC (rev 286838)
+++ phd/trunk/phpdotnet/phd/Package/PHP/ChunkedXHTML.php 2009-08-05 12:59:12 UTC (rev 286839)
@@ -16,7 +16,7 @@
}
public function header($id) {
- $title = Format::getShortDescription($id);
+ $title = Format::getLongDescription($id);
$header = <<<HEADER
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
Modified: phd/trunk/phpdotnet/phd/Reader.php
===================================================================
--- phd/trunk/phpdotnet/phd/Reader.php 2009-08-05 12:37:43 UTC (rev 286838)
+++ phd/trunk/phpdotnet/phd/Reader.php 2009-08-05 12:59:12 UTC (rev 286839)
@@ -113,6 +113,27 @@
return parent::expand();
}
+ /* Get the content of a named node, or the current node. */
+ public function readContent($node = null) { /* {{{ */
+ $retval = "";
+
+ if($this->isEmptyElement) {
+ return $retval;
+ }
+ if (!$node) {
+ $node = $this->name;
+ }
+ $retval = "";
+ while (self::readNode($node)) {
+ $retval .= $this->value;
+ }
+ return $retval;
+ } /* }}} */
+ /* Read $nodeName until END_ELEMENT */
+ public function readNode($nodeName) { /* {{{ */
+ return self::read() && !($this->nodeType === self::END_ELEMENT &&
$this->name == $nodeName);
+ } /* }}} */
+
}