From 5223950dbf95ba181eb383ccccbcfa3e92a45117 Mon Sep 17 00:00:00 2001 From: didou Date: Tue, 13 Apr 2004 12:19:16 +0000 Subject: [PATCH] cleaning --- docs/scripts/file-entities.php.in | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/docs/scripts/file-entities.php.in b/docs/scripts/file-entities.php.in index de41ec62..511e3f00 100644 --- a/docs/scripts/file-entities.php.in +++ b/docs/scripts/file-entities.php.in @@ -25,7 +25,6 @@ * Create smarty/docs/entities/file-entities.ent with respect * to all the specialities needed: * - * . CHM only appendix integration * . Translated language files with English ones as fallbacks * * Also take in account, that if XSLT style sheets are used, @@ -81,7 +80,7 @@ echo "\ncreating entities/file-entities.ent...\n"; fputs($fp, "\n\n"); -// Write out all other entities +// Write out all entities foreach ($entities as $entity) { fputs($fp, $entity); } @@ -94,7 +93,7 @@ exit; /** * Generate absolute path from a relative path, taking accout - * the current wokring directory. + * the current working directory. * * @param string $path Relative path * @return string Absolute path generated @@ -182,22 +181,7 @@ function file_entities($work_dir, $trans_dir, $orig_dir, &$entities) { if (isset($function_entities)) { $function_entities[] = "&$name;"; } - - // Special treatment for function reference entities if splitted version available - if (strstr($work_dir,"/functions")) { - $splitfile = str_replace(".xml", "/reference.xml", $file); - $splitpath = str_replace("/functions", "/reference", $trans_path) . "/" . $splitfile; - if (file_exists($splitpath)) { - $entities[] = entstr($name, $splitpath); - continue; - } - $splitpath = str_replace("/functions", "/reference", $trans_path) . "/" . $splitfile; - if (file_exists($splitpath)) { - $entities[] = entstr($name, $splitpath); - continue; - } - } - + // If we have a translated file, use it, otherwise fall back to English if (file_exists("$trans_path/$file")) { $path = "$trans_path/$file"; @@ -304,4 +288,3 @@ function entstr($entname, $filename) function strip_cygdrive($path){ return preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", $path); } -?>