Fixed gh-504 to allow custom code to be included on compilation

This commit is contained in:
2019-12-23 05:47:19 +02:00
parent 2ed53b2a3b
commit a317ba855f
4 changed files with 5 additions and 5 deletions

View File

@ -6387,7 +6387,7 @@ class Get
// update the name if it has dynamic values
$module->code_name = ComponentbuilderHelper::safeClassFunctionName($module->name);
// set official name
$module->official_name = ucwords($module->name);
$module->official_name = ComponentbuilderHelper::safeString($module->name, 'W');
// set langPrefix
$this->langPrefix = 'MOD_' . strtoupper($module->code_name);
// set lang prefix
@ -7975,7 +7975,7 @@ class Get
// get the GUI target details
$query = explode('.', trim($first_line, '.'));
// only continue if we have 3 values in the query
if (is_array($query) && count($query) == 3)
if (is_array($query) && count($query) >= 3)
{
// cleanup the newlines around the code
$code = trim(str_replace($first_line, '', $code), PHP_EOL) . PHP_EOL;