From 655bf3b0b98271c733054ecad2063284dbd9975f Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 6 Feb 2018 12:55:46 +0200 Subject: [PATCH] Added more validation and started adapting the compiler for JText replacment --- README.md | 2 +- admin/README.txt | 2 +- admin/helpers/compiler.php | 16 +- admin/helpers/compiler/a_Get.php | 35 ++-- admin/helpers/compiler/e_Interpretation.php | 154 +++++++++--------- admin/helpers/componentbuilder.php | 2 +- .../en-GB/en-GB.com_componentbuilder.ini | 2 +- admin/views/compiler/tmpl/default.php | 2 +- componentbuilder.xml | 2 +- site/helpers/componentbuilder.php | 2 +- 10 files changed, 116 insertions(+), 103 deletions(-) diff --git a/README.md b/README.md index e3e2aa42e..79c5be7f3 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 3rd February, 2018 ++ *Last Build*: 6th February, 2018 + *Version*: 2.6.14 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/README.txt b/admin/README.txt index e3e2aa42e..79c5be7f3 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -126,7 +126,7 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 3rd February, 2018 ++ *Last Build*: 6th February, 2018 + *Version*: 2.6.14 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php index c460f0b13..11f51b4fe 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -175,6 +175,16 @@ class Compiler extends Infusion $this->app->enqueueMessage('
', 'Warning'); } } + // check if we should add a EXTERNALCODE notice + if (ComponentbuilderHelper::checkArray($this->externalCodeString)) + { + // number of external code strings + $externalCount = count($this->externalCodeString); + // the correct string + $externalCodeString = ($externalCount == 1) ? JText::_('code/string') : JText::_('code/strings'); + // the notice + $this->app->enqueueMessage(JText::sprintf('There has been %s - %s added to this component as EXTERNALCODE. To avoid shipping your component with malicious %s always make sure that the correct code/string values were used.', $externalCount, $externalCodeString, $externalCodeString), 'Notice'); + } // end the timer here $this->time_end = microtime(true); $this->secondsCompiled = $this->time_end - $this->time_start; @@ -691,20 +701,20 @@ class Compiler extends Infusion { // Load escaped code since the target endhash has changed $this->loadEscapedCode($file, $target, $lineBites); - $this->app->enqueueMessage(JText::sprintf('Custom code could not be added to %s please review the file at line %s. This could be due to a change to lines below the custom code.', $target['path'], $target['from_line']), 'warning'); + $this->app->enqueueMessage(JText::sprintf('Custom code could not be added to %s please review the file at line %s. This could be due to a change to lines below the custom code.', $target['path'], $target['from_line']), 'Warning'); } } else { // Load escaped code since the target hash has changed $this->loadEscapedCode($file, $target, $lineBites); - $this->app->enqueueMessage(JText::sprintf('Custom code could not be added to %s please review the file at line %s. This could be due to a change to lines above the custom code.', $target['path'], $target['from_line']), 'warning'); + $this->app->enqueueMessage(JText::sprintf('Custom code could not be added to %s please review the file at line %s. This could be due to a change to lines above the custom code.', $target['path'], $target['from_line']), 'Warning'); } } else { // Give developer a notice that file is not found. - $this->app->enqueueMessage(JText::sprintf('File %s could not be found, so the custom code for this file could not be addded.', $target['path']), 'warning'); + $this->app->enqueueMessage(JText::sprintf('File %s could not be found, so the custom code for this file could not be addded.', $target['path']), 'Warning'); } } } diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 13984a2a1..aafa75836 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.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(' ); /** @@ -3171,10 +3171,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 @@ -3185,11 +3185,11 @@ class Get $this->langMismatch = ComponentbuilderHelper::mergeArrays(array($jsTEXT, $this->langMismatch)); } } - // now get the JText::script() - if (in_array('JText::script(', $langStringTargets)) + // now get the JText: :script() + 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 @@ -3204,7 +3204,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; } @@ -3696,7 +3696,7 @@ class Get // set key $key = '[EXTERNA'.'LCODE='.$target.']'; // set the notice - $this->app->enqueueMessage(JText::sprintf('The %s is not a valid url/path!', $key), 'warning'); + $this->app->enqueueMessage(JText::sprintf('The %s is not a valid url/path!', $key), 'Warning'); // remove the placeholder $bucket[$key] = ''; } @@ -3741,13 +3741,14 @@ class Get { if ($hash !== $liveHash) { + // update the hash since it changed $object = new stdClass(); $object->target = $targetKey; $object->hash = $liveHash; // update local hash $this->db->updateObject('#__componentbuilder_external_code', $object, 'target'); // give notice of the change - $this->app->enqueueMessage(JText::sprintf('The code/string from %s has been changed since the last compilation, please investigate!', $key), 'warning'); + $this->app->enqueueMessage(JText::sprintf('The code/string from %s has been changed since the last compilation, please investigate to insure the changes are safe!', $key), 'Warning'); } } else @@ -3758,12 +3759,14 @@ class Get $object->hash = $liveHash; // insert local hash $this->db->insertObject('#__componentbuilder_external_code', $object); + // give notice the first time this is added + $this->app->enqueueMessage(JText::sprintf('The code/string from %s has been added for the first time, please investigate to insure the correct code/string was used!', $key), 'Notice'); } } else { // set notice that we could not get a valid string from the target - $this->app->enqueueMessage(JText::sprintf('The %s returned an invalid string!', $key), 'warning'); + $this->app->enqueueMessage(JText::sprintf('The %s returned an invalid string!', $key), 'Warning'); } } // add to local bucket @@ -4736,7 +4739,7 @@ class Get { // reset found comment type $commentType = 0; - $this->app->enqueueMessage(JText::sprintf('We found dynamic code all in one line, and ignored it! Please review (%s) for more details!', $path), 'warning'); + $this->app->enqueueMessage(JText::sprintf('We found dynamic code all in one line, and ignored it! Please review (%s) for more details!', $path), 'Warning'); continue; } // do a quick check to insure we have an id diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index ee510982e..2112ea662 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -255,7 +255,7 @@ class Interpretation extends Fields $this->fileContentStatic['###HELPER_SITE_LICENSE_LOCK###'] = $this->setHelperLicenseLock($_VDM, 'site'); $this->fileContentStatic['###HELPER_LICENSE_LOCK###'] = $this->setHelperLicenseLock($_VDM, 'admin'); $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 @@ -300,7 +300,7 @@ class Interpretation extends Fields $statment[] = PHP_EOL . "\t\tif (!" . $thIIS . "->" . $boolMethod . "())"; $statment[] = "\t\t{"; $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\treturn false;"; $statment[] = "\t\t}"; @@ -2070,7 +2070,7 @@ class Interpretation extends Fields { $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[] = "\t\t\t\$app->redirect(" . $redirectString . ");"; $accessCheck[] = "\t\t\treturn false;"; @@ -2124,7 +2124,7 @@ class Interpretation extends Fields $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\$app->enqueueMessage(JText::_('" . $langKeyWoord . "'), 'warning');"; + $getItem .= PHP_EOL . "\t" . $tab . "\t\t\$app->enqueueMessage(JText:".":_('" . $langKeyWoord . "'), 'warning');"; if ('site' === $this->target) { // check that the default and the redirect page is not the same @@ -4571,7 +4571,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 @@ -4588,7 +4588,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 @@ -4605,7 +4605,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 @@ -4642,8 +4642,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 . "%') );"; @@ -4657,7 +4657,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; @@ -4995,7 +4995,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; @@ -5045,7 +5045,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[] = PHP_EOL . "\t\t\t\treturn false;"; $batchmove[] = "\t\t\t}"; @@ -5063,7 +5063,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}"; @@ -5249,7 +5249,7 @@ class Interpretation extends Fields } $batchcopy[] = PHP_EOL . "\t\t\t{"; $batchcopy[] = PHP_EOL . "\t\t\t\t//" . $this->setLine(__LINE__) . " Not fatal error"; - $batchcopy[] = PHP_EOL . "\t\t\t\t\$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', \$pk));"; + $batchcopy[] = PHP_EOL . "\t\t\t\t\$this->setError(JText:".":sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', \$pk));"; $batchcopy[] = PHP_EOL . "\t\t\t\tcontinue;"; $batchcopy[] = PHP_EOL . "\t\t\t}"; @@ -5266,7 +5266,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}"; @@ -5427,7 +5427,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 . "']);"; } @@ -5435,7 +5435,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 . "']);"; } @@ -6119,7 +6119,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') { @@ -6221,9 +6221,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" . ''; @@ -6396,7 +6396,7 @@ class Interpretation extends Fields { $class = 'nowrap'; } - $title = ""; + $title = ""; if ($item['sort']) { $title = "listDirn, \$this->listOrder); ?>"; @@ -6415,7 +6415,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"; } @@ -6741,7 +6741,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" . '
'; $body .= $main; @@ -6924,7 +6924,7 @@ class Interpretation extends Fields } $body .= PHP_EOL . PHP_EOL . "\t"; // set the default publishing tab - $body .= PHP_EOL . "\t"; + $body .= PHP_EOL . "\t"; $body .= PHP_EOL . "\t\t" . '
'; if ($items_one) { @@ -6956,7 +6956,7 @@ class Interpretation extends Fields } // set the permissions tab $body .= PHP_EOL . PHP_EOL . "\tcanDo->get('core.admin')) : ?>"; - $body .= PHP_EOL . "\t"; + $body .= PHP_EOL . "\t"; $body .= PHP_EOL . "\t\t" . '
'; $body .= PHP_EOL . "\t\t\t" . '
'; $body .= PHP_EOL . "\t\t\t\t" . '
'; @@ -7278,7 +7278,7 @@ class Interpretation extends Fields // 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])) { - $itemCode = '' . $item['code'] . '); ?>'; + $itemCode = '' . $item['code'] . '); ?>'; } elseif ($item['custom']['text'] === 'user') { @@ -7393,9 +7393,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" . '
'; @@ -7477,29 +7477,29 @@ class Interpretation extends Fields // add the defaults $body .= PHP_EOL . "\t\tpublished == 1):?>"; $body .= PHP_EOL . "\t\t\t" . ''; - $body .= PHP_EOL . "\t\t\t\t" . 'langPrefix . "_PUBLISHED'" . '); ?>">'; - $body .= PHP_EOL . "\t\t\t\t\t" . 'langPrefix . "_PUBLISHED'" . '); ?>'; + $body .= PHP_EOL . "\t\t\t\t" . 'langPrefix . "_PUBLISHED'" . '); ?>">'; + $body .= PHP_EOL . "\t\t\t\t\t" . 'langPrefix . "_PUBLISHED'" . '); ?>'; $body .= PHP_EOL . "\t\t\t\t" . ''; $body .= PHP_EOL . "\t\t\t" . ''; $body .= PHP_EOL . "\t\tpublished == 0):?>"; $body .= PHP_EOL . "\t\t\t" . ''; - $body .= PHP_EOL . "\t\t\t\t" . 'langPrefix . "_INACTIVE'" . '); ?>">'; - $body .= PHP_EOL . "\t\t\t\t\t" . 'langPrefix . "_INACTIVE'" . '); ?>'; + $body .= PHP_EOL . "\t\t\t\t" . 'langPrefix . "_INACTIVE'" . '); ?>">'; + $body .= PHP_EOL . "\t\t\t\t\t" . 'langPrefix . "_INACTIVE'" . '); ?>'; $body .= PHP_EOL . "\t\t\t\t" . ''; $body .= PHP_EOL . "\t\t\t" . ''; $body .= PHP_EOL . "\t\tpublished == 2):?>"; $body .= PHP_EOL . "\t\t\t" . ''; - $body .= PHP_EOL . "\t\t\t\t" . 'langPrefix . "_ARCHIVED'" . '); ?>">'; - $body .= PHP_EOL . "\t\t\t\t\t" . 'langPrefix . "_ARCHIVED'" . '); ?>'; + $body .= PHP_EOL . "\t\t\t\t" . 'langPrefix . "_ARCHIVED'" . '); ?>">'; + $body .= PHP_EOL . "\t\t\t\t\t" . 'langPrefix . "_ARCHIVED'" . '); ?>'; $body .= PHP_EOL . "\t\t\t\t" . ''; $body .= PHP_EOL . "\t\t\t" . ''; $body .= PHP_EOL . "\t\tpublished == -2):?>"; $body .= PHP_EOL . "\t\t\t" . ''; - $body .= PHP_EOL . "\t\t\t\t" . 'langPrefix . "_TRASHED'" . '); ?>">'; - $body .= PHP_EOL . "\t\t\t\t\t" . 'langPrefix . "_TRASHED'" . '); ?>'; + $body .= PHP_EOL . "\t\t\t\t" . 'langPrefix . "_TRASHED'" . '); ?>">'; + $body .= PHP_EOL . "\t\t\t\t\t" . 'langPrefix . "_TRASHED'" . '); ?>'; $body .= PHP_EOL . "\t\t\t\t" . ''; $body .= PHP_EOL . "\t\t\t" . ''; $body .= PHP_EOL . "\t\t" . ''; @@ -7523,7 +7523,7 @@ class Interpretation extends Fields $body .= PHP_EOL . ''; $body .= PHP_EOL . ''; $body .= PHP_EOL . "\t" . '
'; - $body .= PHP_EOL . "\t\t" . ''; + $body .= PHP_EOL . "\t\t" . ''; $body .= PHP_EOL . "\t" . '
'; $body .= PHP_EOL . ''; // return the build @@ -7572,12 +7572,12 @@ class Interpretation extends Fields // add the new buttons if ($addNewButon == 1 || $addNewButon == 2) { - $head .= PHP_EOL . $tabB . "\t" . ' langPrefix . "_NEW'" . '); ?>'; + $head .= PHP_EOL . $tabB . "\t" . ' langPrefix . "_NEW'" . '); ?>'; } // add the close and new button if ($addNewButon == 2 || $addNewButon == 3) { - $head .= PHP_EOL . $tabB . "\t" . ' langPrefix . "_CLOSE_NEW'" . '); ?>'; + $head .= PHP_EOL . $tabB . "\t" . ' langPrefix . "_CLOSE_NEW'" . '); ?>'; } // close group button if needed if ($addNewButon == 2) @@ -7642,7 +7642,7 @@ class Interpretation extends Fields $firstLink = false; } $head .= PHP_EOL . "\t\t"; - $head .= PHP_EOL . "\t\t\t"; + $head .= PHP_EOL . "\t\t\t"; $head .= PHP_EOL . "\t\t"; $controller++; } @@ -7651,10 +7651,10 @@ class Interpretation extends Fields $data_type = (2 == $this->footableVersion) ? 'data-type="numeric"' : 'data-type="number"'; // set default $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\t" . ''; - $head .= PHP_EOL . "\t\t\t"; + $head .= PHP_EOL . "\t\t\t"; $head .= PHP_EOL . "\t\t"; $head .= PHP_EOL . "\t"; $head .= PHP_EOL . ""; @@ -8017,7 +8017,7 @@ class Interpretation extends Fields $method[] = PHP_EOL . PHP_EOL . "\tpublic function redirectTo" . ComponentbuilderHelper::safeString($custom_button['link'], 'F') . "()"; $method[] = "\t{"; $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\$user = JFactory::getUser();"; $method[] = "\t\tif (\$user->authorise('" . $custom_button['link'] . ".access', 'com_" . $this->fileContentStatic['###component###'] . "'))"; @@ -8033,7 +8033,7 @@ class Interpretation extends Fields $method[] = "\t\t\treturn;"; $method[] = "\t\t}"; $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\treturn;"; $method[] = "\t}"; @@ -8133,7 +8133,7 @@ class Interpretation extends Fields $method[] = PHP_EOL . PHP_EOL . "\tpublic function exportData()"; $method[] = "\t{"; $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\$user = JFactory::getUser();"; $method[] = "\t\tif (\$user->authorise('" . $viewName_single . ".export', 'com_" . $this->fileContentStatic['###component###'] . "') && \$user->authorise('core.export', 'com_" . $this->fileContentStatic['###component###'] . "'))"; @@ -8155,7 +8155,7 @@ class Interpretation extends Fields $method[] = "\t\t\t}"; $method[] = "\t\t}"; $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\treturn;"; $method[] = "\t}"; @@ -8164,7 +8164,7 @@ class Interpretation extends Fields $method[] = PHP_EOL . PHP_EOL . "\tpublic function importData()"; $method[] = "\t{"; $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\$user = JFactory::getUser();"; $method[] = "\t\tif (\$user->authorise('" . $viewName_single . ".import', 'com_" . $this->fileContentStatic['###component###'] . "') && \$user->authorise('core.import', 'com_" . $this->fileContentStatic['###component###'] . "'))"; @@ -8188,7 +8188,7 @@ class Interpretation extends Fields { $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 (isset($this->importCustomScripts[$viewName_list]) && $this->importCustomScripts[$viewName_list]) { @@ -8202,7 +8202,7 @@ class Interpretation extends Fields $method[] = "\t\t\t}"; $method[] = "\t\t}"; $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\treturn;"; $method[] = "\t}"; @@ -8522,7 +8522,7 @@ class Interpretation extends Fields $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 = ucfirst(strtolower(\$buttonNamee));"; - $addButton[] = "\t\t\t\t\$button[] = 'langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\""; + $addButton[] = "\t\t\t\t\$button[] = '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###'] . "&view=" . $targetView . "&layout=edit'.\$ref.'\" >"; $addButton[] = "\t\t\t\t\t';"; $addButton[] = "\t\t\t}"; @@ -8543,7 +8543,7 @@ class Interpretation extends Fields $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 = ucfirst(strtolower(\$buttonNamee));"; - $addButton[] = "\t\t\t\t\$button[] = 'langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >"; + $addButton[] = "\t\t\t\t\$button[] = 'langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >"; $addButton[] = "\t\t\t\t\t';"; $addButton[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " build script"; $addButton[] = "\t\t\t\t\$script[] = \""; @@ -9895,7 +9895,7 @@ class Interpretation extends Fields $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//" . $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') { @@ -9966,7 +9966,7 @@ class Interpretation extends Fields $otherFilter[] = "\t\t{"; $otherFilter[] = "\t\t\t//" . $this->setLine(__LINE__) . " " . $CodeName . " Filter"; $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\tJHtml::_('select.options', \$this->" . $codeName . "Options, 'value', 'text', \$this->state->get('filter." . $filter['code'] . "'))"; $otherFilter[] = "\t\t\t);"; @@ -9975,7 +9975,7 @@ class Interpretation extends Fields $otherFilter[] = "\t\t\t{"; $otherFilter[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $CodeName . " Batch Selection"; $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\tJHtml::_('select.options', \$this->" . $codeName . "Options, 'value', 'text')"; $otherFilter[] = "\t\t\t\t);"; @@ -10000,7 +10000,7 @@ class Interpretation extends Fields $otherFilter[] = "\t\t{"; $otherFilter[] = "\t\t\t//" . $this->setLine(__LINE__) . " " . $Codename . " Filter"; $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\tJHtml::_('select.options', \$this->" . $filter['code'] . "Options, 'value', 'text', \$this->state->get('filter." . $filter['code'] . "'))"; $otherFilter[] = "\t\t\t);"; @@ -10009,7 +10009,7 @@ class Interpretation extends Fields $otherFilter[] = "\t\t\t{"; $otherFilter[] = "\t\t\t\t//" . $this->setLine(__LINE__) . " " . $Codename . " Batch Selection"; $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\tJHtml::_('select.options', \$this->" . $filter['code'] . "Options, 'value', 'text')"; $otherFilter[] = "\t\t\t\t);"; @@ -10047,7 +10047,7 @@ class Interpretation extends Fields $filter = array(); $filter[] = PHP_EOL . PHP_EOL . "\t\t//" . $this->setLine(__LINE__) . " Category Filter."; $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\tJHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text', \$this->state->get('filter.category_id'))"; $filter[] = "\t\t);"; @@ -10057,7 +10057,7 @@ class Interpretation extends Fields $filter[] = "\t\t{"; $filter[] = "\t\t\t//" . $this->setLine(__LINE__) . " Category Batch selection."; $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\tJHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text')"; $filter[] = "\t\t\t);"; @@ -11146,7 +11146,7 @@ class Interpretation extends Fields // build toolbar $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');"; } else @@ -11162,7 +11162,7 @@ class Interpretation extends Fields $toolBar .= PHP_EOL . "\t\t\$user = JFactory::getUser();"; $toolBar .= PHP_EOL . "\t\t\$userId = \$user->id;"; $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\tif (\$this->refid || \$this->ref)"; $toolBar .= PHP_EOL . "\t\t{"; @@ -11418,8 +11418,8 @@ class Interpretation extends Fields $donelist = array('sorting', 'published'); // set the default first $fields = "return array("; - $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.sorting' => JText:".":_('JGRID_HEADING_ORDERING')"; + $fields .= "," . PHP_EOL . "\t\t\t'a.published' => JText:".":_('JSTATUS')"; // add the rest of the set filters if (isset($this->sortBuilder[$view]) && ComponentbuilderHelper::checkArray($this->sortBuilder[$view])) @@ -11430,20 +11430,20 @@ class Interpretation extends Fields { 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'])) { - $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 { - $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);"; // return fields return $fields; @@ -11638,11 +11638,11 @@ class Interpretation extends Fields $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\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\telse"; $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\$counter++;"; $fix .= PHP_EOL . "\t" . $tab . "\t\t\t\t}"; @@ -12132,7 +12132,7 @@ class Interpretation extends Fields $display[] = '
'; $display[] = "\t" . '
'; $display[] = "\t 'cpanel')); ?>"; - $display[] = PHP_EOL . "\t\t"; + $display[] = PHP_EOL . "\t\t"; $display[] = "\t\t" . '
'; // set the tab to insure correct spacing $tab = "\t\t\t"; @@ -12168,7 +12168,7 @@ class Interpretation extends Fields foreach ($builder as $tabname => $accordians) { $alias = ComponentbuilderHelper::safeString($tabname); - $display[] = PHP_EOL . "\t\t"; + $display[] = PHP_EOL . "\t\t"; $display[] = "\t\t" . '
'; $display[] = $tab . '
'; $display[] = $tab . "\t '" . $alias . "_one')); ?>"; @@ -12356,7 +12356,7 @@ class Interpretation extends Fields // set the code name $codeName = ComponentbuilderHelper::safeString($this->componentData->name_code); // set dashboard - $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'; $catArray = array(); foreach ($this->componentData->admin_views as $view) @@ -12384,7 +12384,7 @@ class Interpretation extends Fields } $nameList = ComponentbuilderHelper::safeString($view['settings']->name_list); $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; // check if category has another name if (isset($this->catOtherName[$nameList]) && ComponentbuilderHelper::checkArray($this->catOtherName[$nameList])) @@ -12397,7 +12397,7 @@ class Interpretation extends Fields } 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 $catArray[] = $otherViews; } @@ -12503,13 +12503,13 @@ class Interpretation extends Fields $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; // 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 { $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; // 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. $custom .= PHP_EOL . "\t\t}"; @@ -12547,13 +12547,13 @@ class Interpretation extends Fields { $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; // 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 { $this->langContent[$this->lang][$lang . '_' . $nameUpper] = $name; // 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. $this->lastCustomSubMenu[$nr] .= PHP_EOL . "\t\t}"; diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index a904c0d6c..8d2e6fe9a 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -1761,7 +1761,7 @@ abstract class ComponentbuilderHelper { // get the http CODE $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); - if ($statusCode === 200) + if ($statusCode !== 404) { $exists = true; } diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 196710e44..32afdf735 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -873,7 +873,7 @@ COM_COMPONENTBUILDER_ALIAS="Alias" COM_COMPONENTBUILDER_ALIGNMENT="Alignment" COM_COMPONENTBUILDER_ALL="All" COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATTER="All is good, please check again latter." -COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IN_NO_NOTICE_AT_THIS_TIME="All is good, there in no notice at this time." +COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME="All is good, there is no notice at this time." COM_COMPONENTBUILDER_ALL_UNSAVED_WORK_ON_THIS_PAGE_WILL_BE_LOST_ARE_YOU_SURE_YOU_WANT_TO_CONTINUE="All unsaved work on this page will be lost, are you sure you want to continue?" COM_COMPONENTBUILDER_ALWAYS_ADD="Always Add" COM_COMPONENTBUILDER_ALWAYS_INSURE_THAT_YOU_HAVE_YOUR_LOCAL_COMPONENTS_BACKED_UP_BY_MAKING_AN_EXPORT_OF_ALL_YOUR_LOCAL_COMPONENTS_BEFORE_IMPORTING_ANY_NEW_COMPONENTS_SMALLMAKE_BSUREB_TO_MOVE_THIS_ZIPPED_BACKUP_PACKAGE_OUT_OF_THE_TMP_FOLDER_BEFORE_DOING_AN_IMPORTSMALLBR_IF_YOU_ARE_IMPORTING_A_PACKAGE_OF_A_THREERD_PARTY_JCB_PACKAGE_DEVELOPER_BMAKE_SURE_IT_IS_A_REPUTABLE_JCB_PACKAGE_DEVELOPERSB="Always insure that you have your local components backed up, by making an export of all your local components before importing any new components. (Make SURE to move this zipped backup package out of the tmp folder before doing an import)
If you are importing a package of a 3rd party JCB package developer, make sure it is a reputable JCB package developers!" diff --git a/admin/views/compiler/tmpl/default.php b/admin/views/compiler/tmpl/default.php index c46a3c07d..e0ede51a0 100644 --- a/admin/views/compiler/tmpl/default.php +++ b/admin/views/compiler/tmpl/default.php @@ -152,7 +152,7 @@ jQuery(document).ready(function($) {