diff --git a/README.md b/README.md index 8bac9f332..c61f1f52b 100644 --- a/README.md +++ b/README.md @@ -143,11 +143,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 27th August, 2021 ++ *Last Build*: 31st August, 2021 + *Version*: 2.12.11 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **292163** ++ *Line count*: **292284** + *Field count*: **1630** + *File count*: **1936** + *Folder count*: **322** diff --git a/admin/README.txt b/admin/README.txt index 8bac9f332..c61f1f52b 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -143,11 +143,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 27th August, 2021 ++ *Last Build*: 31st August, 2021 + *Version*: 2.12.11 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **292163** ++ *Line count*: **292284** + *Field count*: **1630** + *File count*: **1936** + *Folder count*: **322** diff --git a/admin/access.xml b/admin/access.xml index 45a3a54d4..7464de0f4 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -274,7 +274,6 @@ - diff --git a/admin/assets/images/icons/field_add.png b/admin/assets/images/icons/field_add.png deleted file mode 100644 index a207756a7..000000000 Binary files a/admin/assets/images/icons/field_add.png and /dev/null differ diff --git a/admin/compiler/joomla_3/JControllerLegacyAjax.php b/admin/compiler/joomla_3/JControllerLegacyAjax.php index 8b4195d2d..8e36cf1a9 100644 --- a/admin/compiler/joomla_3/JControllerLegacyAjax.php +++ b/admin/compiler/joomla_3/JControllerLegacyAjax.php @@ -29,20 +29,29 @@ class ###Component###ControllerAjax extends JControllerLegacy parent::__construct($config); // make sure all json stuff are set JFactory::getDocument()->setMimeEncoding( 'application/json' ); - JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"'); - JResponse::setHeader("Access-Control-Allow-Origin", "*"); + // get the application + $app = JFactory::getApplication(); + $app->setHeader('Content-Disposition','attachment;filename="getajax.json"'); + $app->setHeader('Access-Control-Allow-Origin', '*'); // load the tasks ###REGISTER_AJAX_TASK### } public function ajax() { + // get the user for later use $user = JFactory::getUser(); + // get the input values $jinput = JFactory::getApplication()->input; + // check if we should return raw + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + // return to a callback function + $callback = $jinput->get('callback', null, 'CMD'); // Check Token! $token = JSession::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { + // get the task $task = $this->getTask(); switch($task) {###AJAX_INPUT_RETURN### @@ -50,10 +59,15 @@ class ###Component###ControllerAjax extends JControllerLegacy } else { - if($callback = $jinput->get('callback', null, 'CMD')) + // return to a callback function + if($callback) { echo $callback."(".json_encode(false).");"; } + elseif($returnRaw) + { + echo json_encode(false); + } else { echo "(".json_encode(false).");"; diff --git a/admin/compiler/joomla_3/JControllerLegacyAjaxSite.php b/admin/compiler/joomla_3/JControllerLegacyAjaxSite.php index 2873aad62..0ddcc119e 100644 --- a/admin/compiler/joomla_3/JControllerLegacyAjaxSite.php +++ b/admin/compiler/joomla_3/JControllerLegacyAjaxSite.php @@ -29,20 +29,29 @@ class ###Component###ControllerAjax extends JControllerLegacy parent::__construct($config); // make sure all json stuff are set JFactory::getDocument()->setMimeEncoding( 'application/json' ); - JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"'); - JResponse::setHeader("Access-Control-Allow-Origin", "*"); + // get the application + $app = JFactory::getApplication(); + $app->setHeader('Content-Disposition','attachment;filename="getajax.json"'); + $app->setHeader('Access-Control-Allow-Origin', '*'); // load the tasks ###REGISTER_SITE_AJAX_TASK### } public function ajax() { + // get the user for later use $user = JFactory::getUser(); + // get the input values $jinput = JFactory::getApplication()->input; + // check if we should return raw + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + // return to a callback function + $callback = $jinput->get('callback', null, 'CMD'); // Check Token! $token = JSession::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { + // get the task $task = $this->getTask(); switch($task) {###AJAX_SITE_INPUT_RETURN### @@ -50,10 +59,16 @@ class ###Component###ControllerAjax extends JControllerLegacy } else { - if($callback = $jinput->get('callback', null, 'CMD')) + // return to a callback function + if($callback) { echo $callback."(".json_encode(false).");"; } + // return raw + elseif($returnRaw) + { + echo json_encode(false); + } else { echo "(".json_encode(false).");"; diff --git a/admin/compiler/joomla_3/ajax.json.php b/admin/compiler/joomla_3/ajax.json.php index 0d168f68d..6883172ef 100644 --- a/admin/compiler/joomla_3/ajax.json.php +++ b/admin/compiler/joomla_3/ajax.json.php @@ -27,8 +27,8 @@ class ###Component###ControllerAjax extends JControllerLegacy parent::__construct($config); // make sure all json stuff are set JFactory::getDocument()->setMimeEncoding( 'application/json' ); - JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"'); - JResponse::setHeader("Access-Control-Allow-Origin", "*"); + JFactory::getApplication()->setHeader('Content-Disposition','attachment;filename="getajax.json"'); + JFactory::getApplication()->setHeader("Access-Control-Allow-Origin", "*"); // load the tasks $this->registerTask('fieldRequired', 'ajax'); } diff --git a/admin/compiler/joomla_3/ajax.php b/admin/compiler/joomla_3/ajax.php index 5beef4772..198a571f4 100644 --- a/admin/compiler/joomla_3/ajax.php +++ b/admin/compiler/joomla_3/ajax.php @@ -60,7 +60,7 @@ class ###Component###ModelAjax extends JModelList $fields = array($name); } } - // load the remaining values to seesion + // load the remaining values to session if(###Component###Helper::checkArray($fields)) { $session->set($form.'_requiredFieldFix', $fields); diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index df2d66761..c6fbccf9b 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -24,8 +24,10 @@ class ComponentbuilderControllerAjax extends JControllerLegacy parent::__construct($config); // make sure all json stuff are set JFactory::getDocument()->setMimeEncoding( 'application/json' ); - JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"'); - JResponse::setHeader("Access-Control-Allow-Origin", "*"); + // get the application + $app = JFactory::getApplication(); + $app->setHeader('Content-Disposition','attachment;filename="getajax.json"'); + $app->setHeader('Access-Control-Allow-Origin', '*'); // load the tasks $this->registerTask('isNew', 'ajax'); $this->registerTask('isRead', 'ajax'); @@ -69,20 +71,26 @@ class ComponentbuilderControllerAjax extends JControllerLegacy public function ajax() { + // get the user for later use $user = JFactory::getUser(); + // get the input values $jinput = JFactory::getApplication()->input; + // check if we should return raw + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + // return to a callback function + $callback = $jinput->get('callback', null, 'CMD'); // Check Token! $token = JSession::getFormToken(); $call_token = $jinput->get('token', 0, 'ALNUM'); if($jinput->get($token, 0, 'ALNUM') || $token === $call_token) { + // get the task $task = $this->getTask(); switch($task) { case 'isNew': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $noticeValue = $jinput->get('notice', NULL, 'STRING'); if($noticeValue && $user->id != 0) { @@ -92,7 +100,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -107,10 +115,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -120,7 +132,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'isRead': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $noticeValue = $jinput->get('notice', NULL, 'STRING'); if($noticeValue && $user->id != 0) { @@ -130,7 +141,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -145,10 +156,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -158,7 +173,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getComponentDetails': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); if($idValue && $user->id != 0) { @@ -168,7 +182,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -183,10 +197,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -196,7 +214,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getCronPath': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $getTypeValue = $jinput->get('getType', NULL, 'WORD'); if($getTypeValue && $user->id != 0) { @@ -206,7 +223,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -221,10 +238,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -234,7 +255,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getJCBpackageInfo': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $urlValue = $jinput->get('url', NULL, 'STRING'); if($urlValue && $user->id != 0) { @@ -244,7 +264,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -259,10 +279,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -272,7 +296,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getCrowdinDetails': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $identifierValue = $jinput->get('identifier', NULL, 'CMD'); $keyValue = $jinput->get('key', NULL, 'ALNUM'); if($identifierValue && $user->id != 0 && $keyValue) @@ -283,7 +306,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -298,10 +321,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -311,7 +338,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getModuleCode': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $dataValue = $jinput->get('data', NULL, 'STRING'); if($dataValue && $user->id != 0) { @@ -321,7 +347,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -336,10 +362,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -349,7 +379,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getClassCode': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); $typeValue = $jinput->get('type', NULL, 'WORD'); if($idValue && $user->id != 0 && $typeValue) @@ -360,7 +389,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -375,10 +404,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -388,7 +421,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getClassCodeIds': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); $typeValue = $jinput->get('type', NULL, 'WORD'); if($idValue && $user->id != 0 && $typeValue) @@ -399,7 +431,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -414,10 +446,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -427,7 +463,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getClassHeaderCode': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); $typeValue = $jinput->get('type', NULL, 'WORD'); if($idValue && $user->id != 0 && $typeValue) @@ -438,7 +473,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -453,10 +488,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -466,7 +505,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'tableColumns': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $tableValue = $jinput->get('table', NULL, 'WORD'); if($tableValue && $user->id != 0) { @@ -476,7 +514,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -491,10 +529,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -504,7 +546,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'fieldSelectOptions': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); if($idValue && $user->id != 0) { @@ -514,7 +555,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -529,10 +570,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -542,7 +587,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getDynamicScripts': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'WORD'); if($typeValue && $user->id != 0) { @@ -552,7 +596,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -567,10 +611,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -580,7 +628,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getButton': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'WORD'); $sizeValue = $jinput->get('size', NULL, 'INT'); if($typeValue && $user->id != 0 && $sizeValue) @@ -591,7 +638,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -606,10 +653,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -619,7 +670,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getButtonID': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'WORD'); $sizeValue = $jinput->get('size', NULL, 'INT'); if($typeValue && $user->id != 0 && $sizeValue) @@ -630,7 +680,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -645,10 +695,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -658,7 +712,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getAjaxDisplay': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'WORD'); if($typeValue && $user->id != 0) { @@ -668,7 +721,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -683,10 +736,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -696,7 +753,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getLinked': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'ALNUM'); if($typeValue && $user->id != 0) { @@ -706,7 +762,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -721,10 +777,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -734,7 +794,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'checkAliasField': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'ALNUM'); if($typeValue && $user->id != 0) { @@ -744,7 +803,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -759,10 +818,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -772,7 +835,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'checkCategoryField': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $typeValue = $jinput->get('type', NULL, 'ALNUM'); if($typeValue && $user->id != 0) { @@ -782,7 +844,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -797,10 +859,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -810,7 +876,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'templateDetails': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', null, 'INT'); if($idValue && $user->id != 0) { @@ -820,7 +885,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -835,10 +900,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -848,7 +917,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getLayoutDetails': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); if($idValue && $user->id != 0) { @@ -858,7 +926,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -873,10 +941,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -886,7 +958,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'dbTableColumns': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $nameValue = $jinput->get('name', NULL, 'WORD'); $asValue = $jinput->get('as', NULL, 'WORD'); $typeValue = $jinput->get('type', NULL, 'INT'); @@ -898,7 +969,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -913,10 +984,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -926,7 +1001,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'viewTableColumns': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); $asValue = $jinput->get('as', NULL, 'WORD'); $typeValue = $jinput->get('type', NULL, 'INT'); @@ -938,7 +1012,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -953,10 +1027,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -966,7 +1044,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getDynamicValues': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); $viewValue = $jinput->get('view', NULL, 'WORD'); if($idValue && $user->id != 0 && $viewValue) @@ -977,7 +1054,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -992,10 +1069,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1005,7 +1086,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'checkFunctionName': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $functioNameValue = $jinput->get('functioName', NULL, 'STRING'); $idValue = $jinput->get('id', NULL, 'INT'); if($functioNameValue && $user->id != 0 && $idValue) @@ -1016,7 +1096,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1031,10 +1111,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1044,7 +1128,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'usedin': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $functioNameValue = $jinput->get('functioName', NULL, 'WORD'); $idValue = $jinput->get('id', NULL, 'INT'); $targetValue = $jinput->get('target', NULL, 'WORD'); @@ -1056,7 +1139,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1071,10 +1154,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1084,7 +1171,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getEditCustomCodeButtons': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); if($idValue && $user->id != 0) { @@ -1094,7 +1180,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1109,10 +1195,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1122,7 +1212,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'placedin': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $placeholderValue = $jinput->get('placeholder', NULL, 'WORD'); $idValue = $jinput->get('id', NULL, 'INT'); $targetValue = $jinput->get('target', NULL, 'WORD'); @@ -1134,7 +1223,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1149,10 +1238,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1162,7 +1255,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'checkPlaceholderName': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); $placeholderNameValue = $jinput->get('placeholderName', NULL, 'STRING'); if($idValue && $user->id != 0 && $placeholderNameValue) @@ -1173,7 +1265,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1188,10 +1280,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1201,7 +1297,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getExistingValidationRuleCode': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $nameValue = $jinput->get('name', NULL, 'WORD'); if($nameValue && $user->id != 0) { @@ -1211,7 +1306,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1226,10 +1321,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1239,7 +1338,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getValidationRulesTable': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); if($idValue && $user->id != 0) { @@ -1249,7 +1347,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1264,10 +1362,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1277,7 +1379,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'checkRuleName': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $nameValue = $jinput->get('name', NULL, 'STRING'); $idValue = $jinput->get('id', NULL, 'INT'); if($nameValue && $user->id != 0 && $idValue) @@ -1288,7 +1389,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1303,10 +1404,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1316,7 +1421,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'fieldTypeProperties': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); if($idValue) { @@ -1326,7 +1430,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1341,10 +1445,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1354,7 +1462,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getFieldPropertyDesc': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $propertyValue = $jinput->get('property', NULL, 'WORD'); $fieldtypeValue = $jinput->get('fieldtype', NULL, 'ALNUM'); if($propertyValue && $user->id != 0 && $fieldtypeValue) @@ -1365,7 +1472,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1380,10 +1487,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1393,7 +1504,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getCodeGlueOptions': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $listfieldValue = $jinput->get('listfield', NULL, 'INT'); $joinfieldsValue = $jinput->get('joinfields', NULL, 'STRING'); $typeValue = $jinput->get('type', NULL, 'INT'); @@ -1406,7 +1516,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1421,10 +1531,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1434,7 +1548,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'snippetDetails': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $idValue = $jinput->get('id', NULL, 'INT'); if($idValue && $user->id != 0) { @@ -1444,7 +1557,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1459,10 +1572,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1472,7 +1589,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'setSnippetGithub': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $pathValue = $jinput->get('path', NULL, 'STRING'); $statusValue = $jinput->get('status', NULL, 'WORD'); if($pathValue && $user->id != 0 && $statusValue) @@ -1483,7 +1599,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1498,10 +1614,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1511,7 +1631,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy case 'getSnippets': try { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); $librariesValue = $jinput->get('libraries', NULL, 'STRING'); if($librariesValue && $user->id != 0) { @@ -1521,7 +1640,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy { $result = false; } - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback . "(".json_encode($result).");"; } @@ -1536,10 +1655,14 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } catch(Exception $e) { - if($callback = $jinput->get('callback', null, 'CMD')) + if($callback) { echo $callback."(".json_encode($e).");"; } + elseif($returnRaw) + { + echo json_encode($e); + } else { echo "(".json_encode($e).");"; @@ -1550,10 +1673,15 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } else { - if($callback = $jinput->get('callback', null, 'CMD')) + // return to a callback function + if($callback) { echo $callback."(".json_encode(false).");"; } + elseif($returnRaw) + { + echo json_encode(false); + } else { echo "(".json_encode(false).");"; diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 85f04eb01..5dc92f7ce 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -4344,13 +4344,13 @@ class Interpretation extends Fields . $default['on_field'] . " is an array with values."; $methods .= PHP_EOL . $this->_t(2) . "\$array = (" - . $this->fileContentStatic[$this->hhh - . 'Component' . $this->hhh] - . "Helper::checkJson(\$" - . $default['on_field'] - . ", true)) ? json_decode(\$" - . $default['on_field'] . ",true) : \$" - . $default['on_field'] . ";"; + . $this->fileContentStatic[$this->hhh + . 'Component' . $this->hhh] + . "Helper::checkJson(\$" + . $default['on_field'] + . ", true)) ? json_decode(\$" + . $default['on_field'] . ",true) : \$" + . $default['on_field'] . ";"; $methods .= PHP_EOL . $this->_t(2) . "if (isset(\$array) && " . $this->fileContentStatic[$this->hhh @@ -17900,8 +17900,6 @@ class Interpretation extends Fields $cases .= PHP_EOL . $this->_t(4) . "case '" . $task . "':"; $cases .= PHP_EOL . $this->_t(5) . "try"; $cases .= PHP_EOL . $this->_t(5) . "{"; - $cases .= PHP_EOL . $this->_t(6) - . "\$returnRaw = \$jinput->get('raw', false, 'BOOLEAN');"; foreach ($input[$task] as $string) { $cases .= PHP_EOL . $this->_t(6) . $string; @@ -17936,7 +17934,7 @@ class Interpretation extends Fields } // continue the build $cases .= PHP_EOL . $this->_t(6) - . "if(\$callback = \$jinput->get('callback', null, 'CMD'))"; + . "if(\$callback)"; $cases .= PHP_EOL . $this->_t(6) . "{"; $cases .= PHP_EOL . $this->_t(7) . "echo \$callback . \"(\".json_encode(\$result).\");\";"; @@ -17955,11 +17953,17 @@ class Interpretation extends Fields $cases .= PHP_EOL . $this->_t(5) . "catch(Exception \$e)"; $cases .= PHP_EOL . $this->_t(5) . "{"; $cases .= PHP_EOL . $this->_t(6) - . "if(\$callback = \$jinput->get('callback', null, 'CMD'))"; + . "if(\$callback)"; $cases .= PHP_EOL . $this->_t(6) . "{"; $cases .= PHP_EOL . $this->_t(7) . "echo \$callback.\"(\".json_encode(\$e).\");\";"; $cases .= PHP_EOL . $this->_t(6) . "}"; + $cases .= PHP_EOL . $this->_t(6) + . "elseif(\$returnRaw)"; + $cases .= PHP_EOL . $this->_t(6) . "{"; + $cases .= PHP_EOL . $this->_t(7) + . "echo json_encode(\$e);"; + $cases .= PHP_EOL . $this->_t(6) . "}"; $cases .= PHP_EOL . $this->_t(6) . "else"; $cases .= PHP_EOL . $this->_t(6) . "{"; $cases .= PHP_EOL . $this->_t(7) diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 6bf26ab69..a10d04495 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -864,13 +864,13 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LABEL="Name" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_DESCRIPTION="The name of the list of records in this view" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_HINT="List of Records Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL="Name (list of records)
-Naming Conventions" +Naming Conventions" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_MESSAGE="Error! Please add list of records name here." COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_DESCRIPTION="Type null if single record view is not to be set" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_HINT="Single Record Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_LABEL="Name (single record)
-Naming Conventions" +Naming Conventions" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_SINGLE_MESSAGE="Error! Please add single record name here." COM_COMPONENTBUILDER_ADMIN_VIEW_NEW="A New Admin View" COM_COMPONENTBUILDER_ADMIN_VIEW_NEW_TAB="New Tab" @@ -4278,7 +4278,6 @@ COM_COMPONENTBUILDER_DASHBOARD_FIELDS="Fields

" COM_COMPONENTBUILDER_DASHBOARD_FIELDS_CATID="Categories For
Fields" COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES="Fieldtypes

" COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Categories For
Fieldtypes" -COM_COMPONENTBUILDER_DASHBOARD_FIELD_ADD="Add Field

" COM_COMPONENTBUILDER_DASHBOARD_GET_SNIPPETS="Get Snippets

" COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENTS="Help Documents

" COM_COMPONENTBUILDER_DASHBOARD_IMPORTJCBPACKAGES="Import JCB Packages

" @@ -4663,8 +4662,6 @@ COM_COMPONENTBUILDER_FIELDS_BATCH_USE="Fields Batch Use" COM_COMPONENTBUILDER_FIELDS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch fields" COM_COMPONENTBUILDER_FIELDS_CREATE="Fields Create" COM_COMPONENTBUILDER_FIELDS_CREATE_DESC="Allows the users in this group to create create fields" -COM_COMPONENTBUILDER_FIELDS_DASHBOARD_ADD="Fields Dashboard Add" -COM_COMPONENTBUILDER_FIELDS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of field" COM_COMPONENTBUILDER_FIELDS_DASHBOARD_LIST="Fields Dashboard List" COM_COMPONENTBUILDER_FIELDS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of field" COM_COMPONENTBUILDER_FIELDS_DELETE="Fields Delete" diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index bc6fe0238..2586687a3 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -534,8 +534,6 @@ COM_COMPONENTBUILDER_FIELDS_BATCH_USE="Fields Batch Use" COM_COMPONENTBUILDER_FIELDS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch fields" COM_COMPONENTBUILDER_FIELDS_CREATE="Fields Create" COM_COMPONENTBUILDER_FIELDS_CREATE_DESC="Allows the users in this group to create create fields" -COM_COMPONENTBUILDER_FIELDS_DASHBOARD_ADD="Fields Dashboard Add" -COM_COMPONENTBUILDER_FIELDS_DASHBOARD_ADD_DESC="Allows the users in this group to dashboard add of field" COM_COMPONENTBUILDER_FIELDS_DASHBOARD_LIST="Fields Dashboard List" COM_COMPONENTBUILDER_FIELDS_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of field" COM_COMPONENTBUILDER_FIELDS_DELETE="Fields Delete" diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 402e58bb6..95a3c6889 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -25,7 +25,7 @@ class ComponentbuilderModelComponentbuilder extends JModelList $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.help_documents') + 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.help_documents') ); // view access array $viewAccess = array( @@ -114,7 +114,6 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'field.access' => 'field.access', 'fields.submenu' => 'field.submenu', 'fields.dashboard_list' => 'field.dashboard_list', - 'field.dashboard_add' => 'field.dashboard_add', 'fieldtype.create' => 'fieldtype.create', 'fieldtypes.access' => 'fieldtype.access', 'fieldtype.access' => 'fieldtype.access', diff --git a/componentbuilder.xml b/componentbuilder.xml index e213ed676..5c244e2e3 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 27th August, 2021 + 31st August, 2021 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/script.php b/script.php index c859e4694..9fc8f2423 100644 --- a/script.php +++ b/script.php @@ -6631,7 +6631,7 @@ class com_componentbuilderInstallerScript { $rule_length = $db->loadResult(); // Check the size of the rules column - if ($rule_length <= 94400) + if ($rule_length <= 94240) { // Fix the assets table rules column size $fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to MEDIUMTEXT by JCB';";