From 6eab15ab683c977dc4cc3411270ec29bc6065ca0 Mon Sep 17 00:00:00 2001 From: Filip Komar Date: Tue, 7 Aug 2012 18:46:14 +0000 Subject: simplify symlink test --- langs/report.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/langs/report.php b/langs/report.php index c1c042095..3ec1b9e3f 100644 --- a/langs/report.php +++ b/langs/report.php @@ -125,15 +125,11 @@ $stats[$l]['strings'] += 0; $old_link = str_replace(array('en/', '.en.lang', 'index'), '', $f); - $lang_filename = './../' . $l . '/'; - $complete_filename = $lang_filename . $old_link . '/'; - $lang_file_path = realpath($lang_filename); - // if symlink e.g. does directly translated page exist? - if (realpath($complete_filename) != realpath($lang_file_path) . '/' . $old_link) { + if (is_link('./../' . $l . '/' . $old_link)) { $old_link = ''; } else { - $old_link = sprintf(', you can use old page as a guide', $l, $old_link); + $old_link = sprintf('by recycling old page', $l, $old_link); } -- cgit v1.2.1