Skip to content

Commit 7c13f11

Browse files
author
André L F S Bacci
committed
Fixes, comments, more deprectation notes
1 parent fb172fb commit 7c13f11

3 files changed

Lines changed: 29 additions & 14 deletions

File tree

configure.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -630,33 +630,32 @@ function dtd_pe_load( string $name , string $filename ) : string
630630
$base = $GLOBALS['ac']['LANG_BASE_DIR'];
631631
$lang = $GLOBALS['ac']["LANG"];
632632

633-
$contents = "";
634-
635-
$contents .= "<!ENTITY LANG '{$lang}'>\n\n";
636-
637-
$contents .= dtd_pe_load( "language-defs" , __DIR__ . "/../$base/language-defs.ent" );
638-
$contents .= dtd_pe_load( "language-snippets" , __DIR__ . "/../$base/language-snippets.ent" );
639-
$contents .= dtd_pe_load( "language-extensions" , __DIR__ . "/../$base/extensions.ent" );
633+
$contents = "<!ENTITY LANG '{$lang}'>\n\n";
640634

641635
if ( ! is_single_language() )
642636
{
643637
$contents .= dtd_pe_load( "translation-defs" , __DIR__ . "/../$lang/language-defs.ent" );
644638
$contents .= dtd_pe_load( "translation-snippets" , __DIR__ . "/../$lang/language-snippets.ent" );
645639
$contents .= dtd_pe_load( "translation-extensions" , __DIR__ . "/../$lang/extensions.ent" );
646640
}
641+
$contents .= dtd_pe_load( "language-defs" , __DIR__ . "/../$base/language-defs.ent" );
642+
$contents .= dtd_pe_load( "language-snippets" , __DIR__ . "/../$base/language-snippets.ent" );
643+
$contents .= dtd_pe_load( "language-extensions" , __DIR__ . "/../$base/extensions.ent" );
647644

648645
$contents .= dtd_pe_load( "base-entities" , __DIR__ . '/entities/global.ent' );
649646
$contents .= dtd_pe_load( "text-entities" , __DIR__ . '/temp/text-entities.dtd' );
650647
$contents .= dtd_pe_load( "file-entities" , __DIR__ . '/temp/file-entities.dtd' );
651648

652649
if ( $GLOBALS['ac']['CHMENABLED'] == 'yes' )
653-
$contents = dtd_pe_load( "manual.chmonly" , __DIR__ . "/chm/manual.chm.xml" );
650+
$contents .= dtd_pe_load( "manual.chmonly" , __DIR__ . "/chm/manual.chm.xml" );
654651
else
655652
$contents .= "<!ENTITY manual.chmonly ''>\n";
656653

657-
$outdir = __DIR__ . "/../$base/temp";
658-
realpain( $outdir , mkdir: true );
659-
file_put_contents( "{$outdir}/conf.dtd" , $contents );
654+
$langTempDir = __DIR__ . "/../$base/temp";
655+
realpain( $langTempDir , mkdir: true );
656+
657+
file_put_contents( __DIR__ . "/temp/lang" , $lang );
658+
file_put_contents( "{$langTempDir}/conf.dtd" , $contents );
660659
}
661660

662661
function dtd_file_entities()
@@ -905,7 +904,7 @@ function xinclude_run_xpointer( DOMDocument $dom ) : int
905904

906905
function xinclude_residual_fixup( DOMDocument $dom )
907906
{
908-
// XInclude failures are soft errors on translations, so we replace
907+
// XInclude failures are soft errors on translations, so we erase
909908
// residual XInclude tags on translations to keep them validating.
910909

911910
$fixups = 0;

manual.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
3+
4+
5+
This file is now being ignored, after third-party manual split.
6+
Yet, it is mentioned by name in configure.php, on PhD related
7+
code paths.
8+
9+
After these code paths are updated or moved into PhD, this can
10+
be deleted.
11+
12+
Keep these comments outside SGML comment tags, as to make this
13+
file invalid for XML loading.
14+
15+
16+
217
<!DOCTYPE PHPDOC [
318

419
<!-- Parameter entities used to configure manual.xml -->

scripts/file-entities.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
- doc-base/temp/file-entites.ent
3030
- doc-base/temp/file-entites/dir.dir.ent
3131
32-
The file entity for directories (file listings) are keep as individual
33-
files, to avoid these libxml errors, in some OS/versions:
32+
The file entity for directory listings is kept as an separate files,
33+
instead of a monolithic one, to avoid these libxml errors, in some
34+
OS and/or libxml versions:
3435
3536
- Detected an entity reference loop [1]
3637
- Maximum entity amplification factor exceeded [2]

0 commit comments

Comments
 (0)