Resolved gh-323 so we can load fields only in the linked or admin list views or in both. Added the option to also add permission to access fields. Improved the checkArray method to return arry count value. Fixed issue in field permissions when the value is and array, field type can not be made hidden, but should instead just be removed. Fixed an issue in the code search methods to insure all areas are looked at, and search and export.

This commit is contained in:
2018-10-29 18:38:00 +02:00
parent 1e5fda0327
commit 6c4bab5ea9
58 changed files with 556 additions and 355 deletions

View File

@ -854,11 +854,11 @@ abstract class ###Component###Helper
*
* @input array The array to check
*
* @returns bool true on success
* @returns bool/int number of items in array on success
**/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && count((array)$array) > 0)
if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@ -872,7 +872,7 @@ abstract class ###Component###Helper
}
return self::checkArray($array, false);
}
return true;
return $nr;
}
return false;
}

View File

@ -846,11 +846,11 @@ abstract class ###Component###Helper
*
* @input array The array to check
*
* @returns bool true on success
* @returns bool/int number of items in array on success
**/
public static function checkArray($array, $removeEmptyString = false)
{
if (isset($array) && is_array($array) && count((array)$array) > 0)
if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@ -864,7 +864,7 @@ abstract class ###Component###Helper
}
return self::checkArray($array, false);
}
return true;
return $nr;
}
return false;
}

View File

@ -222,7 +222,7 @@ class ###Component###Table###View### extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)