diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php
index 05f49fc4e..ba5b314ba 100644
--- a/admin/helpers/compiler.php
+++ b/admin/helpers/compiler.php
@@ -701,4 +701,5 @@ class Compiler extends Infusion
// any help to improve this is welcome...
}
+
}
diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php
index a97e6bca3..5dc5fa352 100644
--- a/admin/helpers/compiler/a_Get.php
+++ b/admin/helpers/compiler/a_Get.php
@@ -11,7 +11,7 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.6.0
+ @version 2.6.x
@created 30th April, 2015
@package Component Builder
@subpackage compiler.php
@@ -247,10 +247,10 @@ class Get
* @var array
*/
public $langStringTargets = array(
- 'Joomla'.'.JText._(',
- 'JText:'.':script(',
- 'JText:'.':_(',
- 'JText:'.':sprintf('
+ 'Joomla' . '.JText._(',
+ 'JText:' . ':script(',
+ 'JText:' . ':_(',
+ 'JText:' . ':sprintf('
);
/**
@@ -506,7 +506,7 @@ class Get
*
* @var array
*/
- public $cryptionTypes = array('basic','medium','whmcs');
+ public $cryptionTypes = array('basic', 'medium', 'whmcs');
/**
* The WHMCS Encryption Switch
@@ -832,22 +832,22 @@ class Get
foreach ($addArrayF as $addTarget => $targetHere)
{
// set the add target data
- $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}))
+ $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 (isset($component->{$targetHere}) && ComponentbuilderHelper::checkArray($component->{$targetHere}))
{
- foreach($component->{'add'.$addTarget} as $taget)
+ foreach ($component->{'add' . $addTarget} as $taget)
{
$component->{$targetHere}[] = $taget;
}
}
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
@@ -998,7 +998,7 @@ class Get
// set hash
static $hash = 1;
// load hash
- $field['hash'] = md5($field['field'].$hash);
+ $field['hash'] = md5($field['field'] . $hash);
// increment hash
$hash++;
$field['alias'] = 0;
@@ -1086,15 +1086,15 @@ class Get
foreach ($addGlobalCss as $area)
{
// 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
{
- $this->customScriptBuilder['component_css_'.$area] = '';
+ $this->customScriptBuilder['component_css_' . $area] = '';
}
- unset($component->{'css_'.$area});
+ unset($component->{'css_' . $area});
}
// set the lang target
$this->lang = 'admin';
@@ -1195,7 +1195,7 @@ class Get
{
$component->readme = '';
}
-
+
// set lang now
$nowLang = $this->lang;
$this->lang = 'admin';
@@ -1227,13 +1227,13 @@ class Get
$this->lang = $nowLang;
// add the update/sales server FTP details if that is the expected protocol
- $serverArray = array('update_server','sales_server');
- foreach($serverArray as $server)
+ $serverArray = array('update_server', 'sales_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
- $component->{$server.'_protocol'} = ComponentbuilderHelper::getVar('server', (int) $component->{$server}, 'id', 'protocol');
+ $component->{$server . '_protocol'} = ComponentbuilderHelper::getVar('server', (int) $component->{$server}, 'id', 'protocol');
}
else
{
@@ -1241,9 +1241,9 @@ class Get
// only change this for sales server (update server can be added loacaly to the zip file)
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
@@ -1422,7 +1422,7 @@ class Get
// set hash
static $hash = 1;
// load hash
- $field['hash'] = md5($field['field'].$hash);
+ $field['hash'] = md5($field['field'] . $hash);
// increment hash
$hash++;
// set the settings
@@ -1468,12 +1468,12 @@ class Get
// check if the datatype changed
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
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
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]))
{
// 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)
{
@@ -2293,7 +2293,7 @@ class Get
}
}
// fall back to text
- return 'text';
+ return 'text';
}
/**
@@ -2308,9 +2308,9 @@ class Get
public function getFieldName(&$field, $listViewName = null)
{
// 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
$type_name = ComponentbuilderHelper::safeString($field['settings']->type_name);
@@ -2380,14 +2380,14 @@ class Get
}
}
// 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
- return $this->uniqueFieldNames[$listViewName.$field['hash']];
+ return $this->uniqueFieldNames[$listViewName . $field['hash']];
}
// fall back to global
- return $name;
+ return $name;
}
/**
@@ -2490,8 +2490,7 @@ class Get
foreach ($phpSripts as $script)
{
// add php script to the script builder
- if (isset($result->{'add_'.$script}) && $result->{'add_'.$script} == 1
- && isset($result->{$script}) && ComponentbuilderHelper::checkString($result->{$script}))
+ if (isset($result->{'add_' . $script}) && $result->{'add_' . $script} == 1 && isset($result->{$script}) && ComponentbuilderHelper::checkString($result->{$script}))
{
// move all main gets out to the customscript builder
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}));
// remove from local item
unset($result->{$script});
- unset($result->{'add_'.$script});
+ unset($result->{'add_' . $script});
}
else
{
@@ -2515,7 +2514,7 @@ class Get
{
// remove from local item
unset($result->{$script});
- unset($result->{'add_'.$script});
+ unset($result->{'add_' . $script});
}
}
// set the getmethod code name
@@ -3420,22 +3419,22 @@ class Get
foreach ($addArray as $addTarget => $targetHere)
{
// set the add target data
- $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}))
+ $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 (isset($library->{$targetHere}) && ComponentbuilderHelper::checkArray($library->{$targetHere}))
{
- foreach($library->{'add'.$addTarget} as $taget)
+ foreach ($library->{'add' . $addTarget} as $taget)
{
$library->{$targetHere}[] = $taget;
}
}
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
if ($library->how > 1)
@@ -3517,10 +3516,10 @@ class Get
// insure string is not broken
$content = str_replace('COM_###COMPONENT###', $this->langPrefix, $content);
// 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
$jsTEXT = ComponentbuilderHelper::mergeArrays($jsTEXT);
// we need to add a check to insure these JavaScript lang matchup
@@ -3532,10 +3531,10 @@ class Get
}
}
// 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
$scTEXT = ComponentbuilderHelper::mergeArrays($scTEXT);
// we need to add a check to insure these JavaScript lang matchup
@@ -3550,7 +3549,7 @@ class Get
foreach ($langStringTargets as $langStringTarget)
{
// need some special treatment here
- if ($langStringTarget === 'Joomla'.'.JText._(' || $langStringTarget === 'JText:'.':script(')
+ if ($langStringTarget === 'Joomla' . '.JText._(' || $langStringTarget === 'JText:' . ':script(')
{
continue;
}
@@ -4008,7 +4007,7 @@ class Get
}
return $string;
}
-
+
/**
* Set the external code string & load it in to string
*
@@ -4020,11 +4019,11 @@ class Get
public function setExternalCodeString($string)
{
// check if content has custom code place holder
- if (strpos($string, '[EXTERNA'.'LCODE=') !== false)
+ if (strpos($string, '[EXTERNA' . 'LCODE=') !== false)
{
// target content
$bucket = array();
- $found = ComponentbuilderHelper::getAllBetween($string, '[EXTERNA'.'LCODE=', ']');
+ $found = ComponentbuilderHelper::getAllBetween($string, '[EXTERNA' . 'LCODE=', ']');
if (ComponentbuilderHelper::checkArray($found))
{
// build local bucket
@@ -4034,8 +4033,7 @@ class Get
if ($this->user->authorise('core.admin', 'com_componentbuilder'))
{
// check if the target is valid URL or path
- if ((!filter_var($target, FILTER_VALIDATE_URL) === false && ComponentbuilderHelper::urlExists($target))
- || (JPath::clean($target) === $target && JFile::exists($target)))
+ if ((!filter_var($target, FILTER_VALIDATE_URL) === false && ComponentbuilderHelper::urlExists($target)) || (JPath::clean($target) === $target && JFile::exists($target)))
{
$this->getExternalCodeString($target, $bucket);
}
@@ -4043,7 +4041,7 @@ class Get
else
{
// set key
- $key = '[EXTERNA'.'LCODE='.$target.']';
+ $key = '[EXTERNA' . 'LCODE=' . $target . ']';
// set the notice
$this->app->enqueueMessage(JText::_('
>>
$main .= $this->setCustomViewListQuery($view, $view->code, false);
// set before items php
- if (isset($view->add_php_before_getitems) && $view->add_php_before_getitems == 1
- && isset($view->php_before_getitems) && ComponentbuilderHelper::checkString($view->php_before_getitems))
+ if (isset($view->add_php_before_getitems) && $view->add_php_before_getitems == 1 && isset($view->php_before_getitems) && ComponentbuilderHelper::checkString($view->php_before_getitems))
{
$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\$items = \$db->loadObjectList();";
// set after items php
- if (isset($view->add_php_after_getitems) && $view->add_php_after_getitems == 1
- && isset($view->php_after_getitems) && ComponentbuilderHelper::checkString($view->php_after_getitems))
+ if (isset($view->add_php_after_getitems) && $view->add_php_after_getitems == 1 && isset($view->php_after_getitems) && ComponentbuilderHelper::checkString($view->php_after_getitems))
{
$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])
{
- $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//".$this->setLine(__LINE__)." Get the encryption object.";
- $script .= PHP_EOL . "\t\t\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);".PHP_EOL;
+ $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//" . $this->setLine(__LINE__) . " Get the encryption object.";
+ $script .= PHP_EOL . "\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);" . PHP_EOL;
}
}
$methods = str_replace('###CRYPT###', $script, $methods);
@@ -2999,13 +2994,13 @@ class Interpretation extends Fields
{
if ($this->siteDecrypt[$cryptionType][$code])
{
- $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 . 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//" . $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)
@@ -4276,18 +4271,18 @@ class Interpretation extends Fields
// decryption
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 . "\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\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);";
- foreach ($this->{$cryptionType.'EncryptionBuilder'}[$view] as $baseString)
+ $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//" . $this->setLine(__LINE__) . " Get the encryption object.";
+ $script .= PHP_EOL . "\t\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
+ 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\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//" . $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}";
}
}
@@ -4368,18 +4363,18 @@ class Interpretation extends Fields
$Component = $this->fileContentStatic['###Component###'];
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 . "\t\t\$".$cryptionType."key = " . $Component . "Helper::getCryptKey('".$cryptionType."');";
+ $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//" . $this->setLine(__LINE__) . " Get the encryption object";
- $script .= PHP_EOL . "\t\t\$".$cryptionType." = new FOFEncryptAes(\$".$cryptionType."key);";
- foreach ($this->{$cryptionType.'EncryptionBuilder'}[$view] as $baseString)
+ $script .= PHP_EOL . "\t\t\$" . $cryptionType . " = new FOFEncryptAes(\$" . $cryptionType . "key);";
+ foreach ($this->{$cryptionType . 'EncryptionBuilder'}[$view] as $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\t\$data['" . $baseString . "'] = \$".$cryptionType."->encryptString(\$data['" . $baseString . "']);";
+ $script .= PHP_EOL . "\t\t\t\$data['" . $baseString . "'] = \$" . $cryptionType . "->encryptString(\$data['" . $baseString . "']);";
$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\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message.";
// TODO lang is not translated
- $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:".":_('The (" . $typeAlias . ") type alias was removed from the #__content_type table'));";
+ $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:" . ":_('The (" . $typeAlias . ") type alias was removed from the #__content_type table'));";
$script .= PHP_EOL . "\t\t\t}";
// 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\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message.";
// TODO lang is not translated
- $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:".":_('The (" . $typeAlias . ") type alias was removed from the #__contentitem_tag_map table'));";
+ $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:" . ":_('The (" . $typeAlias . ") type alias was removed from the #__contentitem_tag_map table'));";
$script .= PHP_EOL . "\t\t\t}";
// 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\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $viewName . " add queued success message.";
// TODO lang is not translated
- $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:".":_('The (" . $typeAlias . ") type alias was removed from the #__ucm_content table'));";
+ $script .= PHP_EOL . "\t\t\t\t\$app->enqueueMessage(JText:" . ":_('The (" . $typeAlias . ") type alias was removed from the #__ucm_content table'));";
$script .= PHP_EOL . "\t\t\t}";
// 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.";
// TODO lang is not translated
- $script .= PHP_EOL . "\t\t\$app->enqueueMessage(JText:".":_('All related items was removed from the #__ucm_base table'));";
- $script .= PHP_EOL . "\t\t\$app->enqueueMessage(JText:".":_('All related items was removed from the #__ucm_history table'));";
+ $script .= PHP_EOL . "\t\t\$app->enqueueMessage(JText:" . ":_('All related items was removed from the #__ucm_base table'));";
+ $script .= PHP_EOL . "\t\t\$app->enqueueMessage(JText:" . ":_('All related items was removed from the #__ucm_history 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 . "\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\t//" . $this->setLine(__LINE__) . " If succesfully remove " . $component . " add queued success message.";
// TODO lang is not translated
- $script .= PHP_EOL . "\t\t\t\$app->enqueueMessage(JText:".":_('All related items was removed from the #__assets table'));";
+ $script .= PHP_EOL . "\t\t\t\$app->enqueueMessage(JText:" . ":_('All related items was removed from the #__assets table'));";
$script .= PHP_EOL . "\t\t}";
// done
$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->setDynamicF0ld3rs(\$app, \$parent);";
// done
- return PHP_EOL.implode(PHP_EOL, $script);
+ return PHP_EOL . implode(PHP_EOL, $script);
}
return '';
}
@@ -4802,7 +4797,7 @@ class Interpretation extends Fields
$script[] = "\t\t}";
$script[] = "\t}";
// done
- return PHP_EOL.PHP_EOL.implode(PHP_EOL, $script);
+ return PHP_EOL . PHP_EOL . implode(PHP_EOL, $script);
}
return '';
}
@@ -4974,14 +4969,13 @@ class Interpretation extends Fields
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
- 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))
+ 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))
{
// load the custom script for the switch based on dynamic get
$routerSwitch[] = PHP_EOL . "\t\t\tcase '" . $view . "':";
$routerSwitch[] = $this->setPlaceholders($this->setDynamicValues(base64_decode($viewArray['settings']->main_get->php_router_parse)), $this->placeholders);
$routerSwitch[] = "\t\t\t\tbreak;";
-
+
return implode(PHP_EOL, $routerSwitch);
}
// 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[] = "\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}" . $customScript;
@@ -5183,7 +5177,7 @@ class Interpretation extends Fields
$batchmove[] = "\t\t\tif (!\$this->user->authorise('core.edit', \$contexts[\$pk]))";
}
$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}";
@@ -5201,7 +5195,7 @@ class Interpretation extends Fields
$batchmove[] = "\t\t\t\telse";
$batchmove[] = "\t\t\t\t{";
$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}";
$batchmove[] = "\t\t\t}";
@@ -5385,7 +5379,7 @@ class Interpretation extends Fields
}
$batchcopy[] = "\t\t\t{";
$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}";
@@ -5402,7 +5396,7 @@ class Interpretation extends Fields
$batchcopy[] = "\t\t\t\telse";
$batchcopy[] = "\t\t\t\t{";
$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}";
$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[] = "\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[] = 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[] = "\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[] = 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 . "`;";
}
// 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])) ||
- (isset($this->updateSQL['field.lenght']) && isset($this->updateSQL['field.lenght'][$view.'.'.$field])) ||
- (isset($this->updateSQL['field.name']) && isset($this->updateSQL['field.name'][$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.name']) && isset($this->updateSQL['field.name'][$view . '.' . $field])))
{
// 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
{
@@ -6270,7 +6264,7 @@ class Interpretation extends Fields
// 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]))
{
- $itemCode = '' . $item['code'] . '); ?>';
+ $itemCode = '' . $item['code'] . '); ?>';
}
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'];
// category and linked
- $body .= PHP_EOL . "\t\t" . '';
+ $body .= PHP_EOL . "\t\t" . ' | ';
$body .= PHP_EOL . "\t\t\tuser->authorise('core.edit', 'com_" . $this->fileContentStatic['###component###'] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")): ?>";
$body .= PHP_EOL . "\t\t\t\t" . 'escape($item->category_title); ?>';
$body .= PHP_EOL . "\t\t\t";
@@ -6312,7 +6306,7 @@ class Interpretation extends Fields
{
// user and linked
$body .= PHP_EOL . "\t\t" . $item['code'] . "); ?>";
- $body .= PHP_EOL . "\t\t" . ' | ';
+ $body .= PHP_EOL . "\t\t" . ' | ';
$body .= PHP_EOL . "\t\t\tuser->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . 'name; ?>';
$body .= PHP_EOL . "\t\t\t";
@@ -6348,7 +6342,7 @@ class Interpretation extends Fields
{
// user and linked
$body .= PHP_EOL . "\t\t" . $item['id'] . "); ?>";
- $body .= PHP_EOL . "\t\t" . ' | ';
+ $body .= PHP_EOL . "\t\t" . ' | ';
$body .= PHP_EOL . "\t\t\tuser->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . 'name; ?>';
$body .= PHP_EOL . "\t\t\t";
@@ -6372,9 +6366,9 @@ class Interpretation extends Fields
foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView)
{
$customAdminView .= PHP_EOL . "\t\t\tget('" . $customLinkView['link'] . ".access')): ?>";
- $customAdminView .= PHP_EOL . "\t\t\t\t" . 'fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>" >';
+ $customAdminView .= PHP_EOL . "\t\t\t\t" . 'fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>" >';
$customAdminView .= PHP_EOL . "\t\t\t";
- $customAdminView .= PHP_EOL . "\t\t\t\t" . 'fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>">';
+ $customAdminView .= PHP_EOL . "\t\t\t\t" . 'fileContentStatic['###COMPONENT###'] . '_' . $customLinkView['NAME'] . "'" . '); ?>">';
$customAdminView .= PHP_EOL . "\t\t\t";
}
$customAdminView .= PHP_EOL . "\t\t\t" . '';
@@ -6397,7 +6391,7 @@ class Interpretation extends Fields
if ($add)
{
// set as linked
- $body .= PHP_EOL . "\t\t" . ' | ';
+ $body .= PHP_EOL . "\t\t" . ' | ';
$body .= PHP_EOL . "\t\t\t";
$body .= PHP_EOL . "\t\t\t\t" . '' . PHP_EOL . "\t\t\t\t\t" . ' ' . $itemCode . '';
if ($checkoutTriger)
@@ -6419,7 +6413,7 @@ class Interpretation extends Fields
{
if ($item['type'] === 'category')
{
- $body .= PHP_EOL . "\t\t setListFieldClass($item['code'], $viewName_list, 'hidden-phone')."\">";
+ $body .= PHP_EOL . "\t\t | setListFieldClass($item['code'], $viewName_list, 'hidden-phone') . "\">";
$body .= PHP_EOL . "\t\t\tescape(\$item->category_title); ?>";
$body .= PHP_EOL . "\t\t | ";
}
@@ -6427,7 +6421,7 @@ class Interpretation extends Fields
{
// custom user and linked
$body .= PHP_EOL . "\t\t" . $item['id'] . "); ?>";
- $body .= PHP_EOL . "\t\t" . ' ';
+ $body .= PHP_EOL . "\t\t" . ' | ';
$body .= PHP_EOL . "\t\t\tuser->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . 'name; ?>';
$body .= PHP_EOL . "\t\t\t";
@@ -6439,14 +6433,14 @@ class Interpretation extends Fields
{
// user name only
$body .= PHP_EOL . "\t\t" . $item['code'] . "); ?>";
- $body .= PHP_EOL . "\t\t" . ' | ';
+ $body .= PHP_EOL . "\t\t" . ' | ';
$body .= PHP_EOL . "\t\t\tname; ?>";
$body .= PHP_EOL . "\t\t | ";
}
else
{
// normal not linked
- $body .= PHP_EOL . "\t\t setListFieldClass($item['code'], $viewName_list, 'hidden-phone')."\">";
+ $body .= PHP_EOL . "\t\t | setListFieldClass($item['code'], $viewName_list, 'hidden-phone') . "\">";
$body .= PHP_EOL . "\t\t\t" . $itemCode;
$body .= PHP_EOL . "\t\t | ";
}
@@ -6481,7 +6475,7 @@ class Interpretation extends Fields
}
if (!isset($this->fieldsNames[$viewName_single]['id']))
{
- $body .= PHP_EOL . "\t\t" . ' ';
+ $body .= PHP_EOL . "\t\t" . ' | ';
$body .= PHP_EOL . "\t\t\tid; ?>";
$body .= PHP_EOL . "\t\t | ";
}
@@ -6552,7 +6546,7 @@ class Interpretation extends Fields
{
$class = 'nowrap';
}
- $title = "";
+ $title = "";
if ($item['sort'])
{
$title = "listDirn, \$this->listOrder); ?>";
@@ -6571,7 +6565,7 @@ class Interpretation extends Fields
$head .= PHP_EOL . "\t\t";
$head .= PHP_EOL . "\t";
$head .= PHP_EOL . "\t\t" . ' ';
- $head .= PHP_EOL . "\t\t\t";
+ $head .= PHP_EOL . "\t\t\t";
$head .= PHP_EOL . "\t\t | ";
$head .= PHP_EOL . "\t";
}
@@ -6897,7 +6891,7 @@ class Interpretation extends Fields
$body .= PHP_EOL;
}
// start tab
- $body .= PHP_EOL . "\t";
+ $body .= PHP_EOL . "\t";
// add the main
$body .= PHP_EOL . "\t\t" . ' |