소스 검색

Internal: improved (a little) the API to detect datamodel inconsistencies

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2392 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 년 전
부모
커밋
0ff1aaf68c
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      core/metamodel.class.php

+ 3 - 3
core/metamodel.class.php

@@ -3161,7 +3161,7 @@ abstract class MetaModel
 		throw new CoreException('Failed to create an alias', array('aliases' => $aAliases, 'new'=>$sNewName));
 	}
 
-	public static function CheckDefinitions()
+	public static function CheckDefinitions($bExitOnError = true)
 	{
 		if (count(self::GetClasses()) == 0)
 		{
@@ -3411,9 +3411,9 @@ abstract class MetaModel
 				}
 				echo "</ul>\n";
 			}
-			echo "<p>Aborting...</p>\n";
+			if ($bExitOnError) echo "<p>Aborting...</p>\n";
 			echo "</div>\n";
-			exit;
+			if ($bExitOnError) exit;
 		}
 	}