Fixed gh-458 so that the && is not added if we have no extra values to validate. Added linked to details to Joomla Plugin area.

This commit is contained in:
2019-08-15 16:26:46 +02:00
parent 3a27038164
commit 04ed58afe8
8 changed files with 37 additions and 43 deletions

View File

@ -271,7 +271,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$identifierValue = $jinput->get('identifier', NULL, 'CMD');
$keyValue = $jinput->get('key', NULL, 'ALNUM');
if($identifierValue && $keyValue && $user->id != 0)
if($identifierValue && $user->id != 0 && $keyValue)
{
$result = $this->getModel('ajax')->getCrowdinDetails($identifierValue, $keyValue);
}
@ -310,7 +310,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($idValue && $typeValue && $user->id != 0)
if($idValue && $user->id != 0 && $typeValue)
{
$result = $this->getModel('ajax')->getClassCode($idValue, $typeValue);
}
@ -349,7 +349,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($idValue && $typeValue && $user->id != 0)
if($idValue && $user->id != 0 && $typeValue)
{
$result = $this->getModel('ajax')->getClassCodeIds($idValue, $typeValue);
}
@ -388,7 +388,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$typeValue = $jinput->get('type', NULL, 'WORD');
if($idValue && $typeValue && $user->id != 0)
if($idValue && $user->id != 0 && $typeValue)
{
$result = $this->getModel('ajax')->getClassHeaderCode($idValue, $typeValue);
}
@ -541,7 +541,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$typeValue = $jinput->get('type', NULL, 'WORD');
$sizeValue = $jinput->get('size', NULL, 'INT');
if($typeValue && $sizeValue && $user->id != 0)
if($typeValue && $user->id != 0 && $sizeValue)
{
$result = $this->getModel('ajax')->getButton($typeValue, $sizeValue);
}
@ -580,7 +580,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$typeValue = $jinput->get('type', NULL, 'WORD');
$sizeValue = $jinput->get('size', NULL, 'INT');
if($typeValue && $sizeValue && $user->id != 0)
if($typeValue && $user->id != 0 && $sizeValue)
{
$result = $this->getModel('ajax')->getButtonID($typeValue, $sizeValue);
}
@ -810,7 +810,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$nameValue = $jinput->get('name', NULL, 'WORD');
$asValue = $jinput->get('as', NULL, 'WORD');
$typeValue = $jinput->get('type', NULL, 'INT');
if($nameValue && $asValue && $typeValue && $user->id != 0)
if($nameValue && $user->id != 0 && $asValue && $typeValue)
{
$result = $this->getModel('ajax')->getDbTableColumns($nameValue, $asValue, $typeValue);
}
@ -850,7 +850,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$idValue = $jinput->get('id', NULL, 'INT');
$asValue = $jinput->get('as', NULL, 'WORD');
$typeValue = $jinput->get('type', NULL, 'INT');
if($idValue && $asValue && $typeValue && $user->id != 0)
if($idValue && $user->id != 0 && $asValue && $typeValue)
{
$result = $this->getModel('ajax')->getViewTableColumns($idValue, $asValue, $typeValue);
}
@ -889,7 +889,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$viewValue = $jinput->get('view', NULL, 'WORD');
if($idValue && $viewValue && $user->id != 0)
if($idValue && $user->id != 0 && $viewValue)
{
$result = $this->getModel('ajax')->getDynamicValues($idValue, $viewValue);
}
@ -928,7 +928,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$functioNameValue = $jinput->get('functioName', NULL, 'STRING');
$idValue = $jinput->get('id', NULL, 'INT');
if($functioNameValue && $idValue && $user->id != 0)
if($functioNameValue && $user->id != 0 && $idValue)
{
$result = $this->getModel('ajax')->checkFunctionName($functioNameValue, $idValue);
}
@ -968,7 +968,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$functioNameValue = $jinput->get('functioName', NULL, 'WORD');
$idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'WORD');
if($functioNameValue && $idValue && $targetValue && $user->id != 0)
if($functioNameValue && $user->id != 0 && $idValue && $targetValue)
{
$result = $this->getModel('ajax')->usedin($functioNameValue, $idValue, $targetValue);
}
@ -1046,7 +1046,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$placeholderValue = $jinput->get('placeholder', NULL, 'WORD');
$idValue = $jinput->get('id', NULL, 'INT');
$targetValue = $jinput->get('target', NULL, 'WORD');
if($placeholderValue && $idValue && $targetValue && $user->id != 0)
if($placeholderValue && $user->id != 0 && $idValue && $targetValue)
{
$result = $this->getModel('ajax')->placedin($placeholderValue, $idValue, $targetValue);
}
@ -1085,7 +1085,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$idValue = $jinput->get('id', NULL, 'INT');
$placeholderNameValue = $jinput->get('placeholderName', NULL, 'STRING');
if($idValue && $placeholderNameValue && $user->id != 0)
if($idValue && $user->id != 0 && $placeholderNameValue)
{
$result = $this->getModel('ajax')->checkPlaceholderName($idValue, $placeholderNameValue);
}
@ -1200,7 +1200,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$nameValue = $jinput->get('name', NULL, 'STRING');
$idValue = $jinput->get('id', NULL, 'INT');
if($nameValue && $idValue && $user->id != 0)
if($nameValue && $user->id != 0 && $idValue)
{
$result = $this->getModel('ajax')->checkRuleName($nameValue, $idValue);
}
@ -1277,7 +1277,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$propertyValue = $jinput->get('property', NULL, 'WORD');
$fieldtypeValue = $jinput->get('fieldtype', NULL, 'ALNUM');
if($propertyValue && $fieldtypeValue && $user->id != 0)
if($propertyValue && $user->id != 0 && $fieldtypeValue)
{
$result = $this->getModel('ajax')->getFieldPropertyDesc($propertyValue, $fieldtypeValue);
}
@ -1318,7 +1318,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$joinfieldsValue = $jinput->get('joinfields', NULL, 'STRING');
$typeValue = $jinput->get('type', NULL, 'INT');
$areaValue = $jinput->get('area', NULL, 'INT');
if($listfieldValue && $joinfieldsValue && $typeValue && $areaValue && $user->id != 0)
if($listfieldValue && $user->id != 0 && $joinfieldsValue && $typeValue && $areaValue)
{
$result = $this->getModel('ajax')->getCodeGlueOptions($listfieldValue, $joinfieldsValue, $typeValue, $areaValue);
}
@ -1395,7 +1395,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$pathValue = $jinput->get('path', NULL, 'STRING');
$statusValue = $jinput->get('status', NULL, 'WORD');
if($pathValue && $statusValue && $user->id != 0)
if($pathValue && $user->id != 0 && $statusValue)
{
$result = $this->getModel('ajax')->setSnippetGithub($pathValue, $statusValue);
}