KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21571/task/21571/root/home/queenjbs/phpMyAdmin/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21571/task/21571/root/home/queenjbs/phpMyAdmin/scripts/find_unused_messages.sh
#!/bin/sh

export LANG=C
set -e

# Simple script to find unused message strings by Michal Čihař

tmp1=`mktemp`
tmp2=`mktemp`
grep -o '^\$\<str[A-Z][a-zA-Z0-9_]*\>' lang/english-utf-8.inc.php \
    | tr -d '$' \
    | grep -Ev '^str(Transformation_|ShowStatus)' | sort -u > $tmp1
grep -ho '\<str[A-Z][a-zA-Z0-9_]*\>' `find . -type f -a -name '*.php' -a -not -path '*/lang/*'` \
    | grep -Ev '^str(Transformation_|ShowStatus|Lang|Locale|SetupForm_|SetupFormset_)' | sort -u > $tmp2

echo Please note that you need to check results of this script, it doesn\'t
echo understand PHP, it only tries to find what looks like message name.

echo
echo Used messages not present in english language file:
echo '(this contains generated messages and composed message names, so these'
echo 'are not necessary a errors!)'
echo

# filter out known false positives
diff $tmp1 $tmp2 | awk '/^>/ {print $2}' | grep -Ev '(strEncto|strXkana|strDBLink|strPrivDesc|strPrivDescProcess|strTableListOptions|strMissingParameter|strAttribute|strDoSelectAll)'

echo
echo Not used messages present in english language file:
echo

diff $tmp1 $tmp2 | awk '/^</ {print $2}' | grep -Ev '(strSetup.*_(desc|name)|strSetupForm_|strSetupFormset_)'


rm -f $tmp1 $tmp2

Anon7 - 2021