From f3c2e82ad5a396cd4c2ef41e94f75839e7a1fa2b Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Thu, 27 Oct 2011 05:54:41 +0000 Subject: [PATCH] * adjust the check logic. --- bin/check.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/bin/check.php b/bin/check.php index 4faee3614e..c7bb6ca7f6 100755 --- a/bin/check.php +++ b/bin/check.php @@ -16,6 +16,10 @@ $whiteList[] = 'company-create'; $whiteList[] = 'company-delete'; $whiteList[] = 'file-buildform'; $whiteList[] = 'file-printfiles'; +$whiteList[] = 'file-export2csv'; +$whiteList[] = 'file-export2xml'; +$whiteList[] = 'file-export2html'; +$whiteList[] = 'file-senddownheader'; $whiteList[] = 'help-field'; $whiteList[] = 'index-testext'; $whiteList[] = 'productplan-commonaction'; @@ -26,13 +30,16 @@ $whiteList[] = 'task-commonaction'; $whiteList[] = 'user-login'; $whiteList[] = 'user-deny'; $whiteList[] = 'user-logout'; +$whiteList[] = 'mail-set'; +$whiteList[] = 'mail-save'; +$whiteList[] = 'svn-run'; /* checking actions of every module. */ echo '-------------action checking-----------------' . "\n"; foreach(glob($moduleRoot . '*') as $modulePath) { $moduleName = basename($modulePath); - if(strpos('install|upgrade|convert|common|misc', $moduleName) !== false) continue; + if(strpos('install|upgrade|convert|common|misc|editor', $moduleName) !== false) continue; $controlFile = $modulePath . '/control.php'; if(file_exists($controlFile)) { @@ -48,14 +55,13 @@ foreach(glob($moduleRoot . '*') as $modulePath) { $methodName = $method->name; if(in_array($moduleName . '-' . strtolower($method->name), $whiteList)) continue; - if(!isset($lang->resource->$moduleName->$methodName)) + + $exits = false; + foreach($lang->resource->$moduleName as $key => $label) { - $methodName = strtolower($methodName); - if(!isset($lang->resource->$moduleName->$methodName)) - { - echo $moduleName . "\t" . $methodName . " not in the list. \n"; - } + if(strtolower($methodName) == strtolower($key)) $exits = true; } + if(!$exits) echo $moduleName . "\t" . $methodName . " not in the list. \n"; } } }