svn: /phd/trunk/ package_generic.xml phpdotnet/phd/Package/Generic/XHTML.php

From: Date: Mon, 26 Oct 2009 14:38:21 +0000
Subject: svn: /phd/trunk/ package_generic.xml phpdotnet/phd/Package/Generic/XHTML.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5213@lists.php.net to get a copy of this message
rquadling Mon, 26 Oct 2009 14:38:21 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=289941 Log: Fix bug#49925 : imagedata now supports width and/or depth (becomes width and/or height) Bug: http://bugs.php.net/49925 (Open) PhD does not support width and depth attributes for the <imagedata> element Changed paths: U phd/trunk/package_generic.xml U phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php Modified: phd/trunk/package_generic.xml =================================================================== --- phd/trunk/package_generic.xml 2009-10-26 14:14:58 UTC (rev 289940) +++ phd/trunk/package_generic.xml 2009-10-26 14:38:21 UTC (rev 289941) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8"?> <package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" @@ -47,6 +47,7 @@ <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD Style</license> <notes> - Implemented PEAR request #2390: RSS feeds for PEAR Dcumentation Index (Christian) + - Fixed bug #49925 - imagedata now supports width and/or depth (becomes width and/or height) (Richard Quadling) </notes> <contents> Modified: phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php =================================================================== --- phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php 2009-10-26 14:14:58 UTC (rev 289940) +++ phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php 2009-10-26 14:38:21 UTC (rev 289941) @@ -1299,10 +1299,11 @@ public function format_imagedata($open, $name, $attrs) { $file = $attrs[Reader::XMLNS_DOCBOOK]["fileref"]; $newpath = $this->mediamanager->handleFile($file); - if ($this->cchunk["mediaobject"]["alt"] !== false) { - return '<img src="' . $newpath . '" alt="' .$this->cchunk["mediaobject"]["alt"]. '" />'; - } - return '<img src="' . $newpath . '" />'; + $width = isset($attrs[Reader::XMLNS_DOCBOOK]["width"]) ? ' width="' . $attrs[Reader::XMLNS_DOCBOOK]["width"] . '"' : ''; + $height = isset($attrs[Reader::XMLNS_DOCBOOK]["depth"]) ? ' height="' . $attrs[Reader::XMLNS_DOCBOOK]["depth"] . '"' : ''; + $alt = ($this->cchunk["mediaobject"]["alt"] !== false) ? ' ' . $this->cchunk["mediaobject"]["alt"] : ''; + + return '<img src="' . $newpath . '"' . $alt . $width . $height . ' />'; } public function format_table($open, $name, $attrs, $props) {

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