cvs: phd(PHD_0_4) / package.xml /themes/php chmsource.php
| From: | Hannes Magnusson | Date: | Sun, 15 Feb 2009 19:38:23 +0000 |
| Subject: | cvs: phd(PHD_0_4) / package.xml /themes/php chmsource.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-3261@lists.php.net to get a copy of this message | ||
bjori Sun Feb 15 19:38:23 2009 UTC
Modified files: (Branch: PHD_0_4)
/phd package.xml
/phd/themes/php chmsource.php
Log:
MFH: Fix encoding issues in the Polish manual (probably related to bug#46871)
(patch by JarosÅaw GÅowacki)
http://cvs.php.net/viewvc.cgi/phd/package.xml?r1=1.74.2.19.2.45&r2=1.74.2.19.2.46&diff_format=u
Index: phd/package.xml
diff -u phd/package.xml:1.74.2.19.2.45 phd/package.xml:1.74.2.19.2.46
--- phd/package.xml:1.74.2.19.2.45 Sun Feb 15 09:54:08 2009
+++ phd/package.xml Sun Feb 15 19:38:22 2009
@@ -58,8 +58,9 @@
- Fix HTML problems with empty paragraphs in examples and qandaset questions (Christian)
- Support <uri> and <screenshot> (Christian)
- Copy images automatically using MediaManager (Christian)
- - Fix bug #47362: <h1> tag gets omitted in bightml (Christian)
- - Fix bug #47196: improve render of initializer tag (Laurent)
+ - Fixed bug#47362: <h1> tag gets omitted in bightml (Christian)
+ - Fixed bug#47196: improve render of initializer tag (Laurent)
+ - Fixed encoding issues in the Polish CHM builds. (JarosÅaw GÅowacki)
- Generate syntactically correct php files for pearweb when description or
title have a quote in it. (Christian)
</notes>
http://cvs.php.net/viewvc.cgi/phd/themes/php/chmsource.php?r1=1.4.2.5.2.10&r2=1.4.2.5.2.11&diff_format=u
Index: phd/themes/php/chmsource.php
diff -u phd/themes/php/chmsource.php:1.4.2.5.2.10 phd/themes/php/chmsource.php:1.4.2.5.2.11
--- phd/themes/php/chmsource.php:1.4.2.5.2.10 Wed Feb 11 05:07:46 2009
+++ phd/themes/php/chmsource.php Sun Feb 15 19:38:23 2009
@@ -1,5 +1,5 @@
<?php
-/* $Id: chmsource.php,v 1.4.2.5.2.10 2009/02/11 05:07:46 cweiske Exp $ */
+/* $Id: chmsource.php,v 1.4.2.5.2.11 2009/02/15 19:38:23 bjori Exp $ */
require_once $ROOT . '/themes/php/chunkedhtml.php';
class chmsource extends chunkedhtml {
@@ -124,7 +124,8 @@
"langcode" => "0x415 Polish",
"preferred_charset" => "Windows-1250",
"mime_charset_name" => "Windows-1250",
- "preferred_font" => self::DEFAULT_FONT
+ "preferred_font" => self::DEFAULT_FONT,
+ "title" => "PodrÄcznik PHP",
),
"pt_BR" => array(
"langcode" => "0x416 Portuguese (Brazil)",
@@ -220,17 +221,21 @@
protected function appendChm($name, $ref, $isChunk, $hasChild) {
switch ($isChunk) {
- case PhDReader::OPEN_CHUNK :
+ case PhDReader::OPEN_CHUNK:
+ $lang = $GLOBALS['OPTIONS']['language'];
+ $charset = $this->LANGUAGES[$lang]["preferred_charset"];
+ $name = htmlspecialchars(iconv('UTF-8', $charset, $name), ENT_QUOTES);
+
$this->currentTocDepth++;
fwrite($this->hhpStream, "{$ref}\n");
fwrite($this->hhcStream, "{$this->offset(1)}<li><object
type=\"text/sitemap\">\n" .
- "{$this->offset(3)}<param name=\"Name\"
value=\"" .htmlentities($name, ENT_QUOTES, 'UTF-8') . "\">\n"
.
+ "{$this->offset(3)}<param name=\"Name\"
value=\"" . $name . "\">\n" .
"{$this->offset(3)}<param name=\"Local\"
value=\"{$ref}\">\n" .
"{$this->offset(2)}</object>\n");
if ($hasChild) fwrite($this->hhcStream,
"{$this->offset(2)}<ul>\n");
fwrite($this->hhkStream, " <li><object
type=\"text/sitemap\">\n" .
" <param name=\"Local\"
value=\"{$ref}\">\n" .
- " <param name=\"Name\" value=\"" .
htmlentities($name, ENT_QUOTES, 'UTF-8') . "\">\n" .
+ " <param name=\"Name\" value=\"" . $name .
"\">\n" .
" </object>\n </li>\n");
break;
case PhDReader::CLOSE_CHUNK :
@@ -325,9 +330,13 @@
public function format_varlistentry($open, $name, $attrs) {
$this->collectContent($attrs);
+ $lang = $GLOBALS['OPTIONS']['language'];
+ $charset = $this->LANGUAGES[$lang]["preferred_charset"];
+ $content = htmlspecialchars(iconv('UTF-8', $charset,
$this->lastContent["name"]), ENT_QUOTES);
+
fwrite($this->hhkStream, " <li><object
type=\"text/sitemap\">\n" .
" <param name=\"Local\"
value=\"{$this->lastContent["reference"]}\">\n" .
- " <param name=\"Name\" value=\"" .
htmlentities($this->lastContent["name"], ENT_QUOTES, 'UTF-8') .
"\">\n" .
+ " <param name=\"Name\" value=\"" . $content .
"\">\n" .
" </object>\n </li>\n");
return false;
}