mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
- Added function isEmptyString to fhc_helper
- Added function isEmptyArray to fhc_helper - Adapted the code in application/* to use as much as possible this two new functions - Removed the php function empty almost everywhere
This commit is contained in:
@@ -63,7 +63,8 @@ class UDFLib
|
||||
*/
|
||||
public function UDFWidget($args, $htmlArgs = array())
|
||||
{
|
||||
if (!empty($args[UDFLib::SCHEMA_ARG_NAME]) && !empty($args[UDFLib::TABLE_ARG_NAME]))
|
||||
if ((isset($args[UDFLib::SCHEMA_ARG_NAME]) && !isEmptyString($args[UDFLib::SCHEMA_ARG_NAME]))
|
||||
&& (isset($args[UDFLib::TABLE_ARG_NAME]) && !isEmptyString($args[UDFLib::TABLE_ARG_NAME])))
|
||||
{
|
||||
// Loads the widget library
|
||||
$this->_ci->load->library('WidgetLib');
|
||||
@@ -72,7 +73,7 @@ class UDFLib
|
||||
loadResource(APPPATH.'widgets/udf');
|
||||
|
||||
// Default external block is true
|
||||
if (empty($args[UDFLib::FIELD_ARG_NAME]) && !isset($htmlArgs[HTMLWidget::EXTERNAL_BLOCK]))
|
||||
if (!isset($args[UDFLib::FIELD_ARG_NAME]) && !isset($htmlArgs[HTMLWidget::EXTERNAL_BLOCK]))
|
||||
{
|
||||
$htmlArgs[HTMLWidget::EXTERNAL_BLOCK] = true;
|
||||
}
|
||||
@@ -85,11 +86,11 @@ class UDFLib
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($args[UDFLib::SCHEMA_ARG_NAME]))
|
||||
if (!isset($args[UDFLib::SCHEMA_ARG_NAME]) || isEmptyString($args[UDFLib::SCHEMA_ARG_NAME]))
|
||||
{
|
||||
show_error(UDFLib::SCHEMA_ARG_NAME.' parameter is missing!');
|
||||
}
|
||||
if (empty($args[UDFLib::TABLE_ARG_NAME]))
|
||||
if (!isset($args[UDFLib::TABLE_ARG_NAME]) || isEmptyString($args[UDFLib::TABLE_ARG_NAME]))
|
||||
{
|
||||
show_error(UDFLib::TABLE_ARG_NAME.' parameter is missing!');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user