Further improved #37 to ensure language strings are set and reversed, also add extra buttons to the compiler page. Major restructure of custom code implementation to make it more stable. Resolved #40 by updating the default field sql values.

This commit is contained in:
2017-02-14 01:24:38 +02:00
parent de008d5907
commit 290a51dd5a
247 changed files with 2394 additions and 1513 deletions

View File

@ -34,6 +34,7 @@ class Infusion extends Interpretation
public $eximportView = array();
public $importCustomScripts = array();
public $langFiles = array();
public $removeSiteFolder = false;
/**
@ -1019,18 +1020,6 @@ class Infusion extends Interpretation
// clear all site folder since none is needed
$this->removeSiteFolder = true;
}
// ###LANG_ADMIN###
$this->fileContentStatic['###LANG_ADMIN###'] = $this->setLangAdmin();
// ###LANG_ADMIN_SYS###
$this->fileContentStatic['###LANG_ADMIN_SYS###'] = $this->setLangAdminSys();
// ###LANG_SITE###
$this->fileContentStatic['###LANG_SITE###'] = $this->setLangSite();
// ###LANG_SITE_SYS###
$this->fileContentStatic['###LANG_SITE_SYS###'] = $this->setLangSiteSys();
// ###PREINSTALLSCRIPT###
$this->fileContentStatic['###PREINSTALLSCRIPT###'] = $this->getCustomScriptBuilder('php_preflight', 'install', PHP_EOL, null, true);
@ -1072,5 +1061,41 @@ class Infusion extends Interpretation
}
return false;
}
/**
* Build the lang values and insert to fiel
*
*
* @return boolean on success
*
*/
public function setLangFileData()
{
// First we build the strings
$lang = array();
// ###LANG_ADMIN###
$lang['###LANG_ADMIN###'] = $this->setLangAdmin();
// ###LANG_ADMIN_SYS###
$lang['###LANG_ADMIN_SYS###'] = $this->setLangAdminSys();
// ###LANG_SITE###
$lang['###LANG_SITE###'] = $this->setLangSite();
// ###LANG_SITE_SYS###
$lang['###LANG_SITE_SYS###'] = $this->setLangSiteSys();
// now we insert the values into the files
if (ComponentbuilderHelper::checkArray($this->langFiles))
{
foreach ($this->langFiles as $file)
{
$string = JFile::read($file['path']);
// load the data
$answer = $this->setPlaceholders($string, $lang, 3);
// add to zip array
$this->writeFile($file['path'],$answer);
// set the line counter
$this->lineCount = $this->lineCount + substr_count($answer, PHP_EOL);
}
}
}
}