Added prog: "CanvasCellSim"
This commit is contained in:
@@ -223,7 +223,7 @@ class Programs implements IWebsiteModule
|
||||
|
||||
if (strpos($prog['internal_name'], ' ') !== FALSE) return ['result'=>'err', 'message' => 'Internal name contains spaces ' . $prog['name']];
|
||||
|
||||
foreach (explode('|', $prog['ui_language']) as $lang) if ($this->convertLanguageToFlag($lang) === null) return ['result'=>'err', 'message' => 'Unknown ui-lang ' . $prog['name']];
|
||||
foreach (explode_allow_empty('|', $prog['ui_language']) as $lang) if ($this->convertLanguageToFlag($lang) === null) return ['result'=>'err', 'message' => 'Unknown ui-lang ' . $prog['name']];
|
||||
|
||||
if (!in_array($prog['prog_language'], self::PROG_LANGS)) return ['result'=>'err', 'message' => 'Unknown prog-lang ' . $prog['name']];
|
||||
|
||||
|
||||
@@ -288,3 +288,7 @@ function array_last(array $arr)
|
||||
return $arr[count($arr)-1];
|
||||
}
|
||||
|
||||
function explode_allow_empty(string $separator, string $str): array {
|
||||
if ($str === '') return [];
|
||||
return explode($separator, $str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user