mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
make this scan new splitted files
This commit is contained in:
@@ -133,19 +133,12 @@ function abs_path($path) {
|
|||||||
*/
|
*/
|
||||||
function file_entities($work_dir, $trans_dir, $orig_dir, &$entities) {
|
function file_entities($work_dir, $trans_dir, $orig_dir, &$entities) {
|
||||||
|
|
||||||
// Skip the function directory not under "reference". That
|
|
||||||
// folder is only kept for backward compatibility and only
|
|
||||||
// in the English version of the docs.
|
|
||||||
if (strpos($work_dir, "functions") && !preg_match("!reference/.*/functions!", $work_dir)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compute translated version's path
|
// Compute translated version's path
|
||||||
$trans_path = str_replace($orig_dir, $trans_dir, $work_dir);
|
$trans_path = str_replace($orig_dir, $trans_dir, $work_dir);
|
||||||
|
|
||||||
// Try to open English working directory
|
// Try to open English working directory
|
||||||
$dh = opendir($work_dir);
|
$dh = opendir($work_dir);
|
||||||
if (!$dh) { return FALSE; }
|
if (!$dh) { echo "lllll"; return FALSE; }
|
||||||
|
|
||||||
// If the working directory is a reference functions directory
|
// If the working directory is a reference functions directory
|
||||||
if (preg_match("!/reference/.*/functions$!", $work_dir)) {
|
if (preg_match("!/reference/.*/functions$!", $work_dir)) {
|
||||||
@@ -257,6 +250,7 @@ function file_entities($work_dir, $trans_dir, $orig_dir, &$entities) {
|
|||||||
$work_dir . "/" . preg_replace("!\\.xml$!", "", $file)
|
$work_dir . "/" . preg_replace("!\\.xml$!", "", $file)
|
||||||
);
|
);
|
||||||
$name = fname2entname($name);
|
$name = fname2entname($name);
|
||||||
|
echo $name;
|
||||||
|
|
||||||
// If the file found is not in the English dir, append to entities list
|
// If the file found is not in the English dir, append to entities list
|
||||||
if (!file_exists("$work_dir/$file")) {
|
if (!file_exists("$work_dir/$file")) {
|
||||||
|
Reference in New Issue
Block a user