Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #174 from scnakandala/Branch_blob_error

Javascript cannot read local files for security reasons, so we can't send the data using AJAX. So I have disabled ajax for insert forms which has 'blob' fields.
  • Loading branch information...
commit e1c82ac7dda1341fbdc98c3eafb957e6159b98e5 2 parents 4f39ce9 + 6e7aa4f
@ruleant ruleant authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 tbl_change.php
View
14 tbl_change.php
@@ -214,7 +214,19 @@
);
//Insert/Edit form
-$html_output .= '<form id="insertForm" method="post" action="tbl_replace.php" name="insertForm" ';
+//If table has blob fields we have to disable ajax.
+$has_blob_field = false;
+foreach ($table_fields as $column) {
+ if (PMA_isColumnBlob($column)) {
+ $has_blob_field = true;
+ break;
+ }
+}
+$html_output .='<form id="insertForm" ';
+if ($has_blob_field && $is_upload) {
+ $html_output .='class="disableAjax" ';
+}
+$html_output .='method="post" action="tbl_replace.php" name="insertForm" ';
if ($is_upload) {
$html_output .= ' enctype="multipart/form-data"';
}
Please sign in to comment.
Something went wrong with that request. Please try again.