[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_5-6126-gd46bb6d

Marc Delisle lem9 at users.sourceforge.net
Tue Aug 3 22:21:27 CEST 2010


The branch, master has been updated
       via  d46bb6d87767ae7e9da1e4182f95ba1d885e26e9 (commit)
      from  29cc23905784221598960c1434c010b36cdcdeb0 (commit)


- Log -----------------------------------------------------------------
commit d46bb6d87767ae7e9da1e4182f95ba1d885e26e9
Author: Marc Delisle <marc at infomarc.info>
Date:   Tue Aug 3 16:21:17 2010 -0400

    remove custom MIME type change for BLOB streaming because in its current version it can be a very costly operation

-----------------------------------------------------------------------

Summary of changes:
 Documentation.html              |    2 +-
 bs_change_mime_type.php         |   48 ---------------------------------------
 js/functions.js                 |   40 --------------------------------
 libraries/blobstreaming.lib.php |    3 +-
 4 files changed, 3 insertions(+), 90 deletions(-)
 delete mode 100644 bs_change_mime_type.php

diff --git a/Documentation.html b/Documentation.html
index 8e6e911..5797984 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -4321,7 +4321,7 @@ chmod o+rwx tmp
 	<li>In <tt>config.inc.php</tt> your host should be defined with a FQDN (fully qualified domain name) instead of "localhost".</li>
     <li>Ensure that your target table is under the <tt>PBXT</tt> storage engine and has a <tt>LONGBLOB</tt> column (which must be nullable if you want to remove the BLOB reference from it).</li>
 	<li>When you insert or update a row in this table, put a checkmark on the "Upload to BLOB repository" optional choice; otherwise, the upload will be done directly in your LONGBLOB column instead of the repository.</li>
-	<li>Finally when you browse your table, you'll see in your column a link to stream your data, for example "View image". A header containing the correct MIME-type will be sent to your browser; this MIME-type was stored at upload time but in case it's incorrect, it's possible to edit it by clicking on the displayed MIME-type.</li> 
+	<li>Finally when you browse your table, you'll see in your column a link to stream your data, for example "View image". A header containing the correct MIME-type will be sent to your browser; this MIME-type was stored at upload time.</li> 
 </ol>	
 
 <h4 id="faq6_26">
diff --git a/bs_change_mime_type.php b/bs_change_mime_type.php
deleted file mode 100644
index edefae1..0000000
--- a/bs_change_mime_type.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/* vim: set expandtab sw=4 ts=4 sts=4: */
-    /**
-     * @package     BLOBStreaming
-     */
-
-    /**
-     * Core library.
-     */
-    require_once './libraries/common.inc.php';
-
-    /**
-     * @var     string  contains database name
-     */
-    $bsDB = isset($_REQUEST['bs_db']) ? urldecode($_REQUEST['bs_db']) : NULL;
-
-    /**
-     * @var     string  contains table name
-     */
-    $bsTable = isset($_REQUEST['bs_table']) ? urldecode($_REQUEST['bs_table']) : NULL;
-
-    /**
-     * @var     string  contains BLOB reference
-     */
-    $bsReference = isset($_REQUEST['bs_reference']) ? urldecode($_REQUEST['bs_reference']) : NULL;
-
-    /**
-     * @var     string  contains MIME type
-     */
-    $bsNewMIMEType = isset($_REQUEST['bs_new_mime_type']) ? urldecode($_REQUEST['bs_new_mime_type']) : NULL;
-
-    // necessary variables exist
-   if ($bsDB && $bsTable && $bsReference && $bsNewMIMEType)
-    {
-        if (PMA_BS_SetContentType($bsDB, $bsTable, $bsReference, $bsNewMIMEType)) {
-            // determine redirector page
-            $newLoc = $cfg['PmaAbsoluteUri'] . 'sql.php?' . PMA_generate_common_url ('','', '&') . (isset($bsDB) ? '&db=' . urlencode($bsDB) : '') . (isset($bsTable) ? '&table=' . urlencode($bsTable) : '') . (isset($token) ? '&token=' . urlencode($token) : '') . (isset($goto) ? '&goto=' . urlencode($goto) : '') . '&reload=1&purge=1';
-
-            // redirect to specified page
-            ?>
-<script>
-window.location = "<?php echo $newLoc ?>";
-</script>
-            <?php
-        } // end if ($result)
-    } // end if ($bsDB && $bsTable && $bsReference && $bsNewMIMEType)
-
-?>
diff --git a/js/functions.js b/js/functions.js
index 162e80c..3ebdcbf 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1661,46 +1661,6 @@ function popupBSMedia(url_params, bs_ref, m_type, is_cust_type, w_width, w_heigh
 }
 
 /**
- * popups a request for changing MIME types for files in the BLOB repository
- *
- * @param   var     db                      database name
- * @param   var     table                   table name
- * @param   var     reference               BLOB repository reference
- * @param   var     current_mime_type       current MIME type associated with BLOB repository reference
- */
-function requestMIMETypeChange(db, table, reference, current_mime_type)
-{
-    // no mime type specified, set to default (nothing)
-    if (undefined == current_mime_type)
-        current_mime_type = "";
-
-    // prompt user for new mime type
-    var new_mime_type = prompt("Enter custom MIME type", current_mime_type);
-
-    // if new mime_type is specified and is not the same as the previous type, request for mime type change
-    if (new_mime_type && new_mime_type != current_mime_type)
-        changeMIMEType(db, table, reference, new_mime_type);
-}
-
-/**
- * changes MIME types for files in the BLOB repository
- *
- * @param   var     db              database name
- * @param   var     table           table name
- * @param   var     reference       BLOB repository reference
- * @param   var     mime_type       new MIME type to be associated with BLOB repository reference
- */
-function changeMIMEType(db, table, reference, mime_type)
-{
-    // specify url and parameters for jQuery POST
-    var mime_chg_url = 'bs_change_mime_type.php';
-    var params = { bs_db: db, bs_table: table, bs_reference: reference, bs_new_mime_type: mime_type };
-
-    // jQuery POST
-    jQuery.post(mime_chg_url, params);
-}
-
-/**
  * Jquery Coding for inline editing SQL_QUERY
  */
 $(document).ready(function(){
diff --git a/libraries/blobstreaming.lib.php b/libraries/blobstreaming.lib.php
index 707fc24..594e5f1 100644
--- a/libraries/blobstreaming.lib.php
+++ b/libraries/blobstreaming.lib.php
@@ -332,7 +332,8 @@ function PMA_BS_CreateReferenceLink($bs_reference, $db_name)
         return 'Error';
     }
 
-    $output = "<a href=\"#\" onclick=\"requestMIMETypeChange('" . urlencode($db_name) . "', '" . urlencode($GLOBALS['table']) . "', '" . urlencode($bs_reference) . "', '" . urlencode($content_type) . "')\">$content_type</a>";
+    //$output = "<a href=\"#\" onclick=\"requestMIMETypeChange('" . urlencode($db_name) . "', '" . urlencode($GLOBALS['table']) . "', '" . urlencode($bs_reference) . "', '" . urlencode($content_type) . "')\">$content_type</a>";
+    $output = $content_type;
 
     // specify custom HTML for various content types
     switch ($content_type) {


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list