// Handle a (maybe) sent form here
function doNetworkHandleForm () {
// Is there a form sent?
- if (countRequestPost() > 0) {
+ if ((!isPostRequestElementSet('save_expert')) && (countRequestPost() > 0)) {
// Detect sent POST form
detectNetworkProcessForm();
} elseif (!isGetRequestElementSet('do')) {
// Processes an admin form
function doAdminNetworkProcessForm () {
// Create function name
- $functionName = sprintf("doAdminNetworkProcess%s", capitalizeUnderscoreString(getRequestElement('do')));
+ $functionName = sprintf('doAdminNetworkProcess%s', capitalizeUnderscoreString(getRequestElement('do')));
// Is the function valid?
if (!function_exists($functionName)) {
} // END - while
// Nothing found?
- if (count($rows) == 0) {
+ if (!isFilledArray($rows)) {
// Then return nothing ... ;-)
return '';
} // END - if
$networkData = getNetworkDataFromId($networkId);
// Is there found the network?
- if (count($networkData) > 0) {
+ if (isFilledArray($networkData)) {
// Add row template with given form name
$OUT .= loadTemplate('admin_' . getNetworkFormName() . '_networks_row', TRUE, $networkData);
} // END - if
$networkTypeData = getNetworkTypeDataByTypeId($networkId);
// Is there found the network?
- if (count($networkTypeData) > 0) {
+ if (isFilledArray($networkTypeData)) {
if (getNetworkFormName() == 'edit') {
// Add row template for deleting
$OUT .= loadTemplate('admin_edit_network_types_row', TRUE, $networkTypeData);
$networkRequestData = getNetworkRequestParamsDataFromId($networkId);
// Is there found the network?
- if (count($networkRequestData) > 0) {
+ if (isFilledArray($networkRequestData)) {
if (getNetworkFormName() == 'edit') {
// Add row template for deleting
$OUT .= loadTemplate('admin_edit_network_request_params_row', TRUE, $networkRequestData);
$networkTranslationsData = getNetworkArrayTranslationsDataFromId($networkId);
// Is there found the network?
- if (count($networkTranslationsData) > 0) {
+ if (isFilledArray($networkTranslationsData)) {
if (getNetworkFormName() == 'edit') {
// Add row template for deleting
$OUT .= loadTemplate('admin_edit_network_array_translation_row', TRUE, $networkTranslationsData);
$requestParams = getNetworkRequestParametersByTypeId(postRequestElement('network_type_id'));
// Is there at least one entry?
- if (count($requestParams) == 0) {
+ if (!isFilledArray($requestParams)) {
// No entry found, please setup some first
reportBug(__FUNCTION__, __LINE__, 'Network ' . $networkData['network_title'] . ' with id ' . $networkData['network_id'] . ' has no request parameters.');
} // END - if