Did some formating to the code of the compiler

This commit is contained in:
Llewellyn van der Merwe 2018-03-18 06:52:07 +02:00
parent 42ae72d97e
commit de2d957141
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
6 changed files with 249 additions and 258 deletions

View File

@ -701,4 +701,5 @@ class Compiler extends Infusion
// any help to improve this is welcome... // any help to improve this is welcome...
} }
} }

View File

@ -11,7 +11,7 @@
|_| |_|
/-------------------------------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------------------------------/
@version 2.6.0 @version 2.6.x
@created 30th April, 2015 @created 30th April, 2015
@package Component Builder @package Component Builder
@subpackage compiler.php @subpackage compiler.php
@ -247,10 +247,10 @@ class Get
* @var array * @var array
*/ */
public $langStringTargets = array( public $langStringTargets = array(
'Joomla'.'.JText._(', 'Joomla' . '.JText._(',
'JText:'.':script(', 'JText:' . ':script(',
'JText:'.':_(', 'JText:' . ':_(',
'JText:'.':sprintf(' 'JText:' . ':sprintf('
); );
/** /**
@ -506,7 +506,7 @@ class Get
* *
* @var array * @var array
*/ */
public $cryptionTypes = array('basic','medium','whmcs'); public $cryptionTypes = array('basic', 'medium', 'whmcs');
/** /**
* The WHMCS Encryption Switch * The WHMCS Encryption Switch
@ -832,22 +832,22 @@ class Get
foreach ($addArrayF as $addTarget => $targetHere) foreach ($addArrayF as $addTarget => $targetHere)
{ {
// set the add target data // set the add target data
$component->{'add'.$addTarget} = (isset($component->{'add'.$addTarget}) && ComponentbuilderHelper::checkJson($component->{'add'.$addTarget})) ? json_decode($component->{'add'.$addTarget}, true) : null; $component->{'add' . $addTarget} = (isset($component->{'add' . $addTarget}) && ComponentbuilderHelper::checkJson($component->{'add' . $addTarget})) ? json_decode($component->{'add' . $addTarget}, true) : null;
if (ComponentbuilderHelper::checkArray($component->{'add'.$addTarget})) if (ComponentbuilderHelper::checkArray($component->{'add' . $addTarget}))
{ {
if (isset($component->{$targetHere}) && ComponentbuilderHelper::checkArray($component->{$targetHere})) if (isset($component->{$targetHere}) && ComponentbuilderHelper::checkArray($component->{$targetHere}))
{ {
foreach($component->{'add'.$addTarget} as $taget) foreach ($component->{'add' . $addTarget} as $taget)
{ {
$component->{$targetHere}[] = $taget; $component->{$targetHere}[] = $taget;
} }
} }
else else
{ {
$component->{$targetHere} = array_values($component->{'add'.$addTarget}); $component->{$targetHere} = array_values($component->{'add' . $addTarget});
} }
} }
unset($component->{'add'.$addTarget}); unset($component->{'add' . $addTarget});
} }
// set the uikit switch // set the uikit switch
@ -998,7 +998,7 @@ class Get
// set hash // set hash
static $hash = 1; static $hash = 1;
// load hash // load hash
$field['hash'] = md5($field['field'].$hash); $field['hash'] = md5($field['field'] . $hash);
// increment hash // increment hash
$hash++; $hash++;
$field['alias'] = 0; $field['alias'] = 0;
@ -1086,15 +1086,15 @@ class Get
foreach ($addGlobalCss as $area) foreach ($addGlobalCss as $area)
{ {
// add_css if found // add_css if found
if (isset($component->{'add_css_'.$area}) && $component->{'add_css_'.$area} == 1 && isset($component->{'css_'.$area}) && ComponentbuilderHelper::checkString($component->{'css_'.$area})) if (isset($component->{'add_css_' . $area}) && $component->{'add_css_' . $area} == 1 && isset($component->{'css_' . $area}) && ComponentbuilderHelper::checkString($component->{'css_' . $area}))
{ {
$this->customScriptBuilder['component_css_'.$area] = base64_decode($component->{'css_'.$area}); $this->customScriptBuilder['component_css_' . $area] = base64_decode($component->{'css_' . $area});
} }
else else
{ {
$this->customScriptBuilder['component_css_'.$area] = ''; $this->customScriptBuilder['component_css_' . $area] = '';
} }
unset($component->{'css_'.$area}); unset($component->{'css_' . $area});
} }
// set the lang target // set the lang target
$this->lang = 'admin'; $this->lang = 'admin';
@ -1195,7 +1195,7 @@ class Get
{ {
$component->readme = ''; $component->readme = '';
} }
// set lang now // set lang now
$nowLang = $this->lang; $nowLang = $this->lang;
$this->lang = 'admin'; $this->lang = 'admin';
@ -1227,13 +1227,13 @@ class Get
$this->lang = $nowLang; $this->lang = $nowLang;
// add the update/sales server FTP details if that is the expected protocol // add the update/sales server FTP details if that is the expected protocol
$serverArray = array('update_server','sales_server'); $serverArray = array('update_server', 'sales_server');
foreach($serverArray as $server) foreach ($serverArray as $server)
{ {
if ($component->{'add_'.$server} == 1 && is_numeric($component->{$server}) && $component->{$server} > 0) if ($component->{'add_' . $server} == 1 && is_numeric($component->{$server}) && $component->{$server} > 0)
{ {
// get the server protocol // get the server protocol
$component->{$server.'_protocol'} = ComponentbuilderHelper::getVar('server', (int) $component->{$server}, 'id', 'protocol'); $component->{$server . '_protocol'} = ComponentbuilderHelper::getVar('server', (int) $component->{$server}, 'id', 'protocol');
} }
else else
{ {
@ -1241,9 +1241,9 @@ class Get
// only change this for sales server (update server can be added loacaly to the zip file) // only change this for sales server (update server can be added loacaly to the zip file)
if ('sales_server' === $server) if ('sales_server' === $server)
{ {
$component->{'add_'.$server} = 0; $component->{'add_' . $server} = 0;
} }
$component->{$server.'_protocol'} = 0; $component->{$server . '_protocol'} = 0;
} }
} }
// set the ignore folders for repo if found // set the ignore folders for repo if found
@ -1422,7 +1422,7 @@ class Get
// set hash // set hash
static $hash = 1; static $hash = 1;
// load hash // load hash
$field['hash'] = md5($field['field'].$hash); $field['hash'] = md5($field['field'] . $hash);
// increment hash // increment hash
$hash++; $hash++;
// set the settings // set the settings
@ -1468,12 +1468,12 @@ class Get
// check if the datatype changed // check if the datatype changed
if (isset($field['settings']->history->datatype)) if (isset($field['settings']->history->datatype))
{ {
$this->setUpdateSQL($field['settings']->history->datatype, $field['settings']->datatype, 'field.datatype', $name_single.'.'.$field_name); $this->setUpdateSQL($field['settings']->history->datatype, $field['settings']->datatype, 'field.datatype', $name_single . '.' . $field_name);
} }
// check if the datatype lenght changed // check if the datatype lenght changed
if (isset($field['settings']->history->datalenght) && isset($field['settings']->history->datalenght_other)) if (isset($field['settings']->history->datalenght) && isset($field['settings']->history->datalenght_other))
{ {
$this->setUpdateSQL($field['settings']->history->datalenght.$field['settings']->history->datalenght_other, $field['settings']->datalenght.$field['settings']->datalenght_other, 'field.lenght', $name_single.'.'.$field_name); $this->setUpdateSQL($field['settings']->history->datalenght . $field['settings']->history->datalenght_other, $field['settings']->datalenght . $field['settings']->datalenght_other, 'field.lenght', $name_single . '.' . $field_name);
} }
// check if the name changed // check if the name changed
if (isset($field['settings']->history->xml) && ComponentbuilderHelper::checkJson($field['settings']->history->xml)) if (isset($field['settings']->history->xml) && ComponentbuilderHelper::checkJson($field['settings']->history->xml))
@ -1499,7 +1499,7 @@ class Get
if (!isset($this->uniqueNames[$name_list]['names'][$field_name])) if (!isset($this->uniqueNames[$name_list]['names'][$field_name]))
{ {
// this only works when the field is not multiple of the same field // this only works when the field is not multiple of the same field
$this->setUpdateSQL($old_field_name, $field_name, 'field.name', $name_single.'.'.$field_name); $this->setUpdateSQL($old_field_name, $field_name, 'field.name', $name_single . '.' . $field_name);
} }
elseif ($old_field_name !== $field_name) elseif ($old_field_name !== $field_name)
{ {
@ -2293,7 +2293,7 @@ class Get
} }
} }
// fall back to text // fall back to text
return 'text'; return 'text';
} }
/** /**
@ -2308,9 +2308,9 @@ class Get
public function getFieldName(&$field, $listViewName = null) public function getFieldName(&$field, $listViewName = null)
{ {
// return the unique name if already set // return the unique name if already set
if (ComponentbuilderHelper::checkString($listViewName) && isset($field['hash']) && isset($this->uniqueFieldNames[$listViewName.$field['hash']])) if (ComponentbuilderHelper::checkString($listViewName) && isset($field['hash']) && isset($this->uniqueFieldNames[$listViewName . $field['hash']]))
{ {
return $this->uniqueFieldNames[$listViewName.$field['hash']]; return $this->uniqueFieldNames[$listViewName . $field['hash']];
} }
// set the type name // set the type name
$type_name = ComponentbuilderHelper::safeString($field['settings']->type_name); $type_name = ComponentbuilderHelper::safeString($field['settings']->type_name);
@ -2380,14 +2380,14 @@ class Get
} }
} }
// return the value unique // return the value unique
if (ComponentbuilderHelper::checkString($listViewName) && isset($field['hash']) ) if (ComponentbuilderHelper::checkString($listViewName) && isset($field['hash']))
{ {
$this->uniqueFieldNames[$listViewName.$field['hash']] = $this->uniqueName($name, $listViewName); $this->uniqueFieldNames[$listViewName . $field['hash']] = $this->uniqueName($name, $listViewName);
// now return the unique name // now return the unique name
return $this->uniqueFieldNames[$listViewName.$field['hash']]; return $this->uniqueFieldNames[$listViewName . $field['hash']];
} }
// fall back to global // fall back to global
return $name; return $name;
} }
/** /**
@ -2490,8 +2490,7 @@ class Get
foreach ($phpSripts as $script) foreach ($phpSripts as $script)
{ {
// add php script to the script builder // add php script to the script builder
if (isset($result->{'add_'.$script}) && $result->{'add_'.$script} == 1 if (isset($result->{'add_' . $script}) && $result->{'add_' . $script} == 1 && isset($result->{$script}) && ComponentbuilderHelper::checkString($result->{$script}))
&& isset($result->{$script}) && ComponentbuilderHelper::checkString($result->{$script}))
{ {
// move all main gets out to the customscript builder // move all main gets out to the customscript builder
if ($result->gettype <= 2) if ($result->gettype <= 2)
@ -2503,7 +2502,7 @@ class Get
$this->customScriptBuilder[$this->target . '_' . $script][$view_code] .= $this->setDynamicValues(PHP_EOL . PHP_EOL . base64_decode($result->{$script})); $this->customScriptBuilder[$this->target . '_' . $script][$view_code] .= $this->setDynamicValues(PHP_EOL . PHP_EOL . base64_decode($result->{$script}));
// remove from local item // remove from local item
unset($result->{$script}); unset($result->{$script});
unset($result->{'add_'.$script}); unset($result->{'add_' . $script});
} }
else else
{ {
@ -2515,7 +2514,7 @@ class Get
{ {
// remove from local item // remove from local item
unset($result->{$script}); unset($result->{$script});
unset($result->{'add_'.$script}); unset($result->{'add_' . $script});
} }
} }
// set the getmethod code name // set the getmethod code name
@ -3420,22 +3419,22 @@ class Get
foreach ($addArray as $addTarget => $targetHere) foreach ($addArray as $addTarget => $targetHere)
{ {
// set the add target data // set the add target data
$library->{'add'.$addTarget} = (isset($library->{'add'.$addTarget}) && ComponentbuilderHelper::checkJson($library->{'add'.$addTarget})) ? json_decode($library->{'add'.$addTarget}, true) : null; $library->{'add' . $addTarget} = (isset($library->{'add' . $addTarget}) && ComponentbuilderHelper::checkJson($library->{'add' . $addTarget})) ? json_decode($library->{'add' . $addTarget}, true) : null;
if (ComponentbuilderHelper::checkArray($library->{'add'.$addTarget})) if (ComponentbuilderHelper::checkArray($library->{'add' . $addTarget}))
{ {
if (isset($library->{$targetHere}) && ComponentbuilderHelper::checkArray($library->{$targetHere})) if (isset($library->{$targetHere}) && ComponentbuilderHelper::checkArray($library->{$targetHere}))
{ {
foreach($library->{'add'.$addTarget} as $taget) foreach ($library->{'add' . $addTarget} as $taget)
{ {
$library->{$targetHere}[] = $taget; $library->{$targetHere}[] = $taget;
} }
} }
else else
{ {
$library->{$targetHere} = array_values($library->{'add'.$addTarget}); $library->{$targetHere} = array_values($library->{'add' . $addTarget});
} }
} }
unset($library->{'add'.$addTarget}); unset($library->{'add' . $addTarget});
} }
// add config fields only if needed // add config fields only if needed
if ($library->how > 1) if ($library->how > 1)
@ -3517,10 +3516,10 @@ class Get
// insure string is not broken // insure string is not broken
$content = str_replace('COM_###COMPONENT###', $this->langPrefix, $content); $content = str_replace('COM_###COMPONENT###', $this->langPrefix, $content);
// first get the Joomla.JText._() // first get the Joomla.JText._()
if (in_array('Joomla'.'.JText._(', $langStringTargets)) if (in_array('Joomla' . '.JText._(', $langStringTargets))
{ {
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, "Joomla".".JText._('", "'"); $jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, "Joomla" . ".JText._('", "'");
$jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'Joomla.'.'JText._("', '"'); $jsTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'Joomla.' . 'JText._("', '"');
// combine into one array // combine into one array
$jsTEXT = ComponentbuilderHelper::mergeArrays($jsTEXT); $jsTEXT = ComponentbuilderHelper::mergeArrays($jsTEXT);
// we need to add a check to insure these JavaScript lang matchup // we need to add a check to insure these JavaScript lang matchup
@ -3532,10 +3531,10 @@ class Get
} }
} }
// now get the JText: :script() // now get the JText: :script()
if (in_array('JText:'.':script(', $langStringTargets)) if (in_array('JText:' . ':script(', $langStringTargets))
{ {
$scTEXT[] = ComponentbuilderHelper::getAllBetween($content, "JText:".":script('", "'"); $scTEXT[] = ComponentbuilderHelper::getAllBetween($content, "JText:" . ":script('", "'");
$scTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'JText:'.':script("', '"'); $scTEXT[] = ComponentbuilderHelper::getAllBetween($content, 'JText:' . ':script("', '"');
// combine into one array // combine into one array
$scTEXT = ComponentbuilderHelper::mergeArrays($scTEXT); $scTEXT = ComponentbuilderHelper::mergeArrays($scTEXT);
// we need to add a check to insure these JavaScript lang matchup // we need to add a check to insure these JavaScript lang matchup
@ -3550,7 +3549,7 @@ class Get
foreach ($langStringTargets as $langStringTarget) foreach ($langStringTargets as $langStringTarget)
{ {
// need some special treatment here // need some special treatment here
if ($langStringTarget === 'Joomla'.'.JText._(' || $langStringTarget === 'JText:'.':script(') if ($langStringTarget === 'Joomla' . '.JText._(' || $langStringTarget === 'JText:' . ':script(')
{ {
continue; continue;
} }
@ -4008,7 +4007,7 @@ class Get
} }
return $string; return $string;
} }
/** /**
* Set the external code string & load it in to string * Set the external code string & load it in to string
* *
@ -4020,11 +4019,11 @@ class Get
public function setExternalCodeString($string) public function setExternalCodeString($string)
{ {
// check if content has custom code place holder // check if content has custom code place holder
if (strpos($string, '[EXTERNA'.'LCODE=') !== false) if (strpos($string, '[EXTERNA' . 'LCODE=') !== false)
{ {
// target content // target content
$bucket = array(); $bucket = array();
$found = ComponentbuilderHelper::getAllBetween($string, '[EXTERNA'.'LCODE=', ']'); $found = ComponentbuilderHelper::getAllBetween($string, '[EXTERNA' . 'LCODE=', ']');
if (ComponentbuilderHelper::checkArray($found)) if (ComponentbuilderHelper::checkArray($found))
{ {
// build local bucket // build local bucket
@ -4034,8 +4033,7 @@ class Get
if ($this->user->authorise('core.admin', 'com_componentbuilder')) if ($this->user->authorise('core.admin', 'com_componentbuilder'))
{ {
// check if the target is valid URL or path // check if the target is valid URL or path
if ((!filter_var($target, FILTER_VALIDATE_URL) === false && ComponentbuilderHelper::urlExists($target)) if ((!filter_var($target, FILTER_VALIDATE_URL) === false && ComponentbuilderHelper::urlExists($target)) || (JPath::clean($target) === $target && JFile::exists($target)))
|| (JPath::clean($target) === $target && JFile::exists($target)))
{ {
$this->getExternalCodeString($target, $bucket); $this->getExternalCodeString($target, $bucket);
} }
@ -4043,7 +4041,7 @@ class Get
else else
{ {
// set key // set key
$key = '[EXTERNA'.'LCODE='.$target.']'; $key = '[EXTERNA' . 'LCODE=' . $target . ']';
// set the notice // set the notice
$this->app->enqueueMessage(JText::_('<hr /><h3>External Code Warning</h3>'), 'Warning'); $this->app->enqueueMessage(JText::_('<hr /><h3>External Code Warning</h3>'), 'Warning');
$this->app->enqueueMessage(JText::sprintf('The <b>%s</b> is not a valid url/path!', $key), 'Warning'); $this->app->enqueueMessage(JText::sprintf('The <b>%s</b> is not a valid url/path!', $key), 'Warning');
@ -4055,7 +4053,7 @@ class Get
else else
{ {
// set key // set key
$key = '[EXTERNA'.'LCODE='.$target.']'; $key = '[EXTERNA' . 'LCODE=' . $target . ']';
// set the notice // set the notice
$this->app->enqueueMessage(JText::sprintf('%s, you do not have permission to use <b>EXTERNALCODE</b> feature (so it was removed from the compilation), please contact you system administrator for more info!<br /><small>(admin access required)</small>', $this->user->get('name')), 'Error'); $this->app->enqueueMessage(JText::sprintf('%s, you do not have permission to use <b>EXTERNALCODE</b> feature (so it was removed from the compilation), please contact you system administrator for more info!<br /><small>(admin access required)</small>', $this->user->get('name')), 'Error');
// remove the placeholder // remove the placeholder
@ -4071,7 +4069,7 @@ class Get
} }
return $string; return $string;
} }
/** /**
* Get the External Code/String * Get the External Code/String
* *
@ -4084,7 +4082,7 @@ class Get
protected function getExternalCodeString($target, &$bucket) protected function getExternalCodeString($target, &$bucket)
{ {
// set key // set key
$key = '[EXTERNA'.'LCODE=' . $target . ']'; $key = '[EXTERNA' . 'LCODE=' . $target . ']';
// set URL key // set URL key
$targetKey = trim($target); $targetKey = trim($target);
// check if we already fetched this // check if we already fetched this
@ -4142,7 +4140,7 @@ class Get
$bucket[$key] = $this->externalCodeString[$targetKey]; $bucket[$key] = $this->externalCodeString[$targetKey];
} }
} }
/** /**
* We start set the custom code data & can load it in to string * We start set the custom code data & can load it in to string
* *
@ -4501,12 +4499,12 @@ class Get
// add the new lang placeholder to the db // add the new lang placeholder to the db
$this->newLangStrings[$counterInsert] = array(); $this->newLangStrings[$counterInsert] = array();
$this->newLangStrings[$counterInsert][] = $this->db->quote(json_encode(array($this->componentID))); // 'components' $this->newLangStrings[$counterInsert][] = $this->db->quote(json_encode(array($this->componentID))); // 'components'
$this->newLangStrings[$counterInsert][] = $this->db->quote($string); // 'entranslation' $this->newLangStrings[$counterInsert][] = $this->db->quote($string); // 'entranslation'
$this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'published' $this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'published'
$this->newLangStrings[$counterInsert][] = $this->db->quote($today); // 'created' $this->newLangStrings[$counterInsert][] = $this->db->quote($today); // 'created'
$this->newLangStrings[$counterInsert][] = $this->db->quote((int) $this->user->id); // 'created_by' $this->newLangStrings[$counterInsert][] = $this->db->quote((int) $this->user->id); // 'created_by'
$this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'version' $this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'version'
$this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'access' $this->newLangStrings[$counterInsert][] = $this->db->quote(1); // 'access'
$counterInsert++; $counterInsert++;
@ -5040,7 +5038,7 @@ class Get
if ($_type == 2) if ($_type == 2)
{ {
// load the last value // load the last value
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(0); // 'hashendtarget' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(0); // 'hashendtarget'
} }
} }
// the record already exist so we must update instead // the record already exist so we must update instead
@ -5155,14 +5153,14 @@ class Get
$this->newCustomCode[$pointer[$targetKey]] = array(); $this->newCustomCode[$pointer[$targetKey]] = array();
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote($path); // 'path' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote($path); // 'path'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote((int) $_type); // 'type' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote((int) $_type); // 'type'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(1); // 'target' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(1); // 'target'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote($commentType); // 'comment_type' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote($commentType); // 'comment_type'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote((int) $this->componentID); // 'component' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote((int) $this->componentID); // 'component'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(1); // 'published' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(1); // 'published'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote($today); // 'created' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote($today); // 'created'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote((int) $this->user->id); // 'created_by' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote((int) $this->user->id); // 'created_by'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(1); // 'version' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(1); // 'version'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(1); // 'access' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote(1); // 'access'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote($hashtarget); // 'hashtarget' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote($hashtarget); // 'hashtarget'
$this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote((int) $lineNumber); // 'fromline' $this->newCustomCode[$pointer[$targetKey]][] = $this->db->quote((int) $lineNumber); // 'fromline'
} }

View File

@ -542,12 +542,10 @@ class Structure extends Get
private function setDynamicDashboard() private function setDynamicDashboard()
{ {
// only add the dynamic dashboard if all checks out // only add the dynamic dashboard if all checks out
if (isset($this->componentData->dashboard_type) && 2 == $this->componentData->dashboard_type if (isset($this->componentData->dashboard_type) && 2 == $this->componentData->dashboard_type && isset($this->componentData->dashboard) && ComponentbuilderHelper::checkString($this->componentData->dashboard) && strpos($this->componentData->dashboard, '_') !== false)
&& isset($this->componentData->dashboard) && ComponentbuilderHelper::checkString($this->componentData->dashboard)
&& strpos($this->componentData->dashboard, '_') !== false)
{ {
// set the default view // set the default view
$getter = explode('_',$this->componentData->dashboard); $getter = explode('_', $this->componentData->dashboard);
if (count($getter) == 2 && is_numeric($getter[1])) if (count($getter) == 2 && is_numeric($getter[1]))
{ {
// the pointers // the pointers
@ -567,13 +565,14 @@ class Structure extends Get
if (isset($this->componentData->{$targets[$t]}) && ComponentbuilderHelper::checkArray($this->componentData->{$targets[$t]})) if (isset($this->componentData->{$targets[$t]}) && ComponentbuilderHelper::checkArray($this->componentData->{$targets[$t]}))
{ {
// search the target views // search the target views
$dashboard = (array) array_filter($this->componentData->{$targets[$t]}, function($view) use($id, $t, $types){ $dashboard = (array) array_filter($this->componentData->{$targets[$t]}, function($view) use($id, $t, $types)
if (isset($view[$types[$t]]) && $id == $view[$types[$t]])
{ {
return true; if (isset($view[$types[$t]]) && $id == $view[$types[$t]])
} {
return false; return true;
}); }
return false;
});
// check if view was found (this should be true) // check if view was found (this should be true)
if (count($dashboard) && isset($dashboard[0]['settings']) && isset($dashboard[0]['settings']->{$keys[$t]})) if (count($dashboard) && isset($dashboard[0]['settings']) && isset($dashboard[0]['settings']->{$keys[$t]}))
{ {
@ -600,7 +599,7 @@ class Structure extends Get
else else
{ {
// the target value is wrong // the target value is wrong
$this->app->enqueueMessage(JText::sprintf('The <b>%s</b> value for the dynamic dashboard is invalid.', $this->componentData->dashboard), 'Error'); $this->app->enqueueMessage(JText::sprintf('The <b>%s</b> value for the dynamic dashboard is invalid.', $this->componentData->dashboard), 'Error');
} }
// if default was changed to dynamic dashboard the remove default tab and methods // if default was changed to dynamic dashboard the remove default tab and methods
if (ComponentbuilderHelper::checkString($this->dynamicDashboard)) if (ComponentbuilderHelper::checkString($this->dynamicDashboard))
@ -778,7 +777,7 @@ class Structure extends Get
$README = true; $README = true;
} }
// set the standard folders // set the standard folders
$stdFolders = array('site','admin','media'); $stdFolders = array('site', 'admin', 'media');
// start moving // start moving
foreach ($this->joomlaVersionData->move->static as $ftem => $details) foreach ($this->joomlaVersionData->move->static as $ftem => $details)
{ {
@ -814,11 +813,11 @@ class Structure extends Get
$zipPath = str_replace('c0mp0n3nt/', '', $details->path); $zipPath = str_replace('c0mp0n3nt/', '', $details->path);
$path = str_replace('c0mp0n3nt/', $this->componentPath . '/', $details->path); $path = str_replace('c0mp0n3nt/', $this->componentPath . '/', $details->path);
// set the template folder path // set the template folder path
$templatePath = (isset($details->custom) && $details->custom) ? (($details->custom !== 'full') ? $this->templatePathCustom.'/':'') : $this->templatePath.'/'; $templatePath = (isset($details->custom) && $details->custom) ? (($details->custom !== 'full') ? $this->templatePathCustom . '/' : '') : $this->templatePath . '/';
// set the final paths // set the final paths
$currentFullPath = str_replace('//', '/', $templatePath.'/'.$item); $currentFullPath = str_replace('//', '/', $templatePath . '/' . $item);
$packageFullPath = str_replace('//', '/', $path.'/'.$new); $packageFullPath = str_replace('//', '/', $path . '/' . $new);
$zipFullPath = str_replace('//', '/', $zipPath.'/'.$new); $zipFullPath = str_replace('//', '/', $zipPath . '/' . $new);
// now move the file // now move the file
if ($details->type === 'file') if ($details->type === 'file')
{ {
@ -856,7 +855,7 @@ class Structure extends Get
// check if we should add the dynamic folder moving script to the installer script // check if we should add the dynamic folder moving script to the installer script
if (!$this->setMoveFolders) if (!$this->setMoveFolders)
{ {
$checker = explode('/',$zipFullPath); $checker = explode('/', $zipFullPath);
// TODO <-- this may not be the best way, will keep an eye on this. // TODO <-- this may not be the best way, will keep an eye on this.
// We basicly only want to check if a folder is added that is not in the stdFolders array // We basicly only want to check if a folder is added that is not in the stdFolders array
if (isset($checker[0]) && ComponentbuilderHelper::checkString($checker[0]) && !in_array($checker[0], $stdFolders)) if (isset($checker[0]) && ComponentbuilderHelper::checkString($checker[0]) && !in_array($checker[0], $stdFolders))
@ -1243,9 +1242,9 @@ class Structure extends Get
$custom['path'] = trim($custom['path'], '/'); $custom['path'] = trim($custom['path'], '/');
} }
// set full path if this is a full path folder // set full path if this is a full path folder
if(!isset($custom['folder']) && isset($custom['folderpath'])) if (!isset($custom['folder']) && isset($custom['folderpath']))
{ {
$custom['folder'] = '/'.trim($custom['folderpath'], '/'); $custom['folder'] = '/' . trim($custom['folderpath'], '/');
// update the dynamic path // update the dynamic path
$custom['folder'] = $this->updateDynamicPath($custom['folder']); $custom['folder'] = $this->updateDynamicPath($custom['folder']);
// remove the file path // remove the file path
@ -1354,9 +1353,9 @@ class Structure extends Get
{ {
$customPath = 'custom'; $customPath = 'custom';
// set full path if this is a full path file // set full path if this is a full path file
if(!isset($custom['file']) && isset($custom['filepath'])) if (!isset($custom['file']) && isset($custom['filepath']))
{ {
$custom['file'] = '/'.trim($custom['filepath'], '/'); $custom['file'] = '/' . trim($custom['filepath'], '/');
// update the dynamic path // update the dynamic path
$custom['file'] = $this->updateDynamicPath($custom['file']); $custom['file'] = $this->updateDynamicPath($custom['file']);
// remove the file path // remove the file path
@ -1460,4 +1459,5 @@ class Structure extends Get
{ {
return ComponentbuilderHelper::removeFolder($dir, $ignore); return ComponentbuilderHelper::removeFolder($dir, $ignore);
} }
} }

View File

@ -1188,6 +1188,8 @@ class Fields extends Structure
*/ */
private function setField($setType, &$fieldAttributes, &$name, &$typeName, &$langView, &$view_name_single, &$view_name_list, $placeholders, &$optionArray, $custom = null, $taber = '') private function setField($setType, &$fieldAttributes, &$name, &$typeName, &$langView, &$view_name_single, &$view_name_list, $placeholders, &$optionArray, $custom = null, $taber = '')
{ {
// count the dynamic fields created
$this->fieldCount++;
// check what type of field builder to use // check what type of field builder to use
if ($this->fieldBuilderType == 1) if ($this->fieldBuilderType == 1)
{ {
@ -1541,8 +1543,6 @@ class Fields extends Structure
$this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single); $this->setCustomFieldTypeFile($data, $view_name_list, $view_name_single);
} }
} }
// count the dynamic fields created
$this->fieldCount++;
// return field // return field
return $field; return $field;
} }
@ -2868,8 +2868,6 @@ class Fields extends Structure
$xml = simplexml_import_dom($domXML); $xml = simplexml_import_dom($domXML);
break; break;
} }
// count the dynamic fields created
$this->fieldCount++;
} }
/** /**

View File

@ -255,7 +255,7 @@ class Interpretation extends Fields
$this->fileContentStatic['###HELPER_SITE_LICENSE_LOCK###'] = $this->setHelperLicenseLock($_VDM, 'site'); $this->fileContentStatic['###HELPER_SITE_LICENSE_LOCK###'] = $this->setHelperLicenseLock($_VDM, 'site');
$this->fileContentStatic['###HELPER_LICENSE_LOCK###'] = $this->setHelperLicenseLock($_VDM, 'admin'); $this->fileContentStatic['###HELPER_LICENSE_LOCK###'] = $this->setHelperLicenseLock($_VDM, 'admin');
$this->fileContentStatic['###LICENSE_LOCKED_INT###'] = $this->setInitLicenseLock($_VDM); $this->fileContentStatic['###LICENSE_LOCKED_INT###'] = $this->setInitLicenseLock($_VDM);
$this->fileContentStatic['###LICENSE_LOCKED_DEFINED###'] = PHP_EOL . PHP_EOL . 'defined(\'' . $_VDM . '\') or die(JText:'.':_(\'NIE_REG_NIE\'));'; $this->fileContentStatic['###LICENSE_LOCKED_DEFINED###'] = PHP_EOL . PHP_EOL . 'defined(\'' . $_VDM . '\') or die(JText:' . ':_(\'NIE_REG_NIE\'));';
} }
} }
else else
@ -300,7 +300,7 @@ class Interpretation extends Fields
$statment[] = PHP_EOL . "\t\tif (!" . $thIIS . "->" . $boolMethod . "())"; $statment[] = PHP_EOL . "\t\tif (!" . $thIIS . "->" . $boolMethod . "())";
$statment[] = "\t\t{"; $statment[] = "\t\t{";
$statment[] = "\t\t\t\$app = JFactory::getApplication();"; $statment[] = "\t\t\t\$app = JFactory::getApplication();";
$statment[] = "\t\t\t\$app->enqueueMessage(JText:".":_('NIE_REG_NIE'), 'error');"; $statment[] = "\t\t\t\$app->enqueueMessage(JText:" . ":_('NIE_REG_NIE'), 'error');";
$statment[] = "\t\t\t\$app->redirect('index.php');"; $statment[] = "\t\t\t\$app->redirect('index.php');";
$statment[] = "\t\t\treturn false;"; $statment[] = "\t\t\treturn false;";
$statment[] = "\t\t}"; $statment[] = "\t\t}";
@ -1704,11 +1704,11 @@ class Interpretation extends Fields
{ {
foreach ($this->cryptionTypes as $cryptionType) foreach ($this->cryptionTypes as $cryptionType)
{ {
if ($cryptionType.'_encryption' === $array['decode']) if ($cryptionType . '_encryption' === $array['decode'])
{ {
$if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && \$".$cryptionType."key && !is_numeric(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ", true)))" . PHP_EOL . "\t" . $tab . "\t{"; $if = PHP_EOL . "\t" . $tab . "\tif (!empty(" . $string . "->" . $field . ") && \$" . $cryptionType . "key && !is_numeric(" . $string . "->" . $field . ") && " . $string . "->" . $field . " === base64_encode(base64_decode(" . $string . "->" . $field . ", true)))" . PHP_EOL . "\t" . $tab . "\t{";
// set decryption // set decryption
$decoder = $string . "->" . $field . " = rtrim(\$".$cryptionType."->decryptString(" . $string . "->" . $field . "), " . '"\0"' . ");"; $decoder = $string . "->" . $field . " = rtrim(\$" . $cryptionType . "->decryptString(" . $string . "->" . $field . "), " . '"\0"' . ");";
$this->siteDecrypt[$cryptionType][$code] = true; $this->siteDecrypt[$cryptionType][$code] = true;
} }
} }
@ -2141,7 +2141,7 @@ class Interpretation extends Fields
{ {
$this->langContent['site'][$langKeyWord] = 'Not authorised to view ' . $view['settings']->code . '!'; $this->langContent['site'][$langKeyWord] = 'Not authorised to view ' . $view['settings']->code . '!';
} }
$accessCheck[] = "\t\t\t\$app->enqueueMessage(JText:".":_('" . $langKeyWord . "'), 'error');"; $accessCheck[] = "\t\t\t\$app->enqueueMessage(JText:" . ":_('" . $langKeyWord . "'), 'error');";
$accessCheck[] = $redirectMessage; $accessCheck[] = $redirectMessage;
$accessCheck[] = "\t\t\t\$app->redirect(" . $redirectString . ");"; $accessCheck[] = "\t\t\t\$app->redirect(" . $redirectString . ");";
$accessCheck[] = "\t\t\treturn false;"; $accessCheck[] = "\t\t\treturn false;";
@ -2172,8 +2172,7 @@ class Interpretation extends Fields
// start the get Item // start the get Item
$getItem = ''; $getItem = '';
// set before item php // set before item php
if (isset($get->add_php_before_getitem) && $get->add_php_before_getitem == 1 if (isset($get->add_php_before_getitem) && $get->add_php_before_getitem == 1 && isset($get->php_before_getitem) && ComponentbuilderHelper::checkString($get->php_before_getitem))
&& isset($get->php_before_getitem) && ComponentbuilderHelper::checkString($get->php_before_getitem))
{ {
$getItem .= $this->setPlaceholders($get->php_before_getitem, $this->placeholders); $getItem .= $this->setPlaceholders($get->php_before_getitem, $this->placeholders);
} }
@ -2196,8 +2195,7 @@ class Interpretation extends Fields
$getItem .= PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Load the results as a stdClass object."; $getItem .= PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Load the results as a stdClass object.";
$getItem .= PHP_EOL . "\t" . $tab . "\t\$data = \$db->loadObject();"; $getItem .= PHP_EOL . "\t" . $tab . "\t\$data = \$db->loadObject();";
// set after item php // set after item php
if (isset($get->add_php_after_getitem) && $get->add_php_after_getitem == 1 if (isset($get->add_php_after_getitem) && $get->add_php_after_getitem == 1 && isset($get->php_after_getitem) && ComponentbuilderHelper::checkString($get->php_after_getitem))
&& isset($get->php_after_getitem) && ComponentbuilderHelper::checkString($get->php_after_getitem))
{ {
$getItem .= $this->setPlaceholders($get->php_after_getitem, $this->placeholders); $getItem .= $this->setPlaceholders($get->php_after_getitem, $this->placeholders);
} }
@ -2212,7 +2210,7 @@ class Interpretation extends Fields
$this->langContent[$this->lang][$langKeyWoord] = 'Not found, or access denied.'; $this->langContent[$this->lang][$langKeyWoord] = 'Not found, or access denied.';
} }
$getItem .= PHP_EOL . "\t" . $tab . "\t\t//" . $this->setLine(__LINE__) . " If no data is found redirect to default page and show warning."; $getItem .= PHP_EOL . "\t" . $tab . "\t\t//" . $this->setLine(__LINE__) . " If no data is found redirect to default page and show warning.";
$getItem .= PHP_EOL . "\t" . $tab . "\t\t\$app->enqueueMessage(JText:".":_('" . $langKeyWoord . "'), 'warning');"; $getItem .= PHP_EOL . "\t" . $tab . "\t\t\$app->enqueueMessage(JText:" . ":_('" . $langKeyWoord . "'), 'warning');";
if ('site' === $this->target) if ('site' === $this->target)
{ {
// check that the default and the redirect page is not the same // check that the default and the redirect page is not the same
@ -2293,10 +2291,10 @@ class Interpretation extends Fields
{ {
if (isset($this->siteDecrypt[$cryptionType][$code]) && $this->siteDecrypt[$cryptionType][$code]) if (isset($this->siteDecrypt[$cryptionType][$code]) && $this->siteDecrypt[$cryptionType][$code])
{ {
$script .= PHP_EOL . PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Get the ".$cryptionType." encryption."; $script .= PHP_EOL . PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption.";
$script .= PHP_EOL . "\t" . $tab . "\t\$".$cryptionType."key = ".$Component."Helper::getCryptKey('".$cryptionType."');"; $script .= PHP_EOL . "\t" . $tab . "\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
$script .= PHP_EOL . "\t" . $tab . "\t//".$this->setLine(__LINE__)." Get the encryption object."; $script .= PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
$script .= PHP_EOL . "\t" . $tab . "\t\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);"; $script .= PHP_EOL . "\t" . $tab . "\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
} }
} }
$getItem = $script . $getItem; $getItem = $script . $getItem;
@ -2382,16 +2380,14 @@ class Interpretation extends Fields
$main .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the global params"; $main .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the global params";
$main .= PHP_EOL . "\t\t\$globalParams = JComponentHelper::getParams('com_" . $this->fileContentStatic['###component###'] . "', true);"; $main .= PHP_EOL . "\t\t\$globalParams = JComponentHelper::getParams('com_" . $this->fileContentStatic['###component###'] . "', true);";
// set php before listquery // set php before listquery
if (isset($view->add_php_getlistquery) && $view->add_php_getlistquery == 1 if (isset($view->add_php_getlistquery) && $view->add_php_getlistquery == 1 && isset($view->php_getlistquery) && ComponentbuilderHelper::checkString($view->php_getlistquery))
&& isset($view->php_getlistquery) && ComponentbuilderHelper::checkString($view->php_getlistquery))
{ {
$main .= $this->setPlaceholders($view->php_getlistquery, $this->placeholders); $main .= $this->setPlaceholders($view->php_getlistquery, $this->placeholders);
} }
// ###SITE_GET_LIST_QUERY### <<<DYNAMIC>>> // ###SITE_GET_LIST_QUERY### <<<DYNAMIC>>>
$main .= $this->setCustomViewListQuery($view, $view->code, false); $main .= $this->setCustomViewListQuery($view, $view->code, false);
// set before items php // set before items php
if (isset($view->add_php_before_getitems) && $view->add_php_before_getitems == 1 if (isset($view->add_php_before_getitems) && $view->add_php_before_getitems == 1 && isset($view->php_before_getitems) && ComponentbuilderHelper::checkString($view->php_before_getitems))
&& isset($view->php_before_getitems) && ComponentbuilderHelper::checkString($view->php_before_getitems))
{ {
$main .= $this->setPlaceholders($view->php_before_getitems, $this->placeholders); $main .= $this->setPlaceholders($view->php_before_getitems, $this->placeholders);
} }
@ -2400,8 +2396,7 @@ class Interpretation extends Fields
$main .= PHP_EOL . "\t\t\$db->setQuery(\$query);"; $main .= PHP_EOL . "\t\t\$db->setQuery(\$query);";
$main .= PHP_EOL . "\t\t\$items = \$db->loadObjectList();"; $main .= PHP_EOL . "\t\t\$items = \$db->loadObjectList();";
// set after items php // set after items php
if (isset($view->add_php_after_getitems) && $view->add_php_after_getitems == 1 if (isset($view->add_php_after_getitems) && $view->add_php_after_getitems == 1 && isset($view->php_after_getitems) && ComponentbuilderHelper::checkString($view->php_after_getitems))
&& isset($view->php_after_getitems) && ComponentbuilderHelper::checkString($view->php_after_getitems))
{ {
$main .= $this->setPlaceholders($view->php_after_getitems, $this->placeholders); $main .= $this->setPlaceholders($view->php_after_getitems, $this->placeholders);
} }
@ -2785,10 +2780,10 @@ class Interpretation extends Fields
{ {
if (isset($this->siteDecrypt[$cryptionType][$code]) && $this->siteDecrypt[$cryptionType][$code]) if (isset($this->siteDecrypt[$cryptionType][$code]) && $this->siteDecrypt[$cryptionType][$code])
{ {
$script .= PHP_EOL . "\t\t//".$this->setLine(__LINE__)." Get the ".$cryptionType." encryption."; $script .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption.";
$script .= PHP_EOL . "\t\t\$".$cryptionType."key = ".$Component."Helper::getCryptKey('".$cryptionType."');"; $script .= PHP_EOL . "\t\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
$script .= PHP_EOL . "\t\t//".$this->setLine(__LINE__)." Get the encryption object."; $script .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
$script .= PHP_EOL . "\t\t\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);".PHP_EOL; $script .= PHP_EOL . "\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);" . PHP_EOL;
} }
} }
$methods = str_replace('###CRYPT###', $script, $methods); $methods = str_replace('###CRYPT###', $script, $methods);
@ -2999,13 +2994,13 @@ class Interpretation extends Fields
{ {
if ($this->siteDecrypt[$cryptionType][$code]) if ($this->siteDecrypt[$cryptionType][$code])
{ {
$script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the ".$cryptionType." encryption."; $script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption.";
$script .= PHP_EOL . "\t\t\$".$cryptionType."key = " . $Component . "Helper::getCryptKey('".$cryptionType."');"; $script .= PHP_EOL . "\t\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
$script .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the encryption object."; $script .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
$script .= PHP_EOL . "\t\t\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);"; $script .= PHP_EOL . "\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
} }
} }
return $script.$getItem; return $script . $getItem;
} }
public function setCustomViewDisplayMethod(&$view) public function setCustomViewDisplayMethod(&$view)
@ -4276,18 +4271,18 @@ class Interpretation extends Fields
// decryption // decryption
foreach ($this->cryptionTypes as $cryptionType) foreach ($this->cryptionTypes as $cryptionType)
{ {
if (isset($this->{$cryptionType.'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType.'EncryptionBuilder'}[$view])) if (isset($this->{$cryptionType . 'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType . 'EncryptionBuilder'}[$view]))
{ {
$script .= PHP_EOL . PHP_EOL."\t\t\t//".$this->setLine(__LINE__)." Get the ".$cryptionType." encryption."; $script .= PHP_EOL . PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption.";
$script .= PHP_EOL . "\t\t\t\$".$cryptionType."key = ".$Component."Helper::getCryptKey('".$cryptionType."');"; $script .= PHP_EOL . "\t\t\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
$script .= PHP_EOL . "\t\t\t//".$this->setLine(__LINE__)." Get the encryption object."; $script .= PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
$script .= PHP_EOL . "\t\t\t\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);"; $script .= PHP_EOL . "\t\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
foreach ($this->{$cryptionType.'EncryptionBuilder'}[$view] as $baseString) foreach ($this->{$cryptionType . 'EncryptionBuilder'}[$view] as $baseString)
{ {
$script .= PHP_EOL . PHP_EOL."\t\t\tif (!empty(\$item->".$baseString.") && \$".$cryptionType."key && !is_numeric(\$item->".$baseString.") && \$item->".$baseString." === base64_encode(base64_decode(\$item->".$baseString.", true)))"; $script .= PHP_EOL . PHP_EOL . "\t\t\tif (!empty(\$item->" . $baseString . ") && \$" . $cryptionType . "key && !is_numeric(\$item->" . $baseString . ") && \$item->" . $baseString . " === base64_encode(base64_decode(\$item->" . $baseString . ", true)))";
$script .= PHP_EOL . "\t\t\t{"; $script .= PHP_EOL . "\t\t\t{";
$script .= PHP_EOL . "\t\t\t\t//".$this->setLine(__LINE__)." ".$cryptionType." decrypt data ".$baseString."."; $script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $cryptionType . " decrypt data " . $baseString . ".";
$script .= PHP_EOL . "\t\t\t\t\$item->".$baseString." = rtrim(\$".$cryptionType."->decryptString(\$item->".$baseString."), " . '"\0"' . ");"; $script .= PHP_EOL . "\t\t\t\t\$item->" . $baseString . " = rtrim(\$" . $cryptionType . "->decryptString(\$item->" . $baseString . "), " . '"\0"' . ");";
$script .= PHP_EOL . "\t\t\t}"; $script .= PHP_EOL . "\t\t\t}";
} }
} }
@ -4368,18 +4363,18 @@ class Interpretation extends Fields
$Component = $this->fileContentStatic['###Component###']; $Component = $this->fileContentStatic['###Component###'];
foreach ($this->cryptionTypes as $cryptionType) foreach ($this->cryptionTypes as $cryptionType)
{ {
if (isset($this->{$cryptionType.'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType.'EncryptionBuilder'}[$view])) if (isset($this->{$cryptionType . 'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType . 'EncryptionBuilder'}[$view]))
{ {
$script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the ".$cryptionType." encryption key."; $script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption key.";
$script .= PHP_EOL . "\t\t\$".$cryptionType."key = " . $Component . "Helper::getCryptKey('".$cryptionType."');"; $script .= PHP_EOL . "\t\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
$script .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the encryption object"; $script .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Get the encryption object";
$script .= PHP_EOL . "\t\t\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);"; $script .= PHP_EOL . "\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
foreach ($this->{$cryptionType.'EncryptionBuilder'}[$view] as $baseString) foreach ($this->{$cryptionType . 'EncryptionBuilder'}[$view] as $baseString)
{ {
$script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Encrypt data " . $baseString . "."; $script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Encrypt data " . $baseString . ".";
$script .= PHP_EOL . "\t\tif (isset(\$data['" . $baseString . "']) && \$".$cryptionType."key)"; $script .= PHP_EOL . "\t\tif (isset(\$data['" . $baseString . "']) && \$" . $cryptionType . "key)";
$script .= PHP_EOL . "\t\t{"; $script .= PHP_EOL . "\t\t{";
$script .= PHP_EOL . "\t\t\t\$data['" . $baseString . "'] = \$".$cryptionType."->encryptString(\$data['" . $baseString . "']);"; $script .= PHP_EOL . "\t\t\t\$data['" . $baseString . "'] = \$" . $cryptionType . "->encryptString(\$data['" . $baseString . "']);";
$script .= PHP_EOL . "\t\t}"; $script .= PHP_EOL . "\t\t}";
} }
} }
@ -4651,7 +4646,7 @@ class Interpretation extends Fields
$script .= PHP_EOL . "\t\t\t{"; $script .= PHP_EOL . "\t\t\t{";
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message."; $script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message.";
// TODO lang is not translated // TODO lang is not translated
$script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:".":_('The (" . $typeAlias . ") type alias was removed from the <b>#__content_type</b> table'));"; $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:" . ":_('The (" . $typeAlias . ") type alias was removed from the <b>#__content_type</b> table'));";
$script .= PHP_EOL . "\t\t\t}"; $script .= PHP_EOL . "\t\t\t}";
// Now remove the related items from contentitem tag map table // Now remove the related items from contentitem tag map table
@ -4668,7 +4663,7 @@ class Interpretation extends Fields
$script .= PHP_EOL . "\t\t\t{"; $script .= PHP_EOL . "\t\t\t{";
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message."; $script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message.";
// TODO lang is not translated // TODO lang is not translated
$script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:".":_('The (" . $typeAlias . ") type alias was removed from the <b>#__contentitem_tag_map</b> table'));"; $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:" . ":_('The (" . $typeAlias . ") type alias was removed from the <b>#__contentitem_tag_map</b> table'));";
$script .= PHP_EOL . "\t\t\t}"; $script .= PHP_EOL . "\t\t\t}";
// Now remove the related items from ucm content table // Now remove the related items from ucm content table
@ -4685,7 +4680,7 @@ class Interpretation extends Fields
$script .= PHP_EOL . "\t\t\t{"; $script .= PHP_EOL . "\t\t\t{";
$script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message."; $script .= PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message.";
// TODO lang is not translated // TODO lang is not translated
$script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:".":_('The (" . $typeAlias . ") type alias was removed from the <b>#__ucm_content</b> table'));"; $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:" . ":_('The (" . $typeAlias . ") type alias was removed from the <b>#__ucm_content</b> table'));";
$script .= PHP_EOL . "\t\t\t}"; $script .= PHP_EOL . "\t\t\t}";
// setup the foreach loop of ids // setup the foreach loop of ids
@ -4722,8 +4717,8 @@ class Interpretation extends Fields
$script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " If All related items was removed queued success message."; $script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " If All related items was removed queued success message.";
// TODO lang is not translated // TODO lang is not translated
$script .= PHP_EOL . "\t\t\$app->enqueueMessage(JText:".":_('All related items was removed from the <b>#__ucm_base</b> table'));"; $script .= PHP_EOL . "\t\t\$app->enqueueMessage(JText:" . ":_('All related items was removed from the <b>#__ucm_base</b> table'));";
$script .= PHP_EOL . "\t\t\$app->enqueueMessage(JText:".":_('All related items was removed from the <b>#__ucm_history</b> table'));"; $script .= PHP_EOL . "\t\t\$app->enqueueMessage(JText:" . ":_('All related items was removed from the <b>#__ucm_history</b> table'));";
// finaly remove the assets from the assets table // finaly remove the assets from the assets table
$script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Remove " . $component . " assets from the assets table"; $script .= PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Remove " . $component . " assets from the assets table";
$script .= PHP_EOL . "\t\t\$" . $component . "_condition = array( \$db->quoteName('name') . ' LIKE ' . \$db->quote('com_" . $component . "%') );"; $script .= PHP_EOL . "\t\t\$" . $component . "_condition = array( \$db->quoteName('name') . ' LIKE ' . \$db->quote('com_" . $component . "%') );";
@ -4737,7 +4732,7 @@ class Interpretation extends Fields
$script .= PHP_EOL . "\t\t{"; $script .= PHP_EOL . "\t\t{";
$script .= PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $component . " add queued success message."; $script .= PHP_EOL . "\t\t\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $component . " add queued success message.";
// TODO lang is not translated // TODO lang is not translated
$script .= PHP_EOL . "\t\t\t\$app->enqueueMessage(JText:".":_('All related items was removed from the <b>#__assets</b> table'));"; $script .= PHP_EOL . "\t\t\t\$app->enqueueMessage(JText:" . ":_('All related items was removed from the <b>#__assets</b> table'));";
$script .= PHP_EOL . "\t\t}"; $script .= PHP_EOL . "\t\t}";
// done // done
$script .= PHP_EOL; $script .= PHP_EOL;
@ -4756,7 +4751,7 @@ class Interpretation extends Fields
$script[] = "\t\t//" . $this->setLine(__LINE__) . " We check if we have dynamic folders to copy"; $script[] = "\t\t//" . $this->setLine(__LINE__) . " We check if we have dynamic folders to copy";
$script[] = "\t\t\$this->setDynamicF0ld3rs(\$app, \$parent);"; $script[] = "\t\t\$this->setDynamicF0ld3rs(\$app, \$parent);";
// done // done
return PHP_EOL.implode(PHP_EOL, $script); return PHP_EOL . implode(PHP_EOL, $script);
} }
return ''; return '';
} }
@ -4802,7 +4797,7 @@ class Interpretation extends Fields
$script[] = "\t\t}"; $script[] = "\t\t}";
$script[] = "\t}"; $script[] = "\t}";
// done // done
return PHP_EOL.PHP_EOL.implode(PHP_EOL, $script); return PHP_EOL . PHP_EOL . implode(PHP_EOL, $script);
} }
return ''; return '';
} }
@ -4974,14 +4969,13 @@ class Interpretation extends Fields
if ($viewArray && ComponentbuilderHelper::checkArray($viewArray) && isset($viewArray['settings']) && isset($viewArray['settings']->main_get)) if ($viewArray && ComponentbuilderHelper::checkArray($viewArray) && isset($viewArray['settings']) && isset($viewArray['settings']->main_get))
{ {
// check if we have custom script for this router parse switch case // check if we have custom script for this router parse switch case
if (isset($viewArray['settings']->main_get->add_php_router_parse) && $viewArray['settings']->main_get->add_php_router_parse == 1 if (isset($viewArray['settings']->main_get->add_php_router_parse) && $viewArray['settings']->main_get->add_php_router_parse == 1 && isset($viewArray['settings']->main_get->php_router_parse) && ComponentbuilderHelper::checkString($viewArray['settings']->main_get->php_router_parse))
&& isset($viewArray['settings']->main_get->php_router_parse) && ComponentbuilderHelper::checkString($viewArray['settings']->main_get->php_router_parse))
{ {
// load the custom script for the switch based on dynamic get // load the custom script for the switch based on dynamic get
$routerSwitch[] = PHP_EOL . "\t\t\tcase '" . $view . "':"; $routerSwitch[] = PHP_EOL . "\t\t\tcase '" . $view . "':";
$routerSwitch[] = $this->setPlaceholders($this->setDynamicValues(base64_decode($viewArray['settings']->main_get->php_router_parse)), $this->placeholders); $routerSwitch[] = $this->setPlaceholders($this->setDynamicValues(base64_decode($viewArray['settings']->main_get->php_router_parse)), $this->placeholders);
$routerSwitch[] = "\t\t\t\tbreak;"; $routerSwitch[] = "\t\t\t\tbreak;";
return implode(PHP_EOL, $routerSwitch); return implode(PHP_EOL, $routerSwitch);
} }
// is this a catogory // is this a catogory
@ -5133,7 +5127,7 @@ class Interpretation extends Fields
$batchmove[] = PHP_EOL . "\t\tif (!\$this->canDo->get('core.edit') && !\$this->canDo->get('core.batch'))"; $batchmove[] = PHP_EOL . "\t\tif (!\$this->canDo->get('core.edit') && !\$this->canDo->get('core.batch'))";
} }
$batchmove[] = "\t\t{"; $batchmove[] = "\t\t{";
$batchmove[] = "\t\t\t\$this->setError(JText:".":_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));"; $batchmove[] = "\t\t\t\$this->setError(JText:" . ":_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));";
$batchmove[] = "\t\t\treturn false;"; $batchmove[] = "\t\t\treturn false;";
$batchmove[] = "\t\t}" . $customScript; $batchmove[] = "\t\t}" . $customScript;
@ -5183,7 +5177,7 @@ class Interpretation extends Fields
$batchmove[] = "\t\t\tif (!\$this->user->authorise('core.edit', \$contexts[\$pk]))"; $batchmove[] = "\t\t\tif (!\$this->user->authorise('core.edit', \$contexts[\$pk]))";
} }
$batchmove[] = "\t\t\t{"; $batchmove[] = "\t\t\t{";
$batchmove[] = "\t\t\t\t\$this->setError(JText:".":_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));"; $batchmove[] = "\t\t\t\t\$this->setError(JText:" . ":_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));";
$batchmove[] = "\t\t\t\treturn false;"; $batchmove[] = "\t\t\t\treturn false;";
$batchmove[] = "\t\t\t}"; $batchmove[] = "\t\t\t}";
@ -5201,7 +5195,7 @@ class Interpretation extends Fields
$batchmove[] = "\t\t\t\telse"; $batchmove[] = "\t\t\t\telse";
$batchmove[] = "\t\t\t\t{"; $batchmove[] = "\t\t\t\t{";
$batchmove[] = "\t\t\t\t\t//" . $this->setLine(__LINE__) . " Not fatal error"; $batchmove[] = "\t\t\t\t\t//" . $this->setLine(__LINE__) . " Not fatal error";
$batchmove[] = "\t\t\t\t\t\$this->setError(JText:".":sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', \$pk));"; $batchmove[] = "\t\t\t\t\t\$this->setError(JText:" . ":sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', \$pk));";
$batchmove[] = "\t\t\t\t\tcontinue;"; $batchmove[] = "\t\t\t\t\tcontinue;";
$batchmove[] = "\t\t\t\t}"; $batchmove[] = "\t\t\t\t}";
$batchmove[] = "\t\t\t}"; $batchmove[] = "\t\t\t}";
@ -5385,7 +5379,7 @@ class Interpretation extends Fields
} }
$batchcopy[] = "\t\t\t{"; $batchcopy[] = "\t\t\t{";
$batchcopy[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Not fatal error"; $batchcopy[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Not fatal error";
$batchcopy[] = "\t\t\t\t\$this->setError(JText:".":sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', \$pk));"; $batchcopy[] = "\t\t\t\t\$this->setError(JText:" . ":sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', \$pk));";
$batchcopy[] = "\t\t\t\tcontinue;"; $batchcopy[] = "\t\t\t\tcontinue;";
$batchcopy[] = "\t\t\t}"; $batchcopy[] = "\t\t\t}";
@ -5402,7 +5396,7 @@ class Interpretation extends Fields
$batchcopy[] = "\t\t\t\telse"; $batchcopy[] = "\t\t\t\telse";
$batchcopy[] = "\t\t\t\t{"; $batchcopy[] = "\t\t\t\t{";
$batchcopy[] = "\t\t\t\t\t//" . $this->setLine(__LINE__) . " Not fatal error"; $batchcopy[] = "\t\t\t\t\t//" . $this->setLine(__LINE__) . " Not fatal error";
$batchcopy[] = "\t\t\t\t\t\$this->setError(JText:".":sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', \$pk));"; $batchcopy[] = "\t\t\t\t\t\$this->setError(JText:" . ":sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', \$pk));";
$batchcopy[] = "\t\t\t\t\tcontinue;"; $batchcopy[] = "\t\t\t\t\tcontinue;";
$batchcopy[] = "\t\t\t\t}"; $batchcopy[] = "\t\t\t\t}";
$batchcopy[] = "\t\t\t}"; $batchcopy[] = "\t\t\t}";
@ -5567,7 +5561,7 @@ class Interpretation extends Fields
{ {
$fixUniqe[] = PHP_EOL . "\t\t\t\tif (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'], '" . $category . "' => \$data['" . $category . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))"; $fixUniqe[] = PHP_EOL . "\t\t\t\tif (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'], '" . $category . "' => \$data['" . $category . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))";
$fixUniqe[] = "\t\t\t\t{"; $fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$msg = JText:".":_('COM_" . $this->fileContentStatic['###COMPONENT###'] . "_" . $VIEW . "_SAVE_WARNING');"; $fixUniqe[] = "\t\t\t\t\t\$msg = JText:" . ":_('COM_" . $this->fileContentStatic['###COMPONENT###'] . "_" . $VIEW . "_SAVE_WARNING');";
$fixUniqe[] = "\t\t\t\t}"; $fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = PHP_EOL . "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], \$data['" . $title . "']);"; $fixUniqe[] = PHP_EOL . "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->generateNewTitle(\$data['" . $category . "'], \$data['" . $alias . "'], \$data['" . $title . "']);";
} }
@ -5575,7 +5569,7 @@ class Interpretation extends Fields
{ {
$fixUniqe[] = PHP_EOL . "\t\t\t\tif (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))"; $fixUniqe[] = PHP_EOL . "\t\t\t\tif (\$table->load(array('" . $alias . "' => \$data['" . $alias . "'])) && (\$table->id != \$data['id'] || \$data['id'] == 0))";
$fixUniqe[] = "\t\t\t\t{"; $fixUniqe[] = "\t\t\t\t{";
$fixUniqe[] = "\t\t\t\t\t\$msg = JText:".":_('COM_" . $this->fileContentStatic['###COMPONENT###'] . "_" . $VIEW . "_SAVE_WARNING');"; $fixUniqe[] = "\t\t\t\t\t\$msg = JText:" . ":_('COM_" . $this->fileContentStatic['###COMPONENT###'] . "_" . $VIEW . "_SAVE_WARNING');";
$fixUniqe[] = "\t\t\t\t}"; $fixUniqe[] = "\t\t\t\t}";
$fixUniqe[] = PHP_EOL . "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], \$data['" . $title . "']);"; $fixUniqe[] = PHP_EOL . "\t\t\t\tlist(\$" . $title . ", \$" . $alias . ") = \$this->_generateNewTitle(\$data['" . $alias . "'], \$data['" . $title . "']);";
} }
@ -5742,14 +5736,14 @@ class Interpretation extends Fields
$this->updateSQLBuilder["ALTERTABLE`#__" . $component . "_" . $view . "`ADD`" . $field . "`"] = "ALTER TABLE `#__" . $component . "_" . $view . "` ADD `" . $field . "` " . $data['type'] . $lenght . " " . $default . " AFTER `" . $last_name . "`;"; $this->updateSQLBuilder["ALTERTABLE`#__" . $component . "_" . $view . "`ADD`" . $field . "`"] = "ALTER TABLE `#__" . $component . "_" . $view . "` ADD `" . $field . "` " . $data['type'] . $lenght . " " . $default . " AFTER `" . $last_name . "`;";
} }
// check if the field has changed name and/or data type and lenght // check if the field has changed name and/or data type and lenght
elseif ((isset($this->updateSQL['field.datatype']) && isset($this->updateSQL['field.datatype'][$view.'.'.$field])) || elseif ((isset($this->updateSQL['field.datatype']) && isset($this->updateSQL['field.datatype'][$view . '.' . $field])) ||
(isset($this->updateSQL['field.lenght']) && isset($this->updateSQL['field.lenght'][$view.'.'.$field])) || (isset($this->updateSQL['field.lenght']) && isset($this->updateSQL['field.lenght'][$view . '.' . $field])) ||
(isset($this->updateSQL['field.name']) && isset($this->updateSQL['field.name'][$view.'.'.$field]))) (isset($this->updateSQL['field.name']) && isset($this->updateSQL['field.name'][$view . '.' . $field])))
{ {
// if the name changed // if the name changed
if (isset($this->updateSQL['field.name']) && isset($this->updateSQL['field.name'][$view.'.'.$field])) if (isset($this->updateSQL['field.name']) && isset($this->updateSQL['field.name'][$view . '.' . $field]))
{ {
$oldName = $this->updateSQL['field.name'][$view.'.'.$field]['old']; $oldName = $this->updateSQL['field.name'][$view . '.' . $field]['old'];
} }
else else
{ {
@ -6270,7 +6264,7 @@ class Interpretation extends Fields
// check if translated value is used // check if translated value is used
if (isset($this->selectionTranslationFixBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$viewName_list]) && array_key_exists($item['code'], $this->selectionTranslationFixBuilder[$viewName_list])) if (isset($this->selectionTranslationFixBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$viewName_list]) && array_key_exists($item['code'], $this->selectionTranslationFixBuilder[$viewName_list]))
{ {
$itemCode = '<?php echo JText:'.':_($item->' . $item['code'] . '); ?>'; $itemCode = '<?php echo JText:' . ':_($item->' . $item['code'] . '); ?>';
} }
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['text'] === 'user') elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['text'] === 'user')
{ {
@ -6300,7 +6294,7 @@ class Interpretation extends Fields
{ {
$otherViews = $this->catCodeBuilder[$viewName_single]['views']; $otherViews = $this->catCodeBuilder[$viewName_single]['views'];
// category and linked // category and linked
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_" . $this->fileContentStatic['###component###'] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_" . $this->fileContentStatic['###component###'] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->' . $item['code'] . '; ?>&extension=com_' . $this->fileContentStatic['###component###'] . '.' . $otherViews . '"><?php echo $this->escape($item->category_title); ?></a>'; $body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->' . $item['code'] . '; ?>&extension=com_' . $this->fileContentStatic['###component###'] . '.' . $otherViews . '"><?php echo $this->escape($item->category_title); ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>"; $body .= PHP_EOL . "\t\t\t<?php else: ?>";
@ -6312,7 +6306,7 @@ class Interpretation extends Fields
{ {
// user and linked // user and linked
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>"; $body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['code'] . ' ?>"><?php echo $' . $item['code'] . 'User->name; ?></a>'; $body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['code'] . ' ?>"><?php echo $' . $item['code'] . 'User->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>"; $body .= PHP_EOL . "\t\t\t<?php else: ?>";
@ -6348,7 +6342,7 @@ class Interpretation extends Fields
{ {
// user and linked // user and linked
$body .= PHP_EOL . "\t\t<?php \$" . $item['id'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>"; $body .= PHP_EOL . "\t\t<?php \$" . $item['id'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $' . $item['id'] . '->name; ?></a>'; $body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $' . $item['id'] . '->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>"; $body .= PHP_EOL . "\t\t\t<?php else: ?>";
@ -6372,9 +6366,9 @@ class Interpretation extends Fields
foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView) foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView)
{ {
$customAdminView .= PHP_EOL . "\t\t\t<?php if (\$canDo->get('" . $customLinkView['link'] . ".access')): ?>"; $customAdminView .= PHP_EOL . "\t\t\t<?php if (\$canDo->get('" . $customLinkView['link'] . ".access')): ?>";
$customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini" href="index.php?option=com_' . $this->fileContentStatic['###component###'] . '&view=' . $customLinkView['link'] . '&id=<?php echo $item->id; ?>" title="<?php echo JText:'.':_(' . "'COM_" . $this->fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>" ><span class="icon-' . $customLinkView['icon'] . '"></span></a>'; $customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini" href="index.php?option=com_' . $this->fileContentStatic['###component###'] . '&view=' . $customLinkView['link'] . '&id=<?php echo $item->id; ?>" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>" ><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminView .= PHP_EOL . "\t\t\t<?php else: ?>"; $customAdminView .= PHP_EOL . "\t\t\t<?php else: ?>";
$customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini disabled" href="#" title="<?php echo JText:'.':_(' . "'COM_" . $this->fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>"><span class="icon-' . $customLinkView['icon'] . '"></span></a>'; $customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini disabled" href="#" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>"><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminView .= PHP_EOL . "\t\t\t<?php endif; ?>"; $customAdminView .= PHP_EOL . "\t\t\t<?php endif; ?>";
} }
$customAdminView .= PHP_EOL . "\t\t\t" . '</div>'; $customAdminView .= PHP_EOL . "\t\t\t" . '</div>';
@ -6397,7 +6391,7 @@ class Interpretation extends Fields
if ($add) if ($add)
{ {
// set as linked // set as linked
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (" . $accessCheck . "): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (" . $accessCheck . "): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<div class="name">' . PHP_EOL . "\t\t\t\t\t" . '<a href="' . $link . '">' . $itemCode . '</a>'; $body .= PHP_EOL . "\t\t\t\t" . '<div class="name">' . PHP_EOL . "\t\t\t\t\t" . '<a href="' . $link . '">' . $itemCode . '</a>';
if ($checkoutTriger) if ($checkoutTriger)
@ -6419,7 +6413,7 @@ class Interpretation extends Fields
{ {
if ($item['type'] === 'category') if ($item['type'] === 'category')
{ {
$body .= PHP_EOL . "\t\t<td class=\"".$this->setListFieldClass($item['code'], $viewName_list, 'hidden-phone')."\">"; $body .= PHP_EOL . "\t\t<td class=\"" . $this->setListFieldClass($item['code'], $viewName_list, 'hidden-phone') . "\">";
$body .= PHP_EOL . "\t\t\t<?php echo \$this->escape(\$item->category_title); ?>"; $body .= PHP_EOL . "\t\t\t<?php echo \$this->escape(\$item->category_title); ?>";
$body .= PHP_EOL . "\t\t</td>"; $body .= PHP_EOL . "\t\t</td>";
} }
@ -6427,7 +6421,7 @@ class Interpretation extends Fields
{ {
// custom user and linked // custom user and linked
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>"; $body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap hidden-phone').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap hidden-phone') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $' . $item['code'] . '->name; ?></a>'; $body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $' . $item['code'] . '->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>"; $body .= PHP_EOL . "\t\t\t<?php else: ?>";
@ -6439,14 +6433,14 @@ class Interpretation extends Fields
{ {
// user name only // user name only
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>"; $body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php echo \$" . $item['code'] . "User->name; ?>"; $body .= PHP_EOL . "\t\t\t<?php echo \$" . $item['code'] . "User->name; ?>";
$body .= PHP_EOL . "\t\t</td>"; $body .= PHP_EOL . "\t\t</td>";
} }
else else
{ {
// normal not linked // normal not linked
$body .= PHP_EOL . "\t\t<td class=\"".$this->setListFieldClass($item['code'], $viewName_list, 'hidden-phone')."\">"; $body .= PHP_EOL . "\t\t<td class=\"" . $this->setListFieldClass($item['code'], $viewName_list, 'hidden-phone') . "\">";
$body .= PHP_EOL . "\t\t\t" . $itemCode; $body .= PHP_EOL . "\t\t\t" . $itemCode;
$body .= PHP_EOL . "\t\t</td>"; $body .= PHP_EOL . "\t\t</td>";
} }
@ -6481,7 +6475,7 @@ class Interpretation extends Fields
} }
if (!isset($this->fieldsNames[$viewName_single]['id'])) if (!isset($this->fieldsNames[$viewName_single]['id']))
{ {
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap center hidden-phone').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap center hidden-phone') . '">';
$body .= PHP_EOL . "\t\t\t<?php echo \$item->id; ?>"; $body .= PHP_EOL . "\t\t\t<?php echo \$item->id; ?>";
$body .= PHP_EOL . "\t\t</td>"; $body .= PHP_EOL . "\t\t</td>";
} }
@ -6552,7 +6546,7 @@ class Interpretation extends Fields
{ {
$class = 'nowrap'; $class = 'nowrap';
} }
$title = "<?php echo JText:".":_('" . $item['lang'] . "'); ?>"; $title = "<?php echo JText:" . ":_('" . $item['lang'] . "'); ?>";
if ($item['sort']) if ($item['sort'])
{ {
$title = "<?php echo JHtml::_('grid.sort', '" . $item['lang'] . "', '" . $item['code'] . "', \$this->listDirn, \$this->listOrder); ?>"; $title = "<?php echo JHtml::_('grid.sort', '" . $item['lang'] . "', '" . $item['code'] . "', \$this->listDirn, \$this->listOrder); ?>";
@ -6571,7 +6565,7 @@ class Interpretation extends Fields
$head .= PHP_EOL . "\t\t</th>"; $head .= PHP_EOL . "\t\t</th>";
$head .= PHP_EOL . "\t<?php else: ?>"; $head .= PHP_EOL . "\t<?php else: ?>";
$head .= PHP_EOL . "\t\t" . '<th width="10" class="nowrap center" >'; $head .= PHP_EOL . "\t\t" . '<th width="10" class="nowrap center" >';
$head .= PHP_EOL . "\t\t\t<?php echo JText:".":_('" . $statusLangName . "'); ?>"; $head .= PHP_EOL . "\t\t\t<?php echo JText:" . ":_('" . $statusLangName . "'); ?>";
$head .= PHP_EOL . "\t\t</th>"; $head .= PHP_EOL . "\t\t</th>";
$head .= PHP_EOL . "\t<?php endif; ?>"; $head .= PHP_EOL . "\t<?php endif; ?>";
} }
@ -6897,7 +6891,7 @@ class Interpretation extends Fields
$body .= PHP_EOL; $body .= PHP_EOL;
} }
// start tab // start tab
$body .= PHP_EOL . "\t<?php echo JHtml::_('bootstrap.addTab', '" . $viewName_single . "Tab', '" . $tabCodeName . "', JText:".":_('" . $tabLangName . "', true)); ?>"; $body .= PHP_EOL . "\t<?php echo JHtml::_('bootstrap.addTab', '" . $viewName_single . "Tab', '" . $tabCodeName . "', JText:" . ":_('" . $tabLangName . "', true)); ?>";
// add the main // add the main
$body .= PHP_EOL . "\t\t" . '<div class="row-fluid form-horizontal-desktop">'; $body .= PHP_EOL . "\t\t" . '<div class="row-fluid form-horizontal-desktop">';
$body .= $main; $body .= $main;
@ -7080,7 +7074,7 @@ class Interpretation extends Fields
} }
$body .= PHP_EOL . PHP_EOL . "\t<?php if (" . implode(' || ', $publishingPer) . ") : ?>"; $body .= PHP_EOL . PHP_EOL . "\t<?php if (" . implode(' || ', $publishingPer) . ") : ?>";
// set the default publishing tab // set the default publishing tab
$body .= PHP_EOL . "\t<?php echo JHtml::_('bootstrap.addTab', '" . $viewName_single . "Tab', '" . $tabCodeNameLeft . "', JText:".":_('" . $tabLangName . "', true)); ?>"; $body .= PHP_EOL . "\t<?php echo JHtml::_('bootstrap.addTab', '" . $viewName_single . "Tab', '" . $tabCodeNameLeft . "', JText:" . ":_('" . $tabLangName . "', true)); ?>";
$body .= PHP_EOL . "\t\t" . '<div class="row-fluid form-horizontal-desktop">'; $body .= PHP_EOL . "\t\t" . '<div class="row-fluid form-horizontal-desktop">';
if ($items_one) if ($items_one)
{ {
@ -7112,7 +7106,7 @@ class Interpretation extends Fields
} }
// set the permissions tab // set the permissions tab
$body .= PHP_EOL . PHP_EOL . "\t<?php if (\$this->canDo->get('core.admin')) : ?>"; $body .= PHP_EOL . PHP_EOL . "\t<?php if (\$this->canDo->get('core.admin')) : ?>";
$body .= PHP_EOL . "\t<?php echo JHtml::_('bootstrap.addTab', '" . $viewName_single . "Tab', '" . $tabCodeName . "', JText:".":_('" . $tabLangName . "', true)); ?>"; $body .= PHP_EOL . "\t<?php echo JHtml::_('bootstrap.addTab', '" . $viewName_single . "Tab', '" . $tabCodeName . "', JText:" . ":_('" . $tabLangName . "', true)); ?>";
$body .= PHP_EOL . "\t\t" . '<div class="row-fluid form-horizontal-desktop">'; $body .= PHP_EOL . "\t\t" . '<div class="row-fluid form-horizontal-desktop">';
$body .= PHP_EOL . "\t\t\t" . '<div class="span12">'; $body .= PHP_EOL . "\t\t\t" . '<div class="span12">';
$body .= PHP_EOL . "\t\t\t\t" . '<fieldset class="adminform">'; $body .= PHP_EOL . "\t\t\t\t" . '<fieldset class="adminform">';
@ -7434,7 +7428,7 @@ class Interpretation extends Fields
// check if translated vlaue is used // check if translated vlaue is used
if (isset($this->selectionTranslationFixBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$viewName_list]) && array_key_exists($item['code'], $this->selectionTranslationFixBuilder[$viewName_list])) if (isset($this->selectionTranslationFixBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$viewName_list]) && array_key_exists($item['code'], $this->selectionTranslationFixBuilder[$viewName_list]))
{ {
$itemCode = '<?php echo JText:'.':_($item->' . $item['code'] . '); ?>'; $itemCode = '<?php echo JText:' . ':_($item->' . $item['code'] . '); ?>';
} }
elseif ($item['custom']['text'] === 'user') elseif ($item['custom']['text'] === 'user')
{ {
@ -7465,7 +7459,7 @@ class Interpretation extends Fields
{ {
$otherViews = $this->catCodeBuilder[$viewName_single]['views']; $otherViews = $this->catCodeBuilder[$viewName_single]['views'];
// category and linked // category and linked
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_" . $this->fileContentStatic['###component###'] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_" . $this->fileContentStatic['###component###'] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->' . $item['code'] . '; ?>&extension=com_' . $this->fileContentStatic['###component###'] . '.' . $otherViews . '"><?php echo $displayData->escape($item->category_title); ?></a>'; $body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->' . $item['code'] . '; ?>&extension=com_' . $this->fileContentStatic['###component###'] . '.' . $otherViews . '"><?php echo $displayData->escape($item->category_title); ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>"; $body .= PHP_EOL . "\t\t\t<?php else: ?>";
@ -7477,7 +7471,7 @@ class Interpretation extends Fields
{ {
// user and linked // user and linked
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>"; $body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_users')): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['code'] . ' ?>"><?php echo $' . $item['code'] . 'User->name; ?></a>'; $body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['code'] . ' ?>"><?php echo $' . $item['code'] . 'User->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>"; $body .= PHP_EOL . "\t\t\t<?php else: ?>";
@ -7526,7 +7520,7 @@ class Interpretation extends Fields
{ {
// user and linked // user and linked
$body .= PHP_EOL . "\t\t<?php \$_" . $item['id'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>"; $body .= PHP_EOL . "\t\t<?php \$_" . $item['id'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_users')): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $_' . $item['id'] . '->name; ?></a>'; $body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $_' . $item['id'] . '->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>"; $body .= PHP_EOL . "\t\t\t<?php else: ?>";
@ -7549,9 +7543,9 @@ class Interpretation extends Fields
foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView) foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView)
{ {
$customAdminView .= PHP_EOL . "\t\t\t<?php if (\$canDo->get('" . $customLinkView['link'] . ".access')): ?>"; $customAdminView .= PHP_EOL . "\t\t\t<?php if (\$canDo->get('" . $customLinkView['link'] . ".access')): ?>";
$customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini" href="index.php?option=com_' . $this->fileContentStatic['###component###'] . '&view=' . $customLinkView['link'] . '&id=<?php echo $item->id; ?>&ref=' . $refview . '&refid=<?php echo $id; ?>" title="<?php echo JText:'.':_(' . "'COM_" . $this->fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>" ><span class="icon-' . $customLinkView['icon'] . '"></span></a>'; $customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini" href="index.php?option=com_' . $this->fileContentStatic['###component###'] . '&view=' . $customLinkView['link'] . '&id=<?php echo $item->id; ?>&ref=' . $refview . '&refid=<?php echo $id; ?>" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>" ><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminView .= PHP_EOL . "\t\t\t<?php else: ?>"; $customAdminView .= PHP_EOL . "\t\t\t<?php else: ?>";
$customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini disabled" href="#" title="<?php echo JText:'.':_(' . "'COM_" . $this->fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>"><span class="icon-' . $customLinkView['icon'] . '"></span></a>'; $customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini disabled" href="#" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>"><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminView .= PHP_EOL . "\t\t\t<?php endif; ?>"; $customAdminView .= PHP_EOL . "\t\t\t<?php endif; ?>";
} }
$customAdminView .= PHP_EOL . "\t\t\t" . '</div>'; $customAdminView .= PHP_EOL . "\t\t\t" . '</div>';
@ -7574,7 +7568,7 @@ class Interpretation extends Fields
if ($add) if ($add)
{ {
// set as linked // set as linked
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (" . $accessCheck . "): ?>"; $body .= PHP_EOL . "\t\t\t<?php if (" . $accessCheck . "): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="' . $link . '">' . $itemCode . '</a>'; $body .= PHP_EOL . "\t\t\t\t" . '<a href="' . $link . '">' . $itemCode . '</a>';
if ($checkoutTriger) if ($checkoutTriger)
@ -7615,7 +7609,7 @@ class Interpretation extends Fields
{ {
// user name only // user name only
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>"; $body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="'.$this->setListFieldClass($item['code'], $viewName_list, 'nowrap').'">'; $body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php echo \$" . $item['code'] . "User->name; ?>"; $body .= PHP_EOL . "\t\t\t<?php echo \$" . $item['code'] . "User->name; ?>";
$body .= PHP_EOL . "\t\t</td>"; $body .= PHP_EOL . "\t\t</td>";
} }
@ -7633,29 +7627,29 @@ class Interpretation extends Fields
// add the defaults // add the defaults
$body .= PHP_EOL . "\t\t<?php if (\$item->published == 1):?>"; $body .= PHP_EOL . "\t\t<?php if (\$item->published == 1):?>";
$body .= PHP_EOL . "\t\t\t" . '<td class="center" ' . $data_value . '="1">'; $body .= PHP_EOL . "\t\t\t" . '<td class="center" ' . $data_value . '="1">';
$body .= PHP_EOL . "\t\t\t\t" . '<span class="status-metro status-published" title="<?php echo JText:'.':_(' . "'" . $this->langPrefix . "_PUBLISHED'" . '); ?>">'; $body .= PHP_EOL . "\t\t\t\t" . '<span class="status-metro status-published" title="<?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_PUBLISHED'" . '); ?>">';
$body .= PHP_EOL . "\t\t\t\t\t" . '<?php echo JText:'.':_(' . "'" . $this->langPrefix . "_PUBLISHED'" . '); ?>'; $body .= PHP_EOL . "\t\t\t\t\t" . '<?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_PUBLISHED'" . '); ?>';
$body .= PHP_EOL . "\t\t\t\t" . '</span>'; $body .= PHP_EOL . "\t\t\t\t" . '</span>';
$body .= PHP_EOL . "\t\t\t" . '</td>'; $body .= PHP_EOL . "\t\t\t" . '</td>';
$body .= PHP_EOL . "\t\t<?php elseif (\$item->published == 0):?>"; $body .= PHP_EOL . "\t\t<?php elseif (\$item->published == 0):?>";
$body .= PHP_EOL . "\t\t\t" . '<td class="center" ' . $data_value . '="2">'; $body .= PHP_EOL . "\t\t\t" . '<td class="center" ' . $data_value . '="2">';
$body .= PHP_EOL . "\t\t\t\t" . '<span class="status-metro status-inactive" title="<?php echo JText:'.':_(' . "'" . $this->langPrefix . "_INACTIVE'" . '); ?>">'; $body .= PHP_EOL . "\t\t\t\t" . '<span class="status-metro status-inactive" title="<?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_INACTIVE'" . '); ?>">';
$body .= PHP_EOL . "\t\t\t\t\t" . '<?php echo JText:'.':_(' . "'" . $this->langPrefix . "_INACTIVE'" . '); ?>'; $body .= PHP_EOL . "\t\t\t\t\t" . '<?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_INACTIVE'" . '); ?>';
$body .= PHP_EOL . "\t\t\t\t" . '</span>'; $body .= PHP_EOL . "\t\t\t\t" . '</span>';
$body .= PHP_EOL . "\t\t\t" . '</td>'; $body .= PHP_EOL . "\t\t\t" . '</td>';
$body .= PHP_EOL . "\t\t<?php elseif (\$item->published == 2):?>"; $body .= PHP_EOL . "\t\t<?php elseif (\$item->published == 2):?>";
$body .= PHP_EOL . "\t\t\t" . '<td class="center" ' . $data_value . '="3">'; $body .= PHP_EOL . "\t\t\t" . '<td class="center" ' . $data_value . '="3">';
$body .= PHP_EOL . "\t\t\t\t" . '<span class="status-metro status-archived" title="<?php echo JText:'.':_(' . "'" . $this->langPrefix . "_ARCHIVED'" . '); ?>">'; $body .= PHP_EOL . "\t\t\t\t" . '<span class="status-metro status-archived" title="<?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_ARCHIVED'" . '); ?>">';
$body .= PHP_EOL . "\t\t\t\t\t" . '<?php echo JText:'.':_(' . "'" . $this->langPrefix . "_ARCHIVED'" . '); ?>'; $body .= PHP_EOL . "\t\t\t\t\t" . '<?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_ARCHIVED'" . '); ?>';
$body .= PHP_EOL . "\t\t\t\t" . '</span>'; $body .= PHP_EOL . "\t\t\t\t" . '</span>';
$body .= PHP_EOL . "\t\t\t" . '</td>'; $body .= PHP_EOL . "\t\t\t" . '</td>';
$body .= PHP_EOL . "\t\t<?php elseif (\$item->published == -2):?>"; $body .= PHP_EOL . "\t\t<?php elseif (\$item->published == -2):?>";
$body .= PHP_EOL . "\t\t\t" . '<td class="center" ' . $data_value . '="4">'; $body .= PHP_EOL . "\t\t\t" . '<td class="center" ' . $data_value . '="4">';
$body .= PHP_EOL . "\t\t\t\t" . '<span class="status-metro status-trashed" title="<?php echo JText:'.':_(' . "'" . $this->langPrefix . "_TRASHED'" . '); ?>">'; $body .= PHP_EOL . "\t\t\t\t" . '<span class="status-metro status-trashed" title="<?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_TRASHED'" . '); ?>">';
$body .= PHP_EOL . "\t\t\t\t\t" . '<?php echo JText:'.':_(' . "'" . $this->langPrefix . "_TRASHED'" . '); ?>'; $body .= PHP_EOL . "\t\t\t\t\t" . '<?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_TRASHED'" . '); ?>';
$body .= PHP_EOL . "\t\t\t\t" . '</span>'; $body .= PHP_EOL . "\t\t\t\t" . '</span>';
$body .= PHP_EOL . "\t\t\t" . '</td>'; $body .= PHP_EOL . "\t\t\t" . '</td>';
$body .= PHP_EOL . "\t\t" . '<?php endif; ?>'; $body .= PHP_EOL . "\t\t" . '<?php endif; ?>';
@ -7679,7 +7673,7 @@ class Interpretation extends Fields
$body .= PHP_EOL . '</table>'; $body .= PHP_EOL . '</table>';
$body .= PHP_EOL . '<?php else: ?>'; $body .= PHP_EOL . '<?php else: ?>';
$body .= PHP_EOL . "\t" . '<div class="alert alert-no-items">'; $body .= PHP_EOL . "\t" . '<div class="alert alert-no-items">';
$body .= PHP_EOL . "\t\t" . '<?php echo JText:'.':_(' . "'JGLOBAL_NO_MATCHING_RESULTS'" . '); ?>'; $body .= PHP_EOL . "\t\t" . '<?php echo JText:' . ':_(' . "'JGLOBAL_NO_MATCHING_RESULTS'" . '); ?>';
$body .= PHP_EOL . "\t" . '</div>'; $body .= PHP_EOL . "\t" . '</div>';
$body .= PHP_EOL . '<?php endif; ?>'; $body .= PHP_EOL . '<?php endif; ?>';
// return the build // return the build
@ -7728,12 +7722,12 @@ class Interpretation extends Fields
// add the new buttons // add the new buttons
if ($addNewButon == 1 || $addNewButon == 2) if ($addNewButon == 1 || $addNewButon == 2)
{ {
$head .= PHP_EOL . $tabB . "\t" . '<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText:'.':_(' . "'" . $this->langPrefix . "_NEW'" . '); ?></a>'; $head .= PHP_EOL . $tabB . "\t" . '<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_NEW'" . '); ?></a>';
} }
// add the close and new button // add the close and new button
if ($addNewButon == 2 || $addNewButon == 3) if ($addNewButon == 2 || $addNewButon == 3)
{ {
$head .= PHP_EOL . $tabB . "\t" . '<a class="btn btn-small" onclick="Joomla.submitbutton(\'' . $refview . '.cancel\');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo JText:'.':_(' . "'" . $this->langPrefix . "_CLOSE_NEW'" . '); ?></a>'; $head .= PHP_EOL . $tabB . "\t" . '<a class="btn btn-small" onclick="Joomla.submitbutton(\'' . $refview . '.cancel\');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo JText:' . ':_(' . "'" . $this->langPrefix . "_CLOSE_NEW'" . '); ?></a>';
} }
// close group button if needed // close group button if needed
if ($addNewButon == 2) if ($addNewButon == 2)
@ -7798,7 +7792,7 @@ class Interpretation extends Fields
$firstLink = false; $firstLink = false;
} }
$head .= PHP_EOL . "\t\t<th" . $setin . $htmlFix . ">"; $head .= PHP_EOL . "\t\t<th" . $setin . $htmlFix . ">";
$head .= PHP_EOL . "\t\t\t<?php echo JText:".":_('" . $item['lang'] . "'); ?>"; $head .= PHP_EOL . "\t\t\t<?php echo JText:" . ":_('" . $item['lang'] . "'); ?>";
$head .= PHP_EOL . "\t\t</th>"; $head .= PHP_EOL . "\t\t</th>";
$controller++; $controller++;
} }
@ -7807,10 +7801,10 @@ class Interpretation extends Fields
$data_type = (2 == $this->footableVersion) ? 'data-type="numeric"' : 'data-type="number"'; $data_type = (2 == $this->footableVersion) ? 'data-type="numeric"' : 'data-type="number"';
// set default // set default
$head .= PHP_EOL . "\t\t" . '<th width="10" ' . $data_hide . '>'; $head .= PHP_EOL . "\t\t" . '<th width="10" ' . $data_hide . '>';
$head .= PHP_EOL . "\t\t\t<?php echo JText:".":_('" . $statusLangName . "'); ?>"; $head .= PHP_EOL . "\t\t\t<?php echo JText:" . ":_('" . $statusLangName . "'); ?>";
$head .= PHP_EOL . "\t\t</th>"; $head .= PHP_EOL . "\t\t</th>";
$head .= PHP_EOL . "\t\t" . '<th width="5" ' . $data_type . ' ' . $data_hide . '>'; $head .= PHP_EOL . "\t\t" . '<th width="5" ' . $data_type . ' ' . $data_hide . '>';
$head .= PHP_EOL . "\t\t\t<?php echo JText:".":_('" . $idLangName . "'); ?>"; $head .= PHP_EOL . "\t\t\t<?php echo JText:" . ":_('" . $idLangName . "'); ?>";
$head .= PHP_EOL . "\t\t</th>"; $head .= PHP_EOL . "\t\t</th>";
$head .= PHP_EOL . "\t</tr>"; $head .= PHP_EOL . "\t</tr>";
$head .= PHP_EOL . "</thead>"; $head .= PHP_EOL . "</thead>";
@ -8173,7 +8167,7 @@ class Interpretation extends Fields
$method[] = PHP_EOL . PHP_EOL . "\tpublic function redirectTo" . ComponentbuilderHelper::safeString($custom_button['link'], 'F') . "()"; $method[] = PHP_EOL . PHP_EOL . "\tpublic function redirectTo" . ComponentbuilderHelper::safeString($custom_button['link'], 'F') . "()";
$method[] = "\t{"; $method[] = "\t{";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " Check for request forgeries"; $method[] = "\t\t//" . $this->setLine(__LINE__) . " Check for request forgeries";
$method[] = "\t\tJSession::checkToken() or die(JText:".":_('JINVALID_TOKEN'));"; $method[] = "\t\tJSession::checkToken() or die(JText:" . ":_('JINVALID_TOKEN'));";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " check if export is allowed for this user."; $method[] = "\t\t//" . $this->setLine(__LINE__) . " check if export is allowed for this user.";
$method[] = "\t\t\$user = JFactory::getUser();"; $method[] = "\t\t\$user = JFactory::getUser();";
$method[] = "\t\tif (\$user->authorise('" . $custom_button['link'] . ".access', 'com_" . $this->fileContentStatic['###component###'] . "'))"; $method[] = "\t\tif (\$user->authorise('" . $custom_button['link'] . ".access', 'com_" . $this->fileContentStatic['###component###'] . "'))";
@ -8189,7 +8183,7 @@ class Interpretation extends Fields
$method[] = "\t\t\treturn;"; $method[] = "\t\t\treturn;";
$method[] = "\t\t}"; $method[] = "\t\t}";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " Redirect to the list screen with error."; $method[] = "\t\t//" . $this->setLine(__LINE__) . " Redirect to the list screen with error.";
$method[] = "\t\t\$message = JText:".":_('" . $this->langPrefix . "_ACCESS_TO_" . $custom_button['NAME'] . "_FAILED');"; $method[] = "\t\t\$message = JText:" . ":_('" . $this->langPrefix . "_ACCESS_TO_" . $custom_button['NAME'] . "_FAILED');";
$method[] = "\t\t\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $viewName_list . "', false), \$message, 'error');"; $method[] = "\t\t\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $viewName_list . "', false), \$message, 'error');";
$method[] = "\t\treturn;"; $method[] = "\t\treturn;";
$method[] = "\t}"; $method[] = "\t}";
@ -8266,7 +8260,7 @@ class Interpretation extends Fields
$query .= PHP_EOL . "\t\t}"; $query .= PHP_EOL . "\t\t}";
$query .= PHP_EOL . "\t\treturn false;"; $query .= PHP_EOL . "\t\treturn false;";
$query .= PHP_EOL . "\t}"; $query .= PHP_EOL . "\t}";
// get the header script // get the header script
$header = ComponentbuilderHelper::getDynamicScripts('headers'); $header = ComponentbuilderHelper::getDynamicScripts('headers');
@ -8289,7 +8283,7 @@ class Interpretation extends Fields
$method[] = PHP_EOL . PHP_EOL . "\tpublic function exportData()"; $method[] = PHP_EOL . PHP_EOL . "\tpublic function exportData()";
$method[] = "\t{"; $method[] = "\t{";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " Check for request forgeries"; $method[] = "\t\t//" . $this->setLine(__LINE__) . " Check for request forgeries";
$method[] = "\t\tJSession::checkToken() or die(JText:".":_('JINVALID_TOKEN'));"; $method[] = "\t\tJSession::checkToken() or die(JText:" . ":_('JINVALID_TOKEN'));";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " check if export is allowed for this user."; $method[] = "\t\t//" . $this->setLine(__LINE__) . " check if export is allowed for this user.";
$method[] = "\t\t\$user = JFactory::getUser();"; $method[] = "\t\t\$user = JFactory::getUser();";
$method[] = "\t\tif (\$user->authorise('" . $viewName_single . ".export', 'com_" . $this->fileContentStatic['###component###'] . "') && \$user->authorise('core.export', 'com_" . $this->fileContentStatic['###component###'] . "'))"; $method[] = "\t\tif (\$user->authorise('" . $viewName_single . ".export', 'com_" . $this->fileContentStatic['###component###'] . "') && \$user->authorise('core.export', 'com_" . $this->fileContentStatic['###component###'] . "'))";
@ -8311,7 +8305,7 @@ class Interpretation extends Fields
$method[] = "\t\t\t}"; $method[] = "\t\t\t}";
$method[] = "\t\t}"; $method[] = "\t\t}";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " Redirect to the list screen with error."; $method[] = "\t\t//" . $this->setLine(__LINE__) . " Redirect to the list screen with error.";
$method[] = "\t\t\$message = JText:".":_('" . $this->langPrefix . "_EXPORT_FAILED');"; $method[] = "\t\t\$message = JText:" . ":_('" . $this->langPrefix . "_EXPORT_FAILED');";
$method[] = "\t\t\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $viewName_list . "', false), \$message, 'error');"; $method[] = "\t\t\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $viewName_list . "', false), \$message, 'error');";
$method[] = "\t\treturn;"; $method[] = "\t\treturn;";
$method[] = "\t}"; $method[] = "\t}";
@ -8320,7 +8314,7 @@ class Interpretation extends Fields
$method[] = PHP_EOL . PHP_EOL . "\tpublic function importData()"; $method[] = PHP_EOL . PHP_EOL . "\tpublic function importData()";
$method[] = "\t{"; $method[] = "\t{";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " Check for request forgeries"; $method[] = "\t\t//" . $this->setLine(__LINE__) . " Check for request forgeries";
$method[] = "\t\tJSession::checkToken() or die(JText:".":_('JINVALID_TOKEN'));"; $method[] = "\t\tJSession::checkToken() or die(JText:" . ":_('JINVALID_TOKEN'));";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " check if import is allowed for this user."; $method[] = "\t\t//" . $this->setLine(__LINE__) . " check if import is allowed for this user.";
$method[] = "\t\t\$user = JFactory::getUser();"; $method[] = "\t\t\$user = JFactory::getUser();";
$method[] = "\t\tif (\$user->authorise('" . $viewName_single . ".import', 'com_" . $this->fileContentStatic['###component###'] . "') && \$user->authorise('core.import', 'com_" . $this->fileContentStatic['###component###'] . "'))"; $method[] = "\t\tif (\$user->authorise('" . $viewName_single . ".import', 'com_" . $this->fileContentStatic['###component###'] . "') && \$user->authorise('core.import', 'com_" . $this->fileContentStatic['###component###'] . "'))";
@ -8344,7 +8338,7 @@ class Interpretation extends Fields
{ {
$this->langContent[$this->lang][$selectImportFileNote] = 'Select the file to import data to ' . $viewName_list . '.'; $this->langContent[$this->lang][$selectImportFileNote] = 'Select the file to import data to ' . $viewName_list . '.';
} }
$method[] = "\t\t\t\t\$message = JText:".":_('" . $selectImportFileNote . "');"; $method[] = "\t\t\t\t\$message = JText:" . ":_('" . $selectImportFileNote . "');";
// if this view has custom script it must have as custom import (model, veiw, controller) // if this view has custom script it must have as custom import (model, veiw, controller)
if (isset($this->importCustomScripts[$viewName_list]) && $this->importCustomScripts[$viewName_list]) if (isset($this->importCustomScripts[$viewName_list]) && $this->importCustomScripts[$viewName_list])
{ {
@ -8358,7 +8352,7 @@ class Interpretation extends Fields
$method[] = "\t\t\t}"; $method[] = "\t\t\t}";
$method[] = "\t\t}"; $method[] = "\t\t}";
$method[] = "\t\t//" . $this->setLine(__LINE__) . " Redirect to the list screen with error."; $method[] = "\t\t//" . $this->setLine(__LINE__) . " Redirect to the list screen with error.";
$method[] = "\t\t\$message = JText:".":_('" . $this->langPrefix . "_IMPORT_FAILED');"; $method[] = "\t\t\$message = JText:" . ":_('" . $this->langPrefix . "_IMPORT_FAILED');";
$method[] = "\t\t\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $viewName_list . "', false), \$message, 'error');"; $method[] = "\t\t\$this->setRedirect(JRoute::_('index.php?option=com_" . $this->fileContentStatic['###component###'] . "&view=" . $viewName_list . "', false), \$message, 'error');";
$method[] = "\t\treturn;"; $method[] = "\t\treturn;";
$method[] = "\t}"; $method[] = "\t}";
@ -8678,7 +8672,7 @@ class Interpretation extends Fields
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);"; $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);"; $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));"; $addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:".":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\""; $addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
$addButton[] = "\t\t\t\t\thref=\"index.php?option=com_" . $this->fileContentStatic['###component###'] . "&amp;view=" . $targetView . "&amp;layout=edit'.\$ref.'\" >"; $addButton[] = "\t\t\t\t\thref=\"index.php?option=com_" . $this->fileContentStatic['###component###'] . "&amp;view=" . $targetView . "&amp;layout=edit'.\$ref.'\" >";
$addButton[] = "\t\t\t\t\t<span class=\"icon-new icon-white\"></span></a>';"; $addButton[] = "\t\t\t\t\t<span class=\"icon-new icon-white\"></span></a>';";
$addButton[] = "\t\t\t}"; $addButton[] = "\t\t\t}";
@ -8699,7 +8693,7 @@ class Interpretation extends Fields
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);"; $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);"; $addButton[] = "\t\t\t\t\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));"; $addButton[] = "\t\t\t\t\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:".":sprintf('" . $this->langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >"; $addButton[] = "\t\t\t\t\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
$addButton[] = "\t\t\t\t\t<span class=\"icon-edit\"></span></a>';"; $addButton[] = "\t\t\t\t\t<span class=\"icon-edit\"></span></a>';";
$addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build script"; $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build script";
$addButton[] = "\t\t\t\t\$script[] = \""; $addButton[] = "\t\t\t\t\$script[] = \"";
@ -10051,7 +10045,7 @@ class Interpretation extends Fields
$function[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Translate the " . $filter['code'] . " selection"; $function[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Translate the " . $filter['code'] . " selection";
$function[] = "\t\t\t\t\$text = \$model->selectionTranslation(\$" . $filter['code'] . ",'" . $filter['code'] . "');"; $function[] = "\t\t\t\t\$text = \$model->selectionTranslation(\$" . $filter['code'] . ",'" . $filter['code'] . "');";
$function[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Now add the " . $filter['code'] . " and its text to the options array"; $function[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " Now add the " . $filter['code'] . " and its text to the options array";
$function[] = "\t\t\t\t\$_filter[] = JHtml::_('select.option', \$" . $filter['code'] . ", JText:".":_(\$text));"; $function[] = "\t\t\t\t\$_filter[] = JHtml::_('select.option', \$" . $filter['code'] . ", JText:" . ":_(\$text));";
} }
elseif ($filter['type'] === 'user') elseif ($filter['type'] === 'user')
{ {
@ -10122,7 +10116,7 @@ class Interpretation extends Fields
$otherFilter[] = "\t\t{"; $otherFilter[] = "\t\t{";
$otherFilter[] = "\t\t\t//" . $this->setLine(__LINE__) . " " . $CodeName . " Filter"; $otherFilter[] = "\t\t\t//" . $this->setLine(__LINE__) . " " . $CodeName . " Filter";
$otherFilter[] = "\t\t\tJHtmlSidebar::addFilter("; $otherFilter[] = "\t\t\tJHtmlSidebar::addFilter(";
$otherFilter[] = "\t\t\t\t'- Select '.JText:".":_('" . $filter['lang'] . "').' -',"; $otherFilter[] = "\t\t\t\t'- Select '.JText:" . ":_('" . $filter['lang'] . "').' -',";
$otherFilter[] = "\t\t\t\t'filter_" . $filter['code'] . "',"; $otherFilter[] = "\t\t\t\t'filter_" . $filter['code'] . "',";
$otherFilter[] = "\t\t\t\tJHtml::_('select.options', \$this->" . $codeName . "Options, 'value', 'text', \$this->state->get('filter." . $filter['code'] . "'))"; $otherFilter[] = "\t\t\t\tJHtml::_('select.options', \$this->" . $codeName . "Options, 'value', 'text', \$this->state->get('filter." . $filter['code'] . "'))";
$otherFilter[] = "\t\t\t);"; $otherFilter[] = "\t\t\t);";
@ -10131,7 +10125,7 @@ class Interpretation extends Fields
$otherFilter[] = "\t\t\t{"; $otherFilter[] = "\t\t\t{";
$otherFilter[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $CodeName . " Batch Selection"; $otherFilter[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $CodeName . " Batch Selection";
$otherFilter[] = "\t\t\t\tJHtmlBatch_::addListSelection("; $otherFilter[] = "\t\t\t\tJHtmlBatch_::addListSelection(";
$otherFilter[] = "\t\t\t\t\t'- Keep Original '.JText:".":_('" . $filter['lang'] . "').' -',"; $otherFilter[] = "\t\t\t\t\t'- Keep Original '.JText:" . ":_('" . $filter['lang'] . "').' -',";
$otherFilter[] = "\t\t\t\t\t'batch[" . $filter['code'] . "]',"; $otherFilter[] = "\t\t\t\t\t'batch[" . $filter['code'] . "]',";
$otherFilter[] = "\t\t\t\t\tJHtml::_('select.options', \$this->" . $codeName . "Options, 'value', 'text')"; $otherFilter[] = "\t\t\t\t\tJHtml::_('select.options', \$this->" . $codeName . "Options, 'value', 'text')";
$otherFilter[] = "\t\t\t\t);"; $otherFilter[] = "\t\t\t\t);";
@ -10156,7 +10150,7 @@ class Interpretation extends Fields
$otherFilter[] = "\t\t{"; $otherFilter[] = "\t\t{";
$otherFilter[] = "\t\t\t//" . $this->setLine(__LINE__) . " " . $Codename . " Filter"; $otherFilter[] = "\t\t\t//" . $this->setLine(__LINE__) . " " . $Codename . " Filter";
$otherFilter[] = "\t\t\tJHtmlSidebar::addFilter("; $otherFilter[] = "\t\t\tJHtmlSidebar::addFilter(";
$otherFilter[] = "\t\t\t\t'- Select '.JText:".":_('" . $filter['lang'] . "').' -',"; $otherFilter[] = "\t\t\t\t'- Select '.JText:" . ":_('" . $filter['lang'] . "').' -',";
$otherFilter[] = "\t\t\t\t'filter_" . $filter['code'] . "',"; $otherFilter[] = "\t\t\t\t'filter_" . $filter['code'] . "',";
$otherFilter[] = "\t\t\t\tJHtml::_('select.options', \$this->" . $filter['code'] . "Options, 'value', 'text', \$this->state->get('filter." . $filter['code'] . "'))"; $otherFilter[] = "\t\t\t\tJHtml::_('select.options', \$this->" . $filter['code'] . "Options, 'value', 'text', \$this->state->get('filter." . $filter['code'] . "'))";
$otherFilter[] = "\t\t\t);"; $otherFilter[] = "\t\t\t);";
@ -10165,7 +10159,7 @@ class Interpretation extends Fields
$otherFilter[] = "\t\t\t{"; $otherFilter[] = "\t\t\t{";
$otherFilter[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $Codename . " Batch Selection"; $otherFilter[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $Codename . " Batch Selection";
$otherFilter[] = "\t\t\t\tJHtmlBatch_::addListSelection("; $otherFilter[] = "\t\t\t\tJHtmlBatch_::addListSelection(";
$otherFilter[] = "\t\t\t\t\t'- Keep Original '.JText:".":_('" . $filter['lang'] . "').' -',"; $otherFilter[] = "\t\t\t\t\t'- Keep Original '.JText:" . ":_('" . $filter['lang'] . "').' -',";
$otherFilter[] = "\t\t\t\t\t'batch[" . $filter['code'] . "]',"; $otherFilter[] = "\t\t\t\t\t'batch[" . $filter['code'] . "]',";
$otherFilter[] = "\t\t\t\t\tJHtml::_('select.options', \$this->" . $filter['code'] . "Options, 'value', 'text')"; $otherFilter[] = "\t\t\t\t\tJHtml::_('select.options', \$this->" . $filter['code'] . "Options, 'value', 'text')";
$otherFilter[] = "\t\t\t\t);"; $otherFilter[] = "\t\t\t\t);";
@ -10203,7 +10197,7 @@ class Interpretation extends Fields
$filter = array(); $filter = array();
$filter[] = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Category Filter."; $filter[] = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Category Filter.";
$filter[] = "\t\tJHtmlSidebar::addFilter("; $filter[] = "\t\tJHtmlSidebar::addFilter(";
$filter[] = "\t\t\tJText:".":_('JOPTION_SELECT_CATEGORY'),"; $filter[] = "\t\t\tJText:" . ":_('JOPTION_SELECT_CATEGORY'),";
$filter[] = "\t\t\t'filter_category_id',"; $filter[] = "\t\t\t'filter_category_id',";
$filter[] = "\t\t\tJHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text', \$this->state->get('filter.category_id'))"; $filter[] = "\t\t\tJHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text', \$this->state->get('filter.category_id'))";
$filter[] = "\t\t);"; $filter[] = "\t\t);";
@ -10213,7 +10207,7 @@ class Interpretation extends Fields
$filter[] = "\t\t{"; $filter[] = "\t\t{";
$filter[] = "\t\t\t//" . $this->setLine(__LINE__) . " Category Batch selection."; $filter[] = "\t\t\t//" . $this->setLine(__LINE__) . " Category Batch selection.";
$filter[] = "\t\t\tJHtmlBatch_::addListSelection("; $filter[] = "\t\t\tJHtmlBatch_::addListSelection(";
$filter[] = "\t\t\t\tJText:".":_('COM_" . $COMONENT . "_KEEP_ORIGINAL_CATEGORY'),"; $filter[] = "\t\t\t\tJText:" . ":_('COM_" . $COMONENT . "_KEEP_ORIGINAL_CATEGORY'),";
$filter[] = "\t\t\t\t'batch[category]',"; $filter[] = "\t\t\t\t'batch[category]',";
$filter[] = "\t\t\t\tJHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text')"; $filter[] = "\t\t\t\tJHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text')";
$filter[] = "\t\t\t);"; $filter[] = "\t\t\t);";
@ -11302,7 +11296,7 @@ class Interpretation extends Fields
// build toolbar // build toolbar
$toolBar = "JFactory::getApplication()->input->set('hidemainmenu', true);"; $toolBar = "JFactory::getApplication()->input->set('hidemainmenu', true);";
$toolBar .= PHP_EOL . "\t\tJToolBarHelper::title(JText:".":_('" . $viewNameLang_readonly . "'), '" . $viewName . "');"; $toolBar .= PHP_EOL . "\t\tJToolBarHelper::title(JText:" . ":_('" . $viewNameLang_readonly . "'), '" . $viewName . "');";
$toolBar .= PHP_EOL . "\t\tJToolBarHelper::cancel('" . $viewName . ".cancel', 'JTOOLBAR_CLOSE');"; $toolBar .= PHP_EOL . "\t\tJToolBarHelper::cancel('" . $viewName . ".cancel', 'JTOOLBAR_CLOSE');";
} }
else else
@ -11318,7 +11312,7 @@ class Interpretation extends Fields
$toolBar .= PHP_EOL . "\t\t\$user = JFactory::getUser();"; $toolBar .= PHP_EOL . "\t\t\$user = JFactory::getUser();";
$toolBar .= PHP_EOL . "\t\t\$userId = \$user->id;"; $toolBar .= PHP_EOL . "\t\t\$userId = \$user->id;";
$toolBar .= PHP_EOL . "\t\t\$isNew = \$this->item->id == 0;"; $toolBar .= PHP_EOL . "\t\t\$isNew = \$this->item->id == 0;";
$toolBar .= PHP_EOL . PHP_EOL . "\t\tJToolbarHelper::title( JText:".":_(\$isNew ? '" . $viewNameLang_new . "' : '" . $viewNameLang_edit . "'), 'pencil-2 article-add');"; $toolBar .= PHP_EOL . PHP_EOL . "\t\tJToolbarHelper::title( JText:" . ":_(\$isNew ? '" . $viewNameLang_new . "' : '" . $viewNameLang_edit . "'), 'pencil-2 article-add');";
$toolBar .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Built the actions for new and existing records."; $toolBar .= PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Built the actions for new and existing records.";
$toolBar .= PHP_EOL . "\t\tif (\$this->refid || \$this->ref)"; $toolBar .= PHP_EOL . "\t\tif (\$this->refid || \$this->ref)";
$toolBar .= PHP_EOL . "\t\t{"; $toolBar .= PHP_EOL . "\t\t{";
@ -11574,8 +11568,8 @@ class Interpretation extends Fields
$donelist = array('sorting', 'published'); $donelist = array('sorting', 'published');
// set the default first // set the default first
$fields = "return array("; $fields = "return array(";
$fields .= PHP_EOL . "\t\t\t'a.sorting' => JText:".":_('JGRID_HEADING_ORDERING')"; $fields .= PHP_EOL . "\t\t\t'a.sorting' => JText:" . ":_('JGRID_HEADING_ORDERING')";
$fields .= "," . PHP_EOL . "\t\t\t'a.published' => JText:".":_('JSTATUS')"; $fields .= "," . PHP_EOL . "\t\t\t'a.published' => JText:" . ":_('JSTATUS')";
// add the rest of the set filters // add the rest of the set filters
if (isset($this->sortBuilder[$view]) && ComponentbuilderHelper::checkArray($this->sortBuilder[$view])) if (isset($this->sortBuilder[$view]) && ComponentbuilderHelper::checkArray($this->sortBuilder[$view]))
@ -11586,20 +11580,20 @@ class Interpretation extends Fields
{ {
if ($filter['type'] === 'category') if ($filter['type'] === 'category')
{ {
$fields .= "," . PHP_EOL . "\t\t\t'c.category_title' => JText:".":_('" . $filter['lang'] . "')"; $fields .= "," . PHP_EOL . "\t\t\t'c.category_title' => JText:" . ":_('" . $filter['lang'] . "')";
} }
elseif (ComponentbuilderHelper::checkArray($filter['custom'])) elseif (ComponentbuilderHelper::checkArray($filter['custom']))
{ {
$fields .= "," . PHP_EOL . "\t\t\t'" . $filter['custom']['db'] . "." . $filter['custom']['text'] . "' => JText:".":_('" . $filter['lang'] . "')"; $fields .= "," . PHP_EOL . "\t\t\t'" . $filter['custom']['db'] . "." . $filter['custom']['text'] . "' => JText:" . ":_('" . $filter['lang'] . "')";
} }
else else
{ {
$fields .= "," . PHP_EOL . "\t\t\t'a." . $filter['code'] . "' => JText:".":_('" . $filter['lang'] . "')"; $fields .= "," . PHP_EOL . "\t\t\t'a." . $filter['code'] . "' => JText:" . ":_('" . $filter['lang'] . "')";
} }
} }
} }
} }
$fields .= "," . PHP_EOL . "\t\t\t'a.id' => JText:".":_('JGRID_HEADING_ID')"; $fields .= "," . PHP_EOL . "\t\t\t'a.id' => JText:" . ":_('JGRID_HEADING_ID')";
$fields .= PHP_EOL . "\t\t);"; $fields .= PHP_EOL . "\t\t);";
// return fields // return fields
return $fields; return $fields;
@ -11671,7 +11665,7 @@ class Interpretation extends Fields
// encryption switches // encryption switches
foreach ($this->cryptionTypes as $cryptionType) foreach ($this->cryptionTypes as $cryptionType)
{ {
${$cryptionType.'Crypt'} = false; ${$cryptionType . 'Crypt'} = false;
} }
// setup correct core target // setup correct core target
$coreLoad = false; $coreLoad = false;
@ -11802,11 +11796,11 @@ class Interpretation extends Fields
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t{"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t{";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\tif (\$counter == 0)"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\tif (\$counter == 0)";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t{"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t{";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t\t\$" . $item['name'] . "Names .= JText:".":_(\$this->selectionTranslation(\$" . $item['name'] . ", '" . $item['name'] . "'));"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t\t\$" . $item['name'] . "Names .= JText:" . ":_(\$this->selectionTranslation(\$" . $item['name'] . ", '" . $item['name'] . "'));";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t}"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t}";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\telse"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\telse";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t{"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t{";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t\t\$" . $item['name'] . "Names .= ', '.JText:".":_(\$this->selectionTranslation(\$" . $item['name'] . ", '" . $item['name'] . "'));"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t\t\$" . $item['name'] . "Names .= ', '.JText:" . ":_(\$this->selectionTranslation(\$" . $item['name'] . ", '" . $item['name'] . "'));";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t}"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t}";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t\$counter++;"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t\t\$counter++;";
$fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t}"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t}";
@ -11947,12 +11941,12 @@ class Interpretation extends Fields
$script = ''; $script = '';
foreach ($this->cryptionTypes as $cryptionType) foreach ($this->cryptionTypes as $cryptionType)
{ {
if (${$cryptionType.'Crypt'}) if (${$cryptionType . 'Crypt'})
{ {
$script .= PHP_EOL . PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Get the ".$cryptionType." encryption key."; $script .= PHP_EOL . PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Get the " . $cryptionType . " encryption key.";
$script .= PHP_EOL . "\t" . $tab . "\t\$".$cryptionType."key = " . $Component . "Helper::getCryptKey('".$cryptionType."');"; $script .= PHP_EOL . "\t" . $tab . "\t\$" . $cryptionType . "key = " . $Component . "Helper::getCryptKey('" . $cryptionType . "');";
$script .= PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Get the encryption object."; $script .= PHP_EOL . "\t" . $tab . "\t//" . $this->setLine(__LINE__) . " Get the encryption object.";
$script .= PHP_EOL . "\t" . $tab . "\t\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);"; $script .= PHP_EOL . "\t" . $tab . "\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
} }
} }
// add the encryption script // add the encryption script
@ -12295,7 +12289,7 @@ class Interpretation extends Fields
$display[] = '<div id="j-main-container">'; $display[] = '<div id="j-main-container">';
$display[] = "\t" . '<div class="form-horizontal">'; $display[] = "\t" . '<div class="form-horizontal">';
$display[] = "\t<?php echo JHtml::_('bootstrap.startTabSet', 'cpanel_tab', array('active' => 'cpanel')); ?>"; $display[] = "\t<?php echo JHtml::_('bootstrap.startTabSet', 'cpanel_tab', array('active' => 'cpanel')); ?>";
$display[] = PHP_EOL . "\t\t<?php echo JHtml::_('bootstrap.addTab', 'cpanel_tab', 'cpanel', JText:".":_('cPanel', true)); ?>"; $display[] = PHP_EOL . "\t\t<?php echo JHtml::_('bootstrap.addTab', 'cpanel_tab', 'cpanel', JText:" . ":_('cPanel', true)); ?>";
$display[] = "\t\t" . '<div class="row-fluid">'; $display[] = "\t\t" . '<div class="row-fluid">';
// set the tab to insure correct spacing // set the tab to insure correct spacing
$tab = "\t\t\t"; $tab = "\t\t\t";
@ -12331,7 +12325,7 @@ class Interpretation extends Fields
foreach ($builder as $tabname => $accordians) foreach ($builder as $tabname => $accordians)
{ {
$alias = ComponentbuilderHelper::safeString($tabname); $alias = ComponentbuilderHelper::safeString($tabname);
$display[] = PHP_EOL . "\t\t<?php echo JHtml::_('bootstrap.addTab', 'cpanel_tab', '" . $alias . "', JText:".":_('" . $tabname . "', true)); ?>"; $display[] = PHP_EOL . "\t\t<?php echo JHtml::_('bootstrap.addTab', 'cpanel_tab', '" . $alias . "', JText:" . ":_('" . $tabname . "', true)); ?>";
$display[] = "\t\t" . '<div class="row-fluid">'; $display[] = "\t\t" . '<div class="row-fluid">';
$display[] = $tab . '<div class="span12">'; $display[] = $tab . '<div class="span12">';
$display[] = $tab . "\t<?php echo JHtml::_('bootstrap.startAccordion', '" . $alias . "_accordian', array('active' => '" . $alias . "_one')); ?>"; $display[] = $tab . "\t<?php echo JHtml::_('bootstrap.startAccordion', '" . $alias . "_accordian', array('active' => '" . $alias . "_one')); ?>";
@ -12443,7 +12437,7 @@ class Interpretation extends Fields
if ($type) if ($type)
{ {
// icon builder loader // icon builder loader
$this->iconBuilder[$type .".". $nameList] = 'images/' . $menu['icon']; $this->iconBuilder[$type . "." . $nameList] = 'images/' . $menu['icon'];
} }
else else
{ {
@ -12454,34 +12448,34 @@ class Interpretation extends Fields
$langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper; $langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper;
// add to lang // add to lang
$this->langContent[$this->lang][$langKey] = $langName; $this->langContent[$this->lang][$langKey] = $langName;
// if this is a link build the icon values with pipe // if this is a link build the icon values with pipe
if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link'])) if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link']))
{ {
// set icon // set icon
if ($counter == 0) if ($counter == 0)
{ {
$counter++; $counter++;
$icon .= "'".$type."||".$nameList."||".$menu['link']."'"; $icon .= "'" . $type . "||" . $nameList . "||" . $menu['link'] . "'";
} }
else else
{ {
$counter++; $counter++;
$icon .= ", '".$type."||".$nameList."||".$menu['link']."'"; $icon .= ", '" . $type . "||" . $nameList . "||" . $menu['link'] . "'";
} }
} }
else else
{ {
// set icon // set icon
if ($counter == 0) if ($counter == 0)
{ {
$counter++; $counter++;
$icon .= "'" . $type .".". $nameList . "'"; $icon .= "'" . $type . "." . $nameList . "'";
} }
else else
{ {
$counter++; $counter++;
$icon .= ", '" . $type .".". $nameList . "'"; $icon .= ", '" . $type . "." . $nameList . "'";
} }
} }
} }
@ -12491,7 +12485,7 @@ class Interpretation extends Fields
if ($type) if ($type)
{ {
// icon builder loader // icon builder loader
$this->iconBuilder[$type .".". $nameList] = 'images/' . $menu['icon']; $this->iconBuilder[$type . "." . $nameList] = 'images/' . $menu['icon'];
} }
else else
{ {
@ -12502,17 +12496,17 @@ class Interpretation extends Fields
$langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper; $langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper;
// add to lang // add to lang
$this->langContent[$this->lang][$langKey] = $langName; $this->langContent[$this->lang][$langKey] = $langName;
// if this is a link build the icon values with pipe // if this is a link build the icon values with pipe
if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link'])) if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link']))
{ {
// set icon // set icon
$this->lastCustomDashboardIcon[$nr] = ", '".$type."||".$nameList."||".$menu['link']."'"; $this->lastCustomDashboardIcon[$nr] = ", '" . $type . "||" . $nameList . "||" . $menu['link'] . "'";
} }
else else
{ {
// set icon // set icon
$this->lastCustomDashboardIcon[$nr] = ", '" . $type .".". $nameList . "'"; $this->lastCustomDashboardIcon[$nr] = ", '" . $type . "." . $nameList . "'";
} }
} }
} }
@ -12532,7 +12526,7 @@ class Interpretation extends Fields
// set default dashboard // set default dashboard
if (!ComponentbuilderHelper::checkString($this->dynamicDashboard)) if (!ComponentbuilderHelper::checkString($this->dynamicDashboard))
{ {
$menus .= "JHtmlSidebar::addEntry(JText:".":_('" . $lang . "_DASHBOARD'), 'index.php?option=com_" . $codeName . "&view=" . $codeName . "', \$submenu === '" . $codeName . "');"; $menus .= "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_DASHBOARD'), 'index.php?option=com_" . $codeName . "&view=" . $codeName . "', \$submenu === '" . $codeName . "');";
$this->langContent[$this->lang][$lang . '_DASHBOARD'] = 'Dashboard'; $this->langContent[$this->lang][$lang . '_DASHBOARD'] = 'Dashboard';
} }
$catArray = array(); $catArray = array();
@ -12561,7 +12555,7 @@ class Interpretation extends Fields
} }
$nameList = ComponentbuilderHelper::safeString($view['settings']->name_list); $nameList = ComponentbuilderHelper::safeString($view['settings']->name_list);
$nameUpper = ComponentbuilderHelper::safeString($view['settings']->name_list, 'U'); $nameUpper = ComponentbuilderHelper::safeString($view['settings']->name_list, 'U');
$menus .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:".":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');"; $menus .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');";
$this->langContent[$this->lang][$lang . "_" . $nameUpper] = $view['settings']->name_list; $this->langContent[$this->lang][$lang . "_" . $nameUpper] = $view['settings']->name_list;
// check if category has another name // check if category has another name
if (isset($this->catOtherName[$nameList]) && ComponentbuilderHelper::checkArray($this->catOtherName[$nameList])) if (isset($this->catOtherName[$nameList]) && ComponentbuilderHelper::checkArray($this->catOtherName[$nameList]))
@ -12574,7 +12568,7 @@ class Interpretation extends Fields
} }
if (isset($this->categoryBuilder[$nameList]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$nameList]) && !in_array($otherViews, $catArray)) if (isset($this->categoryBuilder[$nameList]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$nameList]) && !in_array($otherViews, $catArray))
{ {
$menus .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:".":_('" . $this->categoryBuilder[$nameList]['name'] . "'), 'index.php?option=com_categories&view=categories&extension=com_" . $codeName . "." . $otherViews . "', \$submenu === 'categories." . $otherViews . "');"; $menus .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $this->categoryBuilder[$nameList]['name'] . "'), 'index.php?option=com_categories&view=categories&extension=com_" . $codeName . "." . $otherViews . "', \$submenu === 'categories." . $otherViews . "');";
// make sure we add a category only once // make sure we add a category only once
$catArray[] = $otherViews; $catArray[] = $otherViews;
} }
@ -12680,13 +12674,13 @@ class Interpretation extends Fields
$this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name;
// add custom menu // add custom menu
$custom .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:".":_('" . $lang . "_" . $nameUpper . "'), '" . $menu['link'] . "', \$submenu === '" . $nameList . "');"; $custom .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), '" . $menu['link'] . "', \$submenu === '" . $nameList . "');";
} }
else else
{ {
$this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name;
// add custom menu // add custom menu
$custom .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:".":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');"; $custom .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');";
} }
// check if the item has permissions. // check if the item has permissions.
$custom .= PHP_EOL . "\t\t}"; $custom .= PHP_EOL . "\t\t}";
@ -12724,13 +12718,13 @@ class Interpretation extends Fields
{ {
$this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name;
// add custom menu // add custom menu
$this->lastCustomSubMenu[$nr] .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:".":_('" . $lang . "_" . $nameUpper . "'), '" . $menu['link'] . "', \$submenu === '" . $nameList . "');"; $this->lastCustomSubMenu[$nr] .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), '" . $menu['link'] . "', \$submenu === '" . $nameList . "');";
} }
else else
{ {
$this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name;
// add custom menu // add custom menu
$this->lastCustomSubMenu[$nr] .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:".":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');"; $this->lastCustomSubMenu[$nr] .= PHP_EOL . "\t\t" . $tab . "JHtmlSidebar::addEntry(JText:" . ":_('" . $lang . "_" . $nameUpper . "'), 'index.php?option=com_" . $codeName . "&view=" . $nameList . "', \$submenu === '" . $nameList . "');";
} }
// check if the item has permissions. // check if the item has permissions.
$this->lastCustomSubMenu[$nr] .= PHP_EOL . "\t\t}"; $this->lastCustomSubMenu[$nr] .= PHP_EOL . "\t\t}";
@ -14472,7 +14466,7 @@ function vdm_dkim() {
$this->configFieldSets[] = "\t\t\t" . 'size="60"'; $this->configFieldSets[] = "\t\t\t" . 'size="60"';
$this->configFieldSets[] = "\t\t\t" . 'default=""'; $this->configFieldSets[] = "\t\t\t" . 'default=""';
$this->configFieldSets[] = "\t\t/>"; $this->configFieldSets[] = "\t\t/>";
} }
if (isset($this->mediumEncryption) && $this->mediumEncryption) if (isset($this->mediumEncryption) && $this->mediumEncryption)
{ {
// set field lang // set field lang

View File

@ -752,13 +752,13 @@ class Infusion extends Interpretation
// ###UPDATE_VERSION_MYSQL### // ###UPDATE_VERSION_MYSQL###
$this->setVersionController(); $this->setVersionController();
// only set these if default dashboard it used // only set these if default dashboard it used
if (!ComponentbuilderHelper::checkString($this->dynamicDashboard)) if (!ComponentbuilderHelper::checkString($this->dynamicDashboard))
{ {
// ###DASHBOARDVIEW### // ###DASHBOARDVIEW###
$this->fileContentStatic['###DASHBOARDVIEW###'] = $this->fileContentStatic['###component###']; $this->fileContentStatic['###DASHBOARDVIEW###'] = $this->fileContentStatic['###component###'];
// ###DASHBOARDICONS### // ###DASHBOARDICONS###
$this->fileContentDynamic[$this->fileContentStatic['###component###']]['###DASHBOARDICONS###'] = $this->setDashboardIcons(); $this->fileContentDynamic[$this->fileContentStatic['###component###']]['###DASHBOARDICONS###'] = $this->setDashboardIcons();