public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
cmsmadesimple-2-0 / admin / lang / findcruft.pl
100755 22 lines (18 sloc) 0.356 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
 
$count = 0;
 
open FILE,"< en_US/admin.inc.php";
while (<FILE>)
{
  if ($_ =~ m/^\$lang\[\'admin\'\]\[\'(.*?)\'\]/)
  {
    $keyname = $1;
    $result = system("grep -q '$1' ../*") && system("grep -qr '$1' ../../lib/*");
    if ($result != 0)
    {
      print $keyname . "\n";
      $count++;
    }
  }
}
close(FILE);
 
print "Found $count crufty entries\n";