From 60822fcfed13786d1e7d86b10faecda6d2195def Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 28 Dec 2012 23:39:18 +0000 Subject: [PATCH] Again usual change ... (you know what) --- inc/libs/network_functions.php | 35 ++++--------------- inc/mysql-manager.php | 2 +- .../admin_add_config_network_type_form.tpl | 2 +- templates/de/html/admin/admin_add_network.tpl | 2 +- .../admin_add_network_array_translation.tpl | 2 +- .../admin/admin_add_network_request_param.tpl | 2 +- .../de/html/admin/admin_add_network_type.tpl | 2 +- .../admin/admin_add_network_vcheck_param.tpl | 2 +- .../admin_edit_config_network_type_form.tpl | 2 +- 9 files changed, 15 insertions(+), 36 deletions(-) diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index 735b1a5335..1787a7518f 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -62,11 +62,14 @@ function detectNetworkProcessForm () { $GLOBALS['network_form_name'] = 'invalid'; // Now search all valid - foreach (array('ok', 'edit', 'delete', 'do_edit', 'do_delete') as $form) { + foreach (array('save_config', 'add', 'edit', 'delete', 'do_edit', 'do_delete') as $formName) { // Is it detected - if (isFormSent($form)) { + if (isFormSent($formName)) { // Use this form name - $GLOBALS['network_form_name'] = $form; + $GLOBALS['network_form_name'] = $formName; + + // Remove it generically here + unsetPostRequestElement($formName); // Abort loop break; @@ -76,7 +79,7 @@ function detectNetworkProcessForm () { // Has the form being detected? if ($GLOBALS['network_form_name'] == 'invalid') { // Not supported - reportBug(__FUNCTION__, __LINE__, 'POST form could not be detected.'); + reportBug(__FUNCTION__, __LINE__, 'POST form could not be detected, postData=
' . print_r(postRequestArray(), TRUE));
 	} // END - if
 }
 
@@ -1138,9 +1141,6 @@ function doAdminNetworkProcessAddNetwork () {
 		return FALSE;
 	} // END - if
 
-	// Remove the 'ok' part
-	unsetPostRequestElement('ok');
-
 	// Add the whole request to database
 	SQL_QUERY(getInsertSqlFromArray(postRequestArray(), 'network_data'), __FUNCTION__, __LINE__);
 
@@ -1403,9 +1403,6 @@ function doAdminNetworkProcessAddNetworkType () {
 		return FALSE;
 	} // END - if
 
-	// Remove the 'ok' part
-	unsetPostRequestElement('ok');
-
 	// Add id
 	setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
 
@@ -1679,9 +1676,6 @@ function doAdminNetworkProcessAddRequestParam () {
 		return FALSE;
 	} // END - if
 
-	// Remove the 'ok' part
-	unsetPostRequestElement('ok');
-
 	// Add id
 	setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
 
@@ -1715,9 +1709,6 @@ function doAdminNetworkProcessAddVcheckParam () {
 		return FALSE;
 	} // END - if
 
-	// Remove the 'ok' part
-	unsetPostRequestElement('ok');
-
 	// Add id
 	setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
 
@@ -1751,9 +1742,6 @@ function doAdminNetworkProcessAddNetworkArrayTranslation () {
 		return FALSE;
 	} // END - if
 
-	// Remove the 'ok' part
-	unsetPostRequestElement('ok');
-
 	// Add id
 	setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
 
@@ -1846,9 +1834,6 @@ function doAdminNetworkProcessHandleArrayTranslations () {
 
 // Adds/update network API configuration
 function doAdminNetworkProcessNetworkApiConfig () {
-	// Remove the 'ok' part
-	unsetPostRequestElement('ok');
-
 	// Add id
 	setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
 
@@ -1882,9 +1867,6 @@ function doAdminNetworkProcessNetworkApiConfig () {
 
 // Only adds network type configuration if not yet present
 function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE) {
-	// Remove the 'ok' part
-	unsetPostRequestElement('ok');
-
 	// Add both ids
 	setPostRequestElement('network_id', bigintval(getRequestElement('network_id')));
 	setPostRequestElement('network_type_id', bigintval(getRequestElement('network_type_id')));
@@ -1977,9 +1959,6 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE) {
 
 // Only changes network type configuration if not yet present
 function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE) {
-	// Remove the 'ok' part
-	unsetPostRequestElement('ok');
-
 	/*
 	 * Some parameters are optional, at least one must be given so check a bunch
 	 * of parameters.
diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php
index cc61386194..1c60912a01 100644
--- a/inc/mysql-manager.php
+++ b/inc/mysql-manager.php
@@ -2054,7 +2054,7 @@ function doGenericAddEntries ($tableName, $columns = array(), $filterFunctions =
 		$search = key(search_array($columns, 'column', $columnName));
 
 		// Try to handle call-back functions and/or extra values on the list
-		//* DEBUG: */ outputHtml($key . '/' . $columnName . '=
'.print_r($columns,true).'
search_array()=
'.print_r(search_array($columns, 'column', $columnName), true).'
'); + //* DEBUG: */ outputHtml($key . '/' . $columnName . '=
'.print_r($columns,true).'
search_array()=
'.print_r(search_array($columns, 'column', $columnName), TRUE).'
'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlValues[' . $key . '(' . gettype($key) . ')][' . gettype($sqlValues[$key]) . ']=' . $sqlValues[$key] . ' - BEFORE!'); if (is_string($key)) { // Key is a string diff --git a/templates/de/html/admin/admin_add_config_network_type_form.tpl b/templates/de/html/admin/admin_add_config_network_type_form.tpl index 5d424426ff..ec02f62bbf 100644 --- a/templates/de/html/admin/admin_add_config_network_type_form.tpl +++ b/templates/de/html/admin/admin_add_config_network_type_form.tpl @@ -41,7 +41,7 @@ {%form_close%} diff --git a/templates/de/html/admin/admin_add_network.tpl b/templates/de/html/admin/admin_add_network.tpl index 761401fbf6..c2e1c580c4 100644 --- a/templates/de/html/admin/admin_add_network.tpl +++ b/templates/de/html/admin/admin_add_network.tpl @@ -65,7 +65,7 @@ - + diff --git a/templates/de/html/admin/admin_add_network_array_translation.tpl b/templates/de/html/admin/admin_add_network_array_translation.tpl index 67bd737b54..e4b097abc7 100644 --- a/templates/de/html/admin/admin_add_network_array_translation.tpl +++ b/templates/de/html/admin/admin_add_network_array_translation.tpl @@ -28,7 +28,7 @@ - + diff --git a/templates/de/html/admin/admin_add_network_request_param.tpl b/templates/de/html/admin/admin_add_network_request_param.tpl index 0217d37cf9..c8ae95e316 100644 --- a/templates/de/html/admin/admin_add_network_request_param.tpl +++ b/templates/de/html/admin/admin_add_network_request_param.tpl @@ -40,7 +40,7 @@ - + diff --git a/templates/de/html/admin/admin_add_network_type.tpl b/templates/de/html/admin/admin_add_network_type.tpl index 57af05e89e..1afc270eea 100644 --- a/templates/de/html/admin/admin_add_network_type.tpl +++ b/templates/de/html/admin/admin_add_network_type.tpl @@ -52,7 +52,7 @@ - + diff --git a/templates/de/html/admin/admin_add_network_vcheck_param.tpl b/templates/de/html/admin/admin_add_network_vcheck_param.tpl index 09a6da5a82..2a3750c7b6 100644 --- a/templates/de/html/admin/admin_add_network_vcheck_param.tpl +++ b/templates/de/html/admin/admin_add_network_vcheck_param.tpl @@ -32,7 +32,7 @@ - + diff --git a/templates/de/html/admin/admin_edit_config_network_type_form.tpl b/templates/de/html/admin/admin_edit_config_network_type_form.tpl index 50dc745be7..89b2630989 100644 --- a/templates/de/html/admin/admin_edit_config_network_type_form.tpl +++ b/templates/de/html/admin/admin_edit_config_network_type_form.tpl @@ -42,7 +42,7 @@ {%form_close%} -- 2.39.2