Added the option to customize the import of data per view.

This commit is contained in:
2016-05-04 05:53:33 +01:00
parent 951e0c1f5d
commit 6b70aa45e6
374 changed files with 4370 additions and 2718 deletions

View File

@ -1086,6 +1086,20 @@ class Get
}
}
// set custom import scripts
if (isset($view->add_custom_import) && $view->add_custom_import == 1)
{
$addImportArray = array('php_import_setdata','php_import_save','html_import_view');
foreach ($addImportArray as $importScripter)
{
if (isset($view->$importScripter) && strlen($view->$importScripter) > 0)
{
$this->customScriptBuilder[$importScripter]['import_'.$name_list] = $this->setCustomContentLang(base64_decode($view->$importScripter));
unset($view->$importScripter);
}
}
}
// add_Ajax for this view
if ($view->add_php_ajax == 1)
{
@ -1985,9 +1999,11 @@ class Get
*/
public function setCustomContentLang($content)
{
// insure string is not broken
$content = str_replace('COM_###COMPONENT###',$this->langPrefix,$content);
// set language data
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, "JText::_('","')");
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, 'JText::_("','")');
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, "JText::_('","'");
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, 'JText::_("','"');
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, "JText::sprintf('","'");
$langCheck[] = ComponentbuilderHelper::getAllBetween($content, 'JText::sprintf("','"');
$langHolders = array();
@ -2003,6 +2019,7 @@ class Get
{
foreach ($lang as $string)
{
// this is there to insure we dont break already added Language strings
if (ComponentbuilderHelper::safeString($string,'U') == $string)
{
continue;