mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
cleaning
This commit is contained in:
@@ -25,7 +25,6 @@
|
|||||||
* Create smarty/docs/entities/file-entities.ent with respect
|
* Create smarty/docs/entities/file-entities.ent with respect
|
||||||
* to all the specialities needed:
|
* to all the specialities needed:
|
||||||
*
|
*
|
||||||
* . CHM only appendix integration
|
|
||||||
* . Translated language files with English ones as fallbacks
|
* . Translated language files with English ones as fallbacks
|
||||||
*
|
*
|
||||||
* Also take in account, that if XSLT style sheets are used,
|
* Also take in account, that if XSLT style sheets are used,
|
||||||
@@ -81,7 +80,7 @@ echo "\ncreating entities/file-entities.ent...\n";
|
|||||||
fputs($fp, "<!-- DON'T TOUCH - AUTOGENERATED BY file-entities.php -->\n\n");
|
fputs($fp, "<!-- DON'T TOUCH - AUTOGENERATED BY file-entities.php -->\n\n");
|
||||||
|
|
||||||
|
|
||||||
// Write out all other entities
|
// Write out all entities
|
||||||
foreach ($entities as $entity) {
|
foreach ($entities as $entity) {
|
||||||
fputs($fp, $entity);
|
fputs($fp, $entity);
|
||||||
}
|
}
|
||||||
@@ -94,7 +93,7 @@ exit;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate absolute path from a relative path, taking accout
|
* Generate absolute path from a relative path, taking accout
|
||||||
* the current wokring directory.
|
* the current working directory.
|
||||||
*
|
*
|
||||||
* @param string $path Relative path
|
* @param string $path Relative path
|
||||||
* @return string Absolute path generated
|
* @return string Absolute path generated
|
||||||
@@ -182,22 +181,7 @@ function file_entities($work_dir, $trans_dir, $orig_dir, &$entities) {
|
|||||||
if (isset($function_entities)) {
|
if (isset($function_entities)) {
|
||||||
$function_entities[] = "&$name;";
|
$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 we have a translated file, use it, otherwise fall back to English
|
||||||
if (file_exists("$trans_path/$file")) {
|
if (file_exists("$trans_path/$file")) {
|
||||||
$path = "$trans_path/$file";
|
$path = "$trans_path/$file";
|
||||||
@@ -304,4 +288,3 @@ function entstr($entname, $filename)
|
|||||||
function strip_cygdrive($path){
|
function strip_cygdrive($path){
|
||||||
return preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", $path);
|
return preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", $path);
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
Reference in New Issue
Block a user