diff --git a/bin/build/check.php b/bin/build/check.php index b4d7c30057..7c9b9155dc 100755 --- a/bin/build/check.php +++ b/bin/build/check.php @@ -138,3 +138,17 @@ foreach(glob($moduleRoot . '*') as $modulePath) if(file_exists($enLangFile)) include $enLangFile; if(file_exists($configFile)) include $configFile; } + +echo '-------------demo data checking. -----------------' . "\n"; +$demoSQL = file("../../db/demo.sql"); +foreach($demoSQL as $line => $sql) +{ + if(strpos($sql, 'INSERT') === false) continue; + + if(strpos($sql, $config->db->prefix . 'config') !== false or + strpos($sql, $config->db->prefix . 'company') !== false or + strpos($sql, $config->db->prefix . 'group') !== false) + { + die('line ' . ($line + 1) . " has error\n"); + } +} diff --git a/bin/build/checkDemoData.php b/bin/build/checkDemoData.php deleted file mode 100755 index 3a1548d926..0000000000 --- a/bin/build/checkDemoData.php +++ /dev/null @@ -1,14 +0,0 @@ -db->prefix . 'config') === false and - strpos($sql, $config->db->prefix . 'company') === false and - strpos($sql, $config->db->prefix . 'group') === false - ) $output .= $sql; -} -file_put_contents("../../db/demo.sql", $output); -