Created
July 3, 2015 15:22
-
-
Save JimMackin/0dba3b993dc069228c38 to your computer and use it in GitHub Desktop.
Small PHP script to highlight fields in SuiteCRM with no name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$base = "/path/to/suitecrm"; | |
$searchBase = $base.DIRECTORY_SEPARATOR."cache".DIRECTORY_SEPARATOR."modules"; | |
$dirs = scandir($searchBase); | |
$GLOBALS["dictionary"] = array(); | |
foreach($dirs as $dir){ | |
$dir = $searchBase .DIRECTORY_SEPARATOR . $dir; | |
if($dir == '.' || $dir == '..' || !is_dir($dir)){ | |
continue; | |
} | |
$files = glob($dir.DIRECTORY_SEPARATOR.'*vardefs.php'); | |
foreach($files as $file){ | |
include $file; | |
} | |
} | |
foreach($GLOBALS["dictionary"] as $module => $arr){ | |
foreach($arr["fields"] as $key => $field){ | |
if(empty($key)){ | |
echo "Empty key for field in $module\n"; | |
} | |
if(empty($field['name'])){ | |
echo "Empty name for $key field in $module\n"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment