diff --git a/libraries/insert_edit.lib.php b/libraries/insert_edit.lib.php
index 6d8de79f1f..d90d3b1aad 100644
--- a/libraries/insert_edit.lib.php
+++ b/libraries/insert_edit.lib.php
@@ -2574,4 +2574,326 @@ function PMA_getUrlParameters($db, $table)
return $url_params;
}
-?>
+
+/**
+ * Function to get html for the gis editor div
+ *
+ * @return string
+ */
+function PMA_getHtmlForGisEditor()
+{
+ return '
'
+ . ''
+ . ' ';
+}
+
+/**
+ * Function to get html for the ignore option in insert mode
+ *
+ * @param int $row_id row id
+ *
+ * @return string
+ */
+function PMA_getHtmlForIgnoreOption($row_id)
+{
+ return ''
+ .' ' . "\n";
+}
+
+/**
+ * Function to get html for the function option
+ *
+ * @param bool $odd_row whether odd row or not
+ * @param array $column column
+ * @param string $column_name_appendix column name appendix
+ *
+ * @return String
+ */
+function PMA_getHtmlForFunctionOption($odd_row, $column, $column_name_appendix)
+{
+ $longDoubleTextArea = $GLOBALS['cfg']['LongtextDoubleTextarea'];
+ return '
'
+ . '
'
+ . $column['Field_title']
+ . ''
+ . '
';
+
+}
+
+/**
+ * Function to get html for the field type
+ *
+ * @param array $column column
+ *
+ * @return string
+ */
+function PMA_getHtmlForFieldType($column)
+{
+ return '
'
+ . '' . $column['pma_type'] . ''
+ . '
';
+
+}
+
+/**
+ * Function to get html for the insert edit form header
+ *
+ * @param bool $has_blob_field whether has blob field
+ * @param bool $is_upload whether is upload
+ *
+ * @return string
+ */
+function PMA_getHtmlForInsertEditFormHeader($has_blob_field, $is_upload)
+{
+ $html_output ='
';
+
+ return $html_output;
+}
+
+/**
+ * Function to get html for each inset/edit row
+ *
+ * @param array $url_params url parameters
+ * @param array $table_columns table columns
+ * @param array $column column
+ * @param array $comments_map comments map
+ * @param bool $timestamp_seen whether timestamp seen
+ * @param array $current_result current result
+ * @param string $chg_evt_handler javascript change event handler
+ * @param string $jsvkey javascript validation key
+ * @param string $vkey validation key
+ * @param bool $insert_mode whether insert mode
+ * @param array $current_row current row
+ * @param int &$o_rows row offset
+ * @param int &$tabindex tab index
+ * @param int $columns_cnt columns count
+ * @param bool $is_upload whether upload
+ * @param int $tabindex_for_function tab index offset for function
+ * @param array $foreigners foreigners
+ * @param int $tabindex_for_null tab index offset for null
+ * @param int $tabindex_for_value tab index offset for value
+ * @param string $table table
+ * @param string $db database
+ * @param int $row_id row id
+ * @param array $titles titles
+ * @param int $biggest_max_file_size biggest max file size
+ * @param string $text_dir text direction
+ *
+ * @return string
+ */
+function PMA_getHtmlForInsertEditRow($url_params, $table_columns,
+ $column, $comments_map, $timestamp_seen, $current_result, $chg_evt_handler,
+ $jsvkey, $vkey, $insert_mode, $current_row, &$o_rows, &$tabindex, $columns_cnt,
+ $is_upload, $tabindex_for_function, $foreigners, $tabindex_for_null,
+ $tabindex_for_value, $table, $db, $row_id, $titles,
+ $biggest_max_file_size, $text_dir
+) {
+ $html_output = PMA_getHeadAndFootOfInsertRowTable($url_params)
+ . '';
+
+ //store the default value for CharEditing
+ $default_char_editing = $GLOBALS['cfg']['CharEditing'];
+
+ $odd_row = true;
+ for ($i = 0; $i < $columns_cnt; $i++) {
+ $html_output .= PMA_getHtmlForInsertEditFormColumn(
+ $table_columns, $i, $column, $comments_map, $timestamp_seen,
+ $current_result, $chg_evt_handler, $jsvkey, $vkey, $insert_mode,
+ $current_row, $odd_row, $o_rows, $tabindex, $columns_cnt, $is_upload,
+ $tabindex_for_function, $foreigners, $tabindex_for_null,
+ $tabindex_for_value, $table, $db, $row_id, $titles,
+ $biggest_max_file_size, $default_char_editing, $text_dir
+ );
+ $odd_row = !$odd_row;
+ } // end for
+ $o_rows++;
+ $html_output .= ' '
+ . ' ';
+
+ return $html_output;
+}
+?>
\ No newline at end of file
diff --git a/tbl_change.php b/tbl_change.php
index cf11fbcfb4..596cbd0c7d 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -29,7 +29,9 @@ require_once 'libraries/insert_edit.lib.php';
list(
$insert_mode, $where_clause, $where_clause_array, $where_clauses,
$result, $rows, $found_unique_key, $after_insert
-) = PMA_determineInsertOrEdit($where_clause, $db, $table);
+) = PMA_determineInsertOrEdit(
+ isset($where_clause) ? $where_clause : null, $db, $table
+ );
/**
* file listing
@@ -123,8 +125,6 @@ $url_params = PMA_urlParamsInEditMode(
$url_params, $where_clause_array, $where_clause
);
-//Insert/Edit form
-//If table has blob fields we have to disable ajax.
$has_blob_field = false;
foreach ($table_columns as $column) {
if (PMA_isColumnBlob($column)) {
@@ -132,15 +132,11 @@ foreach ($table_columns as $column) {
break;
}
}
-$html_output .='