diff options
author | Filip Komar <filip@mageia.org> | 2012-08-07 18:46:14 +0000 |
---|---|---|
committer | Filip Komar <filip@mageia.org> | 2012-08-07 18:46:14 +0000 |
commit | 6eab15ab683c977dc4cc3411270ec29bc6065ca0 (patch) | |
tree | c298ab650168b4739387cf8a832cb39ee679fe96 /langs/report.php | |
parent | 77b810851609d575e0f61c9b458851461e1cdfc2 (diff) | |
download | www-6eab15ab683c977dc4cc3411270ec29bc6065ca0.tar www-6eab15ab683c977dc4cc3411270ec29bc6065ca0.tar.gz www-6eab15ab683c977dc4cc3411270ec29bc6065ca0.tar.bz2 www-6eab15ab683c977dc4cc3411270ec29bc6065ca0.tar.xz www-6eab15ab683c977dc4cc3411270ec29bc6065ca0.zip |
simplify symlink test
Diffstat (limited to 'langs/report.php')
-rw-r--r-- | langs/report.php | 8 |
1 files 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 <a href="/%s/%s">old page</a> as a guide', $l, $old_link); + $old_link = sprintf('by recycling <a href="/%s/%s">old page</a>', $l, $old_link); } |