diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-24 13:14:24 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-24 13:14:24 +0000 |
commit | e85f9f79bc892533e8b67d80ae265167f2e5d4cd (patch) | |
tree | c6d6e55e75c2cf80cc380f5540a8e62b54e0c3c3 /phpBB/develop/lang_duplicates.php | |
parent | 8c9af252cba9c0d61351f7eb14e983b23b0c4256 (diff) | |
download | forums-e85f9f79bc892533e8b67d80ae265167f2e5d4cd.tar forums-e85f9f79bc892533e8b67d80ae265167f2e5d4cd.tar.gz forums-e85f9f79bc892533e8b67d80ae265167f2e5d4cd.tar.bz2 forums-e85f9f79bc892533e8b67d80ae265167f2e5d4cd.tar.xz forums-e85f9f79bc892533e8b67d80ae265167f2e5d4cd.zip |
remove no longer necessary files... hooray
git-svn-id: file:///svn/phpbb/trunk@9221 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/develop/lang_duplicates.php')
-rw-r--r-- | phpBB/develop/lang_duplicates.php | 140 |
1 files changed, 0 insertions, 140 deletions
diff --git a/phpBB/develop/lang_duplicates.php b/phpBB/develop/lang_duplicates.php deleted file mode 100644 index 09ac34e159..0000000000 --- a/phpBB/develop/lang_duplicates.php +++ /dev/null @@ -1,140 +0,0 @@ -<html> - <head> - <title>Duplicate Language Keys</title> - </head> - <body> -<?php -// -// Security message: -// -// This script is potentially dangerous. -// Remove or comment the next line (die(".... ) to enable this script. -// Do NOT FORGET to either remove this script or disable it after you have used it. -// -die("Please read the first lines of this script for instructions on how to enable it"); - -// ------------------------------------------------------------- -// -// $Id$ -// -// @copyright (c) 2005 phpBB Group -// @license http://opensource.org/licenses/gpl-license.php GNU Public License -// -// ------------------------------------------------------------- -// Thanks to arod-1 - -define('IN_PHPBB', 1); -define('PHPBB_ROOT_PATH', './../'); -define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1)); -include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT); - -$mode = request_var('mode', ''); - -$modules = find_modules(PHPBB_ROOT_PATH . 'language/en'); - -$kkeys = $keys = array(); -$langdir = dirname(__FILE__); - -if (isset($lang)) -{ - unset($lang); -} - -foreach($modules as $module) -{ - require_once("$langdir$module"); - if (isset($lang)) - { - $kkeys[$module] = $lang; - $keys[] = $module; - unset($lang); - } -} - -$equal = $case = $diff = 0; -$output = array(); - -while ($module = array_shift($keys)) -{ - $keys_1 = array_keys($kkeys[$module]); - - foreach ($keys as $other_module) - { - $keys_2 = array_keys($kkeys[$other_module]); - - foreach(array_intersect($keys_1, $keys_2) as $dup) - { - if ($kkeys[$module][$dup] == $kkeys[$other_module][$dup]) - { - $compare = "Equal"; - $equal++; - } - else if (strcasecmp($kkeys[$module][$dup], $kkeys[$other_module][$dup]) == 0) - { - $compare = "Differ in case"; - $case++; - } - else - { - $compare = "'{$kkeys[$module][$dup]}' - '{$kkeys[$other_module][$dup]}'"; - $diff++; - } - - $color = ''; - if ((basename($module) == "common." . PHP_EXT) || (basename($other_module) == "common." . PHP_EXT)) - { - $color = ' style="color:#B00000;"'; - } - - switch ($mode) - { - case 'module': - $output[$module][] = "<tr$color><td>" . ((isset($output[$module])) ? ' ' : "<b>$module</b>" ) . "</td><td>$dup</td><td>$other_module</td><td>$compare</td></tr>"; - break; - - default: - $output[$dup][] = "<tr$color><td><b>$dup</b></td><td>$module</td><td>$other_module</td><td>$compare</td></tr>"; - break; - } - } - } -}//var_dump($output); - -echo "<p><a href=\"lang_duplicates.php\">By Key</a> <a href=\"lang_duplicates.php?mode=module\">By Module</a></p><p>Equal: <b>$equal</b>, Differ in case only: $case, differ in content: $diff</p>"; -switch ($mode) -{ - case 'module': - echo "<table cellpadding=\"4\"><tr><th>Key</th><th>First File</th><th>Second File</th><th>Difference</th></tr>"; - foreach ($output as $module => $html) - { - echo implode('', $html); - } - break; - - default: - ksort($output); - echo "<table cellpadding=\"4\"><tr><th>File</th><th>Key</th><th>Conflicting File</th><th>Difference</th></tr>"; - foreach ($output as $dup) - { - echo implode('', $dup); - } - break; -} - -echo "</table>"; - - -function find_modules($dirname) -{ - $list = glob("$dirname/*.php"); - - foreach(glob("$dirname/*", GLOB_ONLYDIR) as $name) - { - $list = array_merge($list, find_modules($name)); - } - return $list; -} - -?> - </body> -</html>
\ No newline at end of file |