>>
CFactory::_('Content')->set_($nameSingleCode, 'LINKEDVIEWTABLESCRIPTS', $this->setFootableScripts());
- if (strpos($parentKey, '-R>') !== false
- || strpos($parentKey, '-A>') !== false)
+ if (strpos((string) $parentKey, '-R>') !== false
+ || strpos((string) $parentKey, '-A>') !== false)
{
- list($parent_key) = explode('-', $parentKey);
+ list($parent_key) = explode('-', (string) $parentKey);
}
- elseif (strpos($parentKey, '-OR>') !== false)
+ elseif (strpos((string) $parentKey, '-OR>') !== false)
{
// this is not good... (TODO)
- $parent_keys = explode('-OR>', $parentKey);
+ $parent_keys = explode('-OR>', (string) $parentKey);
}
else
{
$parent_key = $parentKey;
}
- if (strpos($key, '-R>') !== false || strpos($key, '-A>') !== false)
+ if (strpos((string) $key, '-R>') !== false || strpos((string) $key, '-A>') !== false)
{
- list($_key) = explode('-', $key);
+ list($_key) = explode('-', (string) $key);
}
- elseif (strpos($key, '-OR>') !== false)
+ elseif (strpos((string) $key, '-OR>') !== false)
{
- $_key = str_replace('-OR>', '', $key);
+ $_key = str_replace('-OR>', '', (string) $key);
}
else
{
@@ -14438,14 +14437,14 @@ class Interpretation extends Fields
$query .= $this->setCustomQuery($nameListCode, $nameSingleCode);
if (StringHelper::check($globalKey) && $key
&& strpos(
- $key, '-R>'
+ (string) $key, '-R>'
) === false
- && strpos($key, '-A>') === false
- && strpos($key, '-OR>') === false
+ && strpos((string) $key, '-A>') === false
+ && strpos((string) $key, '-OR>') === false
&& $parentKey
- && strpos($parentKey, '-R>') === false
- && strpos($parentKey, '-A>') === false
- && strpos($parentKey, '-OR>') === false)
+ && strpos((string) $parentKey, '-R>') === false
+ && strpos((string) $parentKey, '-A>') === false
+ && strpos((string) $parentKey, '-OR>') === false)
{
$query .= PHP_EOL . PHP_EOL . Indent::_(2) . "//" . Line::_(
__LINE__,__CLASS__
@@ -14470,13 +14469,13 @@ class Interpretation extends Fields
. " = -5');";
$query .= PHP_EOL . Indent::_(2) . "}";
}
- elseif (strpos($parentKey, '-OR>') !== false
- || strpos($key, '-OR>') !== false)
+ elseif (strpos((string) $parentKey, '-OR>') !== false
+ || strpos((string) $key, '-OR>') !== false)
{
// get both strings
- if (strpos($key, '-OR>') !== false)
+ if (strpos((string) $key, '-OR>') !== false)
{
- $ORarray = explode('-OR>', $key);
+ $ORarray = explode('-OR>', (string) $key);
}
else
{
@@ -14644,11 +14643,11 @@ class Interpretation extends Fields
// filter by child repetable field values
if (StringHelper::check($globalKey) && $key
&& strpos(
- $key, '-R>'
+ (string) $key, '-R>'
) !== false
- && strpos($key, '-A>') === false)
+ && strpos((string) $key, '-A>') === false)
{
- list($field, $target) = explode('-R>', $key);
+ list($field, $target) = explode('-R>', (string) $key);
$query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
__LINE__,__CLASS__
) . " Filter by " . $globalKey . " in this Repetable Field";
@@ -14688,9 +14687,9 @@ class Interpretation extends Fields
// filter by child array field values
if (StringHelper::check($globalKey) && $key
&& strpos(
- $key, '-R>'
+ (string) $key, '-R>'
) === false
- && strpos($key, '-A>') !== false)
+ && strpos((string) $key, '-A>') !== false)
{
$query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
__LINE__,__CLASS__
@@ -14704,7 +14703,7 @@ class Interpretation extends Fields
$query .= PHP_EOL . Indent::_(4)
. "foreach (\$items as \$nr => &\$item)";
$query .= PHP_EOL . Indent::_(4) . "{";
- list($bin, $target) = explode('-A>', $key);
+ list($bin, $target) = explode('-A>', (string) $key);
if (StringHelper::check($target))
{
$query .= PHP_EOL . Indent::_(5) . "if ("
@@ -14756,11 +14755,11 @@ class Interpretation extends Fields
// filter by parent repetable field values
if (StringHelper::check($globalKey) && $key
&& strpos(
- $parentKey, '-R>'
+ (string) $parentKey, '-R>'
) !== false
- && strpos($parentKey, '-A>') === false)
+ && strpos((string) $parentKey, '-A>') === false)
{
- list($bin, $target) = explode('-R>', $parentKey);
+ list($bin, $target) = explode('-R>', (string) $parentKey);
$query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
__LINE__,__CLASS__
) . " Filter by " . $_key . " Repetable Field";
@@ -14801,9 +14800,9 @@ class Interpretation extends Fields
// filter by parent array field values
if (StringHelper::check($globalKey) && $key
&& strpos(
- $parentKey, '-R>'
+ (string) $parentKey, '-R>'
) === false
- && strpos($parentKey, '-A>') !== false)
+ && strpos((string) $parentKey, '-A>') !== false)
{
$query .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(
__LINE__,__CLASS__
@@ -14817,7 +14816,7 @@ class Interpretation extends Fields
$query .= PHP_EOL . Indent::_(4)
. "foreach (\$items as \$nr => &\$item)";
$query .= PHP_EOL . Indent::_(4) . "{";
- list($bin, $target) = explode('-A>', $parentKey);
+ list($bin, $target) = explode('-A>', (string) $parentKey);
if (StringHelper::check($target))
{
$query .= PHP_EOL . Indent::_(5) . "if (\$item->" . $_key
@@ -15020,8 +15019,8 @@ class Interpretation extends Fields
public function setGetItemsModelMethod(&$nameSingleCode, &$nameListCode,
$config
= array('functionName' => 'getExportData',
- 'docDesc' => 'Method to get list export data.',
- 'type' => 'export')
+ 'docDesc' => 'Method to get list export data.',
+ 'type' => 'export')
)
{
// start the query string
@@ -15553,7 +15552,7 @@ class Interpretation extends Fields
$categoryCodeName = $this->categoryBuilder[$nameListCode]['code'];
$addCategory = true;
$addCategoryFilter
- = $this->categoryBuilder[$nameListCode]['filter'];
+ = $this->categoryBuilder[$nameListCode]['filter'];
}
else
{
@@ -15977,7 +15976,7 @@ class Interpretation extends Fields
{
$filterQuery .= PHP_EOL . Indent::_(2) . "//"
. Line::_(__Line__, __Class__) . " Filter by "
- . ucwords($filter['code']) . ".";
+ . ucwords((string) $filter['code']) . ".";
// we only add multi filter option if new filter type
// and we have multi filter set for this field (2 = topbar)
if (isset($this->adminFilterType[$nameListCode])
@@ -16119,7 +16118,7 @@ class Interpretation extends Fields
$filterQuery .= PHP_EOL . Indent::_(3) . "//"
. Line::_(__Line__, __Class__) . " Filter by the "
- . ucwords($filter['code']) . " Array.";
+ . ucwords((string) $filter['code']) . " Array.";
$filterQuery .= PHP_EOL . Indent::_(3)
. "\$query->where('" . $a . "." . $filter['code']
@@ -16176,7 +16175,7 @@ class Interpretation extends Fields
$behaviors[$matchName] = $targetBehavior;
$defaults[$matchName] = $targetDefault;
$toggleSwitch[$matchName]
- = ($condition['target_behavior']
+ = ($condition['target_behavior']
== 1
|| $condition['target_behavior'] == 2) ? true
: false;
@@ -16185,7 +16184,7 @@ class Interpretation extends Fields
// set function array
$functions[$uniqueVar][0] = $matchName;
$matchNames[$matchName]
- = $condition['match_name'];
+ = $condition['match_name'];
// get the select value
$getValue[$matchName] = $this->getValueScript(
$condition['match_type'],
@@ -16224,20 +16223,20 @@ class Interpretation extends Fields
// set function array
$functions[$uniqueVar][] = $relationName;
$matchNames[$relationName]
- = $relation['match_name'];
+ = $relation['match_name'];
// get the relation option
$relationOptions = $this->getOptionsScript(
$relation['match_type'],
$relation['match_options']
);
$getValue[$relationName]
- = $this->getValueScript(
+ = $this->getValueScript(
$relation['match_type'],
$relation['match_name'],
$condition['match_extends'], $uniqueVar
);
$ifValue[$relationName]
- = $this->ifValueScript(
+ = $this->ifValueScript(
$relationName,
$relation['match_behavior'],
$relation['match_type'],
@@ -16253,7 +16252,7 @@ class Interpretation extends Fields
$behaviors[$matchName] = $targetBehavior;
$defaults[$matchName] = $targetDefault;
$toggleSwitch[$matchName]
- = ($condition['target_behavior']
+ = ($condition['target_behavior']
== 1
|| $condition['target_behavior'] == 2) ? true
: false;
@@ -16663,8 +16662,8 @@ class Interpretation extends Fields
// add file to view
$_target = array(CFactory::_('Config')->build_target => $nameListCode);
$_config = array(Placefix::_h('CREATIONDATE') => $_created,
- Placefix::_h('BUILDDATE') => $_modified,
- Placefix::_h('VERSION') => $viewArray['settings']->version);
+ Placefix::_h('BUILDDATE') => $_modified,
+ Placefix::_h('VERSION') => $viewArray['settings']->version);
$this->buildDynamique($_target, 'javascript_file', false, $_config);
// set path
$_path = '/administrator/components/com_' . $this->componentCodeName
@@ -16757,7 +16756,7 @@ class Interpretation extends Fields
. PHP_EOL . '";
$this->viewScriptBuilder[$nameSingleCode]['footerScript']
- = $footerScript;
+ = $footerScript;
}
}
@@ -16830,7 +16829,7 @@ class Interpretation extends Fields
if (in_array($target['name'], $currentTargets))
{
$this->targetRelationControl[$view][$target['name']]
- = array($relation['match_name'],
+ = array($relation['match_name'],
$condition['match_name']);
$found = true;
break;
@@ -17403,7 +17402,7 @@ class Interpretation extends Fields
|| !ComponentbuilderHelper::fieldCheck($type))
{
$optionsArray = array_map(
- 'trim', (array) explode(PHP_EOL, $options)
+ 'trim', (array) explode(PHP_EOL, (string) $options)
);
if (!ArrayHelper::check($optionsArray))
{
@@ -17432,10 +17431,10 @@ class Interpretation extends Fields
);
if (StringHelper::check($keywords))
{
- if (strpos($keywords, ',') !== false)
+ if (strpos((string) $keywords, ',') !== false)
{
$keywords = array_map(
- 'trim', (array) explode(',', $keywords)
+ 'trim', (array) explode(',', (string) $keywords)
);
foreach ($keywords as $keyword)
{
@@ -17444,7 +17443,7 @@ class Interpretation extends Fields
}
else
{
- $buket['keywords'][] = trim($keywords);
+ $buket['keywords'][] = trim((string) $keywords);
}
}
// check to ket string length if set
@@ -17691,7 +17690,7 @@ class Interpretation extends Fields
$valueArray[$task['task_name']][] = "\$"
. $task['value_name'] . "Value";
$getModel[$task['task_name']]
- = "\$result = \$this->getModel('ajax')->"
+ = "\$result = \$this->getModel('ajax')->"
. $task['method_name'] . "(" . Placefix::_("valueArray") . ");";
// check if null or zero is allowed
if (!isset($task['allow_zero']) || 1 != $task['allow_zero'])
@@ -17848,7 +17847,7 @@ class Interpretation extends Fields
$function = array();
// set component name
$component = $this->componentCodeName;
- $Component = ucfirst($component);
+ $Component = ucfirst((string) $component);
foreach ($this->filterBuilder[$nameListCode] as $filter)
{
if ($filter['type'] != 'category'
@@ -18169,9 +18168,9 @@ class Interpretation extends Fields
$filter['custom']
)['JFORM_TYPE_PHP'];
// check for the [JHtml::_('select.option', '',] code
- if (strpos($field_code, "JHtml::_('select.option', '',")
+ if (strpos((string) $field_code, "JHtml::_('select.option', '',")
!== false
- && strpos($field_code, '($this->multiple === false)')
+ && strpos((string) $field_code, '($this->multiple === false)')
=== false)
{
// for now we just give an error message (don't fix it)
@@ -18180,10 +18179,10 @@ class Interpretation extends Fields
'Error'
);
$field_url
- = '"index.php?option=com_componentbuilder&view=fields&task=field.edit&id='
+ = '"index.php?option=com_componentbuilder&view=fields&task=field.edit&id='
. $filter['id'] . '" target="_blank"';
$field_fix
- = "if (\$this->multiple === false) { // <-- this if statement is needed";
+ = "if (\$this->multiple === false) { // <-- this if statement is needed";
$field_fix .= PHP_EOL . Indent::_(1)
. "\$options[] = JHtml::_('select.option', '', 'Select an option'); // <-- the empty option";
$field_fix .= PHP_EOL . "}
";
@@ -18802,7 +18801,7 @@ class Interpretation extends Fields
{
// get the actual extention
$_extension = $this->categoryBuilder[$nameListCode]['extension'];
- $_extension = explode('.', $_extension);
+ $_extension = explode('.', (string) $_extension);
// set component name
if (ArrayHelper::check($_extension))
{
@@ -18834,15 +18833,15 @@ class Interpretation extends Fields
$this->buildDynamique($target, 'category');
// insure the file gets updated
CFactory::_('Content')->set_('category' . $otherView, 'view', $otherView);
- CFactory::_('Content')->set_('category' . $otherView, 'View', ucfirst($otherView));
+ CFactory::_('Content')->set_('category' . $otherView, 'View', ucfirst((string) $otherView));
CFactory::_('Content')->set_('category' . $otherView, 'views', $otherViews);
- CFactory::_('Content')->set_('category' . $otherView, 'Views', ucfirst($otherViews));
+ CFactory::_('Content')->set_('category' . $otherView, 'Views', ucfirst((string) $otherViews));
// set script to global helper file
$includeHelper = array();
$includeHelper[] = "\n//" . Line::_(__Line__, __Class__)
. "Insure this view category file is loaded.";
- $includeHelper[] = "\$classname = '" . ucfirst($component)
- . ucfirst($otherView) . "Categories';";
+ $includeHelper[] = "\$classname = '" . ucfirst((string) $component)
+ . ucfirst((string) $otherView) . "Categories';";
$includeHelper[] = "if (!class_exists(\$classname))";
$includeHelper[] = "{";
$includeHelper[] = Indent::_(1)
@@ -19963,7 +19962,7 @@ class Interpretation extends Fields
$allow[] = Indent::_(4) . "\$form->setValue('" . $fieldName
. "', null, '');";
$allow[] = Indent::_(3) . "}";
- $allow[] = Indent::_(3) . "elseif (" . ucfirst($component)
+ $allow[] = Indent::_(3) . "elseif (" . ucfirst((string) $component)
. "Helper::checkArray(\$val))";
$allow[] = Indent::_(3) . "{";
$allow[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@@ -20495,8 +20494,8 @@ class Interpretation extends Fields
{
// keep track of all fields already added
$donelist = array('id' => true, 'search' => true,
- 'published' => true, 'access' => true,
- 'created_by' => true, 'modified_by' => true);
+ 'published' => true, 'access' => true,
+ 'created_by' => true, 'modified_by' => true);
// default filter fields
$fields = "'a.id','id'";
$fields .= "," . PHP_EOL . Indent::_(4) . "'a.published','published'";
@@ -20617,11 +20616,11 @@ class Interpretation extends Fields
public function setStoredId(&$nameSingleCode, &$nameListCode)
{
// set component name
- $Component = ucwords($this->componentCodeName);
+ $Component = ucwords((string) $this->componentCodeName);
// keep track of all fields already added
$donelist = array('id' => true, 'search' => true,
- 'published' => true, 'access' => true,
- 'created_by' => true, 'modified_by' => true);
+ 'published' => true, 'access' => true,
+ 'created_by' => true, 'modified_by' => true);
// set the defaults first
$stored = "//" . Line::_(__Line__, __Class__) . " Compile the store id.";
$stored .= PHP_EOL . Indent::_(2)
@@ -20846,7 +20845,7 @@ class Interpretation extends Fields
// build toolbar
$toolBar
- = "JFactory::getApplication()->input->set('hidemainmenu', true);";
+ = "JFactory::getApplication()->input->set('hidemainmenu', true);";
$toolBar .= PHP_EOL . Indent::_(2) . "JToolBarHelper::title(JText:"
. ":_('" . $viewNameLang_readonly . "'), '" . $nameSingleCode
. "');";
@@ -20875,7 +20874,7 @@ class Interpretation extends Fields
);
// build toolbar
$toolBar
- = "JFactory::getApplication()->input->set('hidemainmenu', true);";
+ = "JFactory::getApplication()->input->set('hidemainmenu', true);";
$toolBar .= PHP_EOL . Indent::_(2)
. "\$user = JFactory::getUser();";
$toolBar .= PHP_EOL . Indent::_(2) . "\$userId = \$user->id;";
@@ -21709,7 +21708,7 @@ class Interpretation extends Fields
if ($item['method'] == 6)
{
$_placeholder_for_field
- = array('[[[field]]]' => "\$item->"
+ = array('[[[field]]]' => "\$item->"
. $item['name']);
$fix .= CFactory::_('Placeholder')->update(
PHP_EOL . Indent::_(1) . $tab . Indent::_(3)
@@ -21870,13 +21869,13 @@ class Interpretation extends Fields
{
// check if this is a local table
if (strpos(
- $item['custom']['table'],
+ (string) $item['custom']['table'],
'#__' . $this->componentCodeName . '_'
) !== false)
{
$keyTableNAme = str_replace(
'#__' . $this->componentCodeName . '_',
- '', $item['custom']['table']
+ '', (string) $item['custom']['table']
);
}
else
@@ -22244,7 +22243,7 @@ class Interpretation extends Fields
case 'custom.admin.views':
case 'site.admin.view':
$headers[]
- = 'JHtml::addIncludePath(JPATH_COMPONENT.\'/helpers/html\');';
+ = 'JHtml::addIncludePath(JPATH_COMPONENT.\'/helpers/html\');';
$headers[] = 'JHtml::_(\'behavior.formvalidator\');';
$headers[] = 'JHtml::_(\'formbehavior.chosen\', \'select\');';
$headers[] = 'JHtml::_(\'behavior.keepalive\');';
@@ -22469,7 +22468,7 @@ class Interpretation extends Fields
// code
$code = (array) explode(
PHP_EOL, str_replace(
- array_keys($field), array_values($field), $item['set']
+ array_keys($field), array_values($field), (string) $item['set']
)
);
$fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . implode(
@@ -22483,7 +22482,7 @@ class Interpretation extends Fields
. Line::_(__Line__, __Class__) . " concatenate these fields";
$fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "\$item->"
. $item['code'] . ' = ' . implode(
- " . '" . str_replace("'", ''', $item['set']) . "' . ",
+ " . '" . str_replace("'", ''', (string) $item['set']) . "' . ",
$field
) . ';';
}
@@ -22613,7 +22612,7 @@ class Interpretation extends Fields
public function setRouterCase($viewsCodeName)
{
- if (strlen($viewsCodeName) > 0)
+ if (strlen((string) $viewsCodeName) > 0)
{
$router = PHP_EOL . Indent::_(2) . "case '" . $viewsCodeName . "':";
$router .= PHP_EOL . Indent::_(3)
@@ -22800,7 +22799,7 @@ class Interpretation extends Fields
// set the extension key string, new convention (more stable)
$_key_extension = str_replace(
'.', '_po0O0oq_',
- $this->categoryBuilder[$name_list]['extension']
+ (string) $this->categoryBuilder[$name_list]['extension']
);
// add to lang
@@ -22864,7 +22863,7 @@ class Interpretation extends Fields
. '/admin/assets/images/icons';
foreach ($this->iconBuilder as $icon => $path)
{
- $array_buket = explode('.', $icon);
+ $array_buket = explode('.', (string) $icon);
if (count((array) $array_buket) == 3)
{
list($type, $name, $action) = $array_buket;
@@ -23377,7 +23376,7 @@ class Interpretation extends Fields
// get the extension array
$_extension_array = (array) explode(
'.',
- $this->categoryBuilder[$nameListCode]['extension']
+ (string) $this->categoryBuilder[$nameListCode]['extension']
);
// set the menu selection
if (isset($_extension_array[1]))
@@ -23445,7 +23444,7 @@ class Interpretation extends Fields
$this->uninstallScriptBuilder[$nameSingleCode] = 'com_'
. $codeName . '.' . $nameSingleCode;
$this->uninstallScriptFields[$nameSingleCode]
- = $nameSingleCode;
+ = $nameSingleCode;
}
}
if (isset($this->lastCustomSubMenu)
@@ -23705,7 +23704,7 @@ class Interpretation extends Fields
$this->componentData->menu_prefix
))
{
- $prefix = trim($this->componentData->menu_prefix) . ' ';
+ $prefix = trim((string) $this->componentData->menu_prefix) . ' ';
}
}
else
@@ -23714,7 +23713,7 @@ class Interpretation extends Fields
$addPrefix = $this->params->get('add_menu_prefix', 1);
if ($addPrefix == 1)
{
- $prefix = trim($this->params->get('menu_prefix', '»'))
+ $prefix = trim((string) $this->params->get('menu_prefix', '»'))
. ' ';
}
}
@@ -23838,10 +23837,10 @@ class Interpretation extends Fields
'adminsys', $lang . '_' . $nameUpper, $menu['name']
);
// sanitize url
- if (strpos($menu['link'], 'http') === false)
+ if (strpos((string) $menu['link'], 'http') === false)
{
$menu['link'] = str_replace(
- '/administrator/index.php?', '', $menu['link']
+ '/administrator/index.php?', '', (string) $menu['link']
);
$menu['link'] = str_replace(
'administrator/index.php?', '', $menu['link']
@@ -23859,7 +23858,7 @@ class Interpretation extends Fields
}
// urlencode
$menu['link'] = htmlspecialchars(
- $menu['link'], ENT_XML1, 'UTF-8'
+ (string) $menu['link'], ENT_XML1, 'UTF-8'
);
// add custom menu
$customMenu .= PHP_EOL . Indent::_(3) . '