diff --git a/ChangeLog b/ChangeLog index 3715bb0d1..46bc03f80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA 3.1.0.0 (not yet released) - bug #2046883 [core] Notices about deprecated dl() (so stop using it) ++ BLOBstreaming support, thanks to Raj Kissu Rajandran (work in progress) 3.0.0.0 (not yet released) + [export] properly handle line breaks for YAML, thanks to Dan Barry - diff --git a/Documentation.html b/Documentation.html index 5aa3af185..4c520d387 100644 --- a/Documentation.html +++ b/Documentation.html @@ -4207,6 +4207,9 @@ CREDITS, in chronological order - Ivan A Kirillov * new relations Designer +- Raj Kissu Rajandran (Google Summer of Code 2008) + * BLOBstreaming support + And also to the following people who have contributed minor changes, enhancements, bugfixes or support for a new language since version 2.1.0: diff --git a/bs_change_mime_type.php b/bs_change_mime_type.php new file mode 100644 index 000000000..c59fa181a --- /dev/null +++ b/bs_change_mime_type.php @@ -0,0 +1,94 @@ +get('BLOBSTREAMING_PLUGINS_EXIST')) + { + $mybs_ref_tbl = $PMA_Config->get('PBMS_NAME') . '_reference'; + $mybs_cust_content_type_tbl = $PMA_Config->get('PBMS_NAME') . '_custom_content_type'; + + // if specified DB is selected + if (PMA_DBI_select_db($bsDB)) + { + $query = "SELECT * FROM " . PMA_backquote($mybs_ref_tbl); + $query .= " WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'"; + + $result = PMA_DBI_query($query); + + // if record exists + if ($data = PMA_DBI_fetch_assoc($result)) + { + $query = "SELECT count(*) FROM " . PMA_backquote($mybs_cust_content_type_tbl); + $result = PMA_DBI_query($query); + + // if record exists + if ($data = PMA_DBI_fetch_assoc($result)) + { + if (1 == $data['count(*)']) + { + $query = "UPDATE " . PMA_backquote($mybs_cust_content_type_tbl) . " SET Content_type='"; + $query .= PMA_sqlAddslashes($bsNewMIMEType) . "' WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'"; + } + else + { + $query = "INSERT INTO " . PMA_backquote($mybs_cust_content_type_tbl) . " (Blob_url, Content_type)"; + $query .= " VALUES('" . PMA_sqlAddslashes($bsReference) . "', '" . PMA_sqlAddslashes($bsNewMIMEType) . "')"; + } + + $result = PMA_DBI_query($query); + + // if query execution succeeded + if ($result) + { + // 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 + ?> + + get('BLOBSTREAMING_PLUGINS_EXIST')) + } // end if (!empty($PMA_Config)) + } // end if ($bsDB && $bsTable && $bsReference && $bsNewMIMEType) + +?> diff --git a/bs_play_media.php b/bs_play_media.php new file mode 100644 index 000000000..9dadf50e6 --- /dev/null +++ b/bs_play_media.php @@ -0,0 +1,60 @@ +get('BLOBSTREAMING_SERVER'); + $bs_file_path = "http://" . $bs_server . '/' . $bsReference; + ?> + + + + + + + + diff --git a/config.sample.inc.php b/config.sample.inc.php index 32b84aa9d..5e3728f58 100644 --- a/config.sample.inc.php +++ b/config.sample.inc.php @@ -33,6 +33,13 @@ $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; /* Select mysqli if your server has it */ $cfg['Servers'][$i]['extension'] = 'mysql'; + +/* rajk - for blobstreaming */ +$cfg['Servers'][$i]['bs_garbage_threshold'] = ''; +$cfg['Servers'][$i]['bs_repository_threshold'] = ''; +$cfg['Servers'][$i]['bs_temp_blob_timeout'] = ''; +$cfg['Servers'][$i]['bs_temp_log_threshold'] = ''; + /* User for advanced features */ // $cfg['Servers'][$i]['controluser'] = 'pma'; // $cfg['Servers'][$i]['controlpass'] = 'pmapass'; diff --git a/db_operations.php b/db_operations.php index 517db1098..eee599081 100644 --- a/db_operations.php +++ b/db_operations.php @@ -19,6 +19,9 @@ require_once './libraries/common.inc.php'; require_once './libraries/Table.class.php'; require_once './libraries/mysql_charsets.lib.php'; +// add blobstreaming library functions +require_once "./libraries/blobstreaming.lib.php"; + /** * Rename/move or copy database */ @@ -217,6 +220,67 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) { } } } + +/* + * Enable/Disable/Repair BLOB Repository Monitoring for current database +*/ +if (strlen($db) > 0 && !empty($db_blob_streaming_op)) +{ + // load PMA_Config + $PMA_Config = $_SESSION['PMA_Config']; + + if (!empty($PMA_Config)) + { + if ($PMA_Config->get('PBXT_NAME') !== strtolower($db)) + { + // if Blobstreaming plugins exist, begin checking for Blobstreaming tables + if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST')) + { + $bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + $bs_tables = $bs_tables[$db]; + + $oneBSTableExists = FALSE; + + // check if at least one blobstreaming table exists + foreach ($bs_tables as $table_key=>$tbl) + if ($bs_tables[$table_key]['Exists']) + { + $oneBSTableExists = TRUE; + break; + } + + switch ($db_blob_streaming_op) + { + // enable BLOB repository monitoring + case "enable": + // if blobstreaming tables do not exist, create them + if (!$oneBSTableExists) + PMA_BS_CreateTables($db); + break; + // disable BLOB repository monitoring + case "disable": + // if at least one blobstreaming table exists, execute drop + if ($oneBSTableExists) + PMA_BS_DropTables($db); + break; + // repair BLOB repository + case "repair": + // check if a blobstreaming table is missing + foreach ($bs_tables as $table_key=>$tbl) + if (!$bs_tables[$table_key]['Exists']) + { + PMA_DBI_select_db($db); + PMA_DBI_query(PMA_BS_GetTableStruct($table_key)); + } + } + + // refresh side menu + PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . 'db_operations.php?' . PMA_generate_common_url ('','', '&') . (isset($db) ? '&db=' . urlencode($db) : '') . (isset($token) ? '&token=' . urlencode($token) : '') . (isset($goto) ? '&goto=' . urlencode($goto) : '') . 'reload=1&purge=1'); + } // end if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST')) + } // end if ($PMA_Config->get('PBXT_NAME') !== strtolower($db)) + } +} + /** * Settings for relations stuff */ @@ -275,7 +339,7 @@ if (!$is_information_schema) { + echo htmlspecialchars(PMA_getDBComment($db)); ?>" /> @@ -393,6 +457,93 @@ if (!$is_information_schema) { get('PBXT_NAME') !== strtolower($db)) + { + if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST')) + { + $bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + $bs_tables = $bs_tables[$db]; + + $oneBSTableExists = FALSE; + $allBSTablesExist = TRUE; + + // first check that all blobstreaming tables do not exist + foreach ($bs_tables as $table_key=>$tbl) + if ($bs_tables[$table_key]['Exists']) + $oneBSTableExists = TRUE; + else + $allBSTablesExist = FALSE; + + ?> + +
+ +
+ + + + + : + + + +
+
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ +
+ get('BLOBSTREAMING_PLUGINS_EXIST')) + } // end if ($PMA_Config->get('PBXT_NAME') !== strtolower($db)) + } + /** * Change database charset */ diff --git a/db_structure.php b/db_structure.php index 1a8a65a94..7174930ac 100644 --- a/db_structure.php +++ b/db_structure.php @@ -186,7 +186,27 @@ $hidden_fields = array(); $odd_row = true; $sum_row_count_pre = ''; +// added by rajk - for blobstreaming +$PMA_Config = $_SESSION['PMA_Config']; + +if (!empty ($PMA_Config)) + $session_bs_tables = $PMA_Config->get('BLOBSTREAMING_TABLES'); // list of blobstreaming tables + +$tableReductionCount = 0; // the amount to reduce the table count by + foreach ($tables as $keyname => $each_table) { + if (isset($session_bs_tables)) + { + // compare table name against blobstreaming tables + foreach ($session_bs_tables as $table_key=>$table_val) + // if the table is a blobstreaming table, reduce table count and skip outer foreach loop + if ($table_key == $keyname) + { + $tableReductionCount++; + continue 2; + } + } + // loic1: Patch from Joshua Nye to get valid // statistics whatever is the table type @@ -422,7 +442,14 @@ if ($is_show_stats) { - + diff --git a/js/functions.js b/js/functions.js index 4926b8713..1ab4daeaf 100644 --- a/js/functions.js +++ b/js/functions.js @@ -190,6 +190,28 @@ function confirmQuery(theForm1, sqlQuery1) } // end of the 'confirmQuery()' function +/** + * Displays a confirmation box before disabling the BLOB repository for a given database. + * This function is called while clicking links + * + * @param object the database + * + * @return boolean whether to disable the repository or not + */ +function confirmDisableRepository(theDB) +{ + // Confirmation is not required in the configuration file + // or browser is Opera (crappy js implementation) + if (PMA_messages['strDoYouReally'] == '' || typeof(window.opera) != 'undefined') { + return true; + } + + var is_confirmed = confirm(PMA_messages['strBLOBRepositoryDisableStrongWarning'] + '\n' + PMA_messages['strBLOBRepositoryDisableAreYouSure']); + + return is_confirmed; +} // end of the 'confirmDisableBLOBRepository()' function + + /** * Displays an error message if the user submitted the sql query form with no * sql query, else checks for "DROP/DELETE/ALTER" statements @@ -1217,3 +1239,67 @@ function pdfPaperSize(format, axis) { return 0; } + +/** + * rajk - for playing media from the BLOB repository + * + * @param var + * @param var bs_ref BLOB repository reference + * @param var m_type type of BLOB repository media + * @param var w_width width of popup window + * @param var w_height height of popup window + */ +function popupBSMedia(bs_ref, m_type, w_width, w_height) +{ + // if width not specified, use default + if (w_width == undefined) + w_width = 640; + + // if height not specified, use default + if (w_height == undefined) + w_height = 480; + + // open popup window (for displaying video/playing audio) + var mediaWin = window.open('bs_play_media.php?bs_reference=' + bs_ref + '&media_type=' + m_type, 'viewBSMedia', 'width=' + w_width + ', height=' + w_height + ', resizable=1, scrollbars=1, status=0'); +} + +/** + * rajk - 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); +} + +/** + * rajk - 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 mootools AJAx request + var url = 'bs_change_mime_type.php'; + var params = { bs_db: db, bs_table: table, bs_reference: reference, bs_new_mime_type: mime_type }; + + // create AJAX object with above options and execute request + var chgRequest = new Ajax('bs_change_mime_type.php', { method: 'post', data: params, evalScripts: true }); + chgRequest.request(); +} diff --git a/lang/afrikaans-utf-8.inc.php b/lang/afrikaans-utf-8.inc.php index ccdf3a9ed..93d5db3e2 100644 --- a/lang/afrikaans-utf-8.inc.php +++ b/lang/afrikaans-utf-8.inc.php @@ -1102,4 +1102,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/albanian-utf-8.inc.php b/lang/albanian-utf-8.inc.php index 84b3a8994..be62bb921 100644 --- a/lang/albanian-utf-8.inc.php +++ b/lang/albanian-utf-8.inc.php @@ -1101,4 +1101,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/arabic-utf-8.inc.php b/lang/arabic-utf-8.inc.php index 1869490e8..98fe245e8 100644 --- a/lang/arabic-utf-8.inc.php +++ b/lang/arabic-utf-8.inc.php @@ -1103,4 +1103,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/azerbaijani-utf-8.inc.php b/lang/azerbaijani-utf-8.inc.php index daecf6311..40c573d32 100644 --- a/lang/azerbaijani-utf-8.inc.php +++ b/lang/azerbaijani-utf-8.inc.php @@ -1098,4 +1098,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/bangla-utf-8.inc.php b/lang/bangla-utf-8.inc.php index a2db0bd35..9bea9b0d6 100644 --- a/lang/bangla-utf-8.inc.php +++ b/lang/bangla-utf-8.inc.php @@ -1077,4 +1077,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/basque-utf-8.inc.php b/lang/basque-utf-8.inc.php index b8d43a89b..02c3db27b 100644 --- a/lang/basque-utf-8.inc.php +++ b/lang/basque-utf-8.inc.php @@ -1095,4 +1095,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/belarusian_cyrillic-utf-8.inc.php b/lang/belarusian_cyrillic-utf-8.inc.php index 41273bdcd..84102423b 100644 --- a/lang/belarusian_cyrillic-utf-8.inc.php +++ b/lang/belarusian_cyrillic-utf-8.inc.php @@ -1078,4 +1078,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/belarusian_latin-utf-8.inc.php b/lang/belarusian_latin-utf-8.inc.php index 3796db6aa..6d7d89e76 100644 --- a/lang/belarusian_latin-utf-8.inc.php +++ b/lang/belarusian_latin-utf-8.inc.php @@ -1077,4 +1077,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/bosnian-utf-8.inc.php b/lang/bosnian-utf-8.inc.php index bcc6f26d3..3b9f5522e 100644 --- a/lang/bosnian-utf-8.inc.php +++ b/lang/bosnian-utf-8.inc.php @@ -1101,4 +1101,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/brazilian_portuguese-utf-8.inc.php b/lang/brazilian_portuguese-utf-8.inc.php index 88755006b..ea98d31dc 100644 --- a/lang/brazilian_portuguese-utf-8.inc.php +++ b/lang/brazilian_portuguese-utf-8.inc.php @@ -1075,4 +1075,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/bulgarian-utf-8.inc.php b/lang/bulgarian-utf-8.inc.php index 365472110..8ba860936 100644 --- a/lang/bulgarian-utf-8.inc.php +++ b/lang/bulgarian-utf-8.inc.php @@ -1098,4 +1098,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/catalan-utf-8.inc.php b/lang/catalan-utf-8.inc.php index e6bcb83a6..fc5a9e6e0 100644 --- a/lang/catalan-utf-8.inc.php +++ b/lang/catalan-utf-8.inc.php @@ -1073,4 +1073,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/chinese_simplified-utf-8.inc.php b/lang/chinese_simplified-utf-8.inc.php index a8229f830..54b30d985 100644 --- a/lang/chinese_simplified-utf-8.inc.php +++ b/lang/chinese_simplified-utf-8.inc.php @@ -1103,4 +1103,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/chinese_traditional-utf-8.inc.php b/lang/chinese_traditional-utf-8.inc.php index a86f38acb..b4be9e001 100644 --- a/lang/chinese_traditional-utf-8.inc.php +++ b/lang/chinese_traditional-utf-8.inc.php @@ -1082,4 +1082,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/croatian-utf-8.inc.php b/lang/croatian-utf-8.inc.php index a994ecb83..640bd194a 100644 --- a/lang/croatian-utf-8.inc.php +++ b/lang/croatian-utf-8.inc.php @@ -1076,4 +1076,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/czech-utf-8.inc.php b/lang/czech-utf-8.inc.php index 6c3d6ac9f..a301ea092 100644 --- a/lang/czech-utf-8.inc.php +++ b/lang/czech-utf-8.inc.php @@ -1077,4 +1077,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/danish-utf-8.inc.php b/lang/danish-utf-8.inc.php index 9f3010ed3..4c70e7b6a 100644 --- a/lang/danish-utf-8.inc.php +++ b/lang/danish-utf-8.inc.php @@ -1077,4 +1077,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/dutch-utf-8.inc.php b/lang/dutch-utf-8.inc.php index 0a0d3d68f..15be9779f 100644 --- a/lang/dutch-utf-8.inc.php +++ b/lang/dutch-utf-8.inc.php @@ -1099,4 +1099,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/english-utf-8.inc.php b/lang/english-utf-8.inc.php index 47f8724f0..427534e58 100644 --- a/lang/english-utf-8.inc.php +++ b/lang/english-utf-8.inc.php @@ -86,6 +86,18 @@ $strBinLogName = 'Log name'; $strBinLogOriginalPosition = 'Original position'; $strBinLogPosition = 'Position'; $strBinLogServerId = 'Server ID'; +$strBLOBRepository = 'BLOB Repository'; +$strBLOBRepositoryDamaged = 'Damaged'; +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; +$strBLOBRepositoryDisabled = 'Disabled'; +$strBLOBRepositoryDisable = 'Disable'; +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; +$strBLOBRepositoryEnabled = 'Enabled'; +$strBLOBRepositoryEnable = 'Enable'; +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; +$strBLOBRepositoryRepair = 'Repair'; +$strBLOBRepositoryStatus = 'Status'; +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; $strBookmarkAllUsers = 'Let every user access this bookmark'; $strBookmarkCreated = 'Bookmark %s created'; $strBookmarkDeleted = 'The bookmark has been deleted.'; diff --git a/lang/estonian-utf-8.inc.php b/lang/estonian-utf-8.inc.php index 59b2835b6..eef7867f3 100644 --- a/lang/estonian-utf-8.inc.php +++ b/lang/estonian-utf-8.inc.php @@ -1083,4 +1083,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/finnish-utf-8.inc.php b/lang/finnish-utf-8.inc.php index 642921da1..36cd28961 100644 --- a/lang/finnish-utf-8.inc.php +++ b/lang/finnish-utf-8.inc.php @@ -1077,4 +1077,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/french-utf-8.inc.php b/lang/french-utf-8.inc.php index 3eea5ad93..ac35c1127 100644 --- a/lang/french-utf-8.inc.php +++ b/lang/french-utf-8.inc.php @@ -1074,4 +1074,16 @@ $strYes = 'Oui'; $strZeroRemovesTheLimit = 'Note: Une valeur de 0 (zero) enlève la limite.'; $strZip = '"zippé"'; +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/galician-utf-8.inc.php b/lang/galician-utf-8.inc.php index 687446451..0718a4750 100644 --- a/lang/galician-utf-8.inc.php +++ b/lang/galician-utf-8.inc.php @@ -1076,4 +1076,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/georgian-utf-8.inc.php b/lang/georgian-utf-8.inc.php index af272c6f5..e7f7e2242 100644 --- a/lang/georgian-utf-8.inc.php +++ b/lang/georgian-utf-8.inc.php @@ -1103,4 +1103,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/german-utf-8.inc.php b/lang/german-utf-8.inc.php index cbf2d62ac..489a7af4c 100644 --- a/lang/german-utf-8.inc.php +++ b/lang/german-utf-8.inc.php @@ -1083,4 +1083,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/greek-utf-8.inc.php b/lang/greek-utf-8.inc.php index baca237f9..e76f5d378 100644 --- a/lang/greek-utf-8.inc.php +++ b/lang/greek-utf-8.inc.php @@ -1100,4 +1100,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/hebrew-utf-8.inc.php b/lang/hebrew-utf-8.inc.php index de9ec3af9..4e3a78514 100644 --- a/lang/hebrew-utf-8.inc.php +++ b/lang/hebrew-utf-8.inc.php @@ -1095,4 +1095,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/hindi-utf-8.inc.php b/lang/hindi-utf-8.inc.php index d88496767..85a6cacb3 100644 --- a/lang/hindi-utf-8.inc.php +++ b/lang/hindi-utf-8.inc.php @@ -1103,4 +1103,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/hungarian-utf-8.inc.php b/lang/hungarian-utf-8.inc.php index 702ce612e..c21b91011 100644 --- a/lang/hungarian-utf-8.inc.php +++ b/lang/hungarian-utf-8.inc.php @@ -1094,4 +1094,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/indonesian-utf-8.inc.php b/lang/indonesian-utf-8.inc.php index 108b370ab..e8f88a92c 100644 --- a/lang/indonesian-utf-8.inc.php +++ b/lang/indonesian-utf-8.inc.php @@ -1093,4 +1093,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/italian-utf-8.inc.php b/lang/italian-utf-8.inc.php index 50c8230f4..152c06b96 100644 --- a/lang/italian-utf-8.inc.php +++ b/lang/italian-utf-8.inc.php @@ -1078,4 +1078,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/japanese-utf-8.inc.php b/lang/japanese-utf-8.inc.php index 003511f7e..dfaeccaf2 100644 --- a/lang/japanese-utf-8.inc.php +++ b/lang/japanese-utf-8.inc.php @@ -1094,4 +1094,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/korean-utf-8.inc.php b/lang/korean-utf-8.inc.php index b67cb0e36..ef6969e6c 100644 --- a/lang/korean-utf-8.inc.php +++ b/lang/korean-utf-8.inc.php @@ -1098,4 +1098,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/latvian-utf-8.inc.php b/lang/latvian-utf-8.inc.php index a08f65620..989d0bfdf 100644 --- a/lang/latvian-utf-8.inc.php +++ b/lang/latvian-utf-8.inc.php @@ -1100,4 +1100,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/lithuanian-utf-8.inc.php b/lang/lithuanian-utf-8.inc.php index 5614b6556..efd63384a 100644 --- a/lang/lithuanian-utf-8.inc.php +++ b/lang/lithuanian-utf-8.inc.php @@ -1093,4 +1093,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/macedonian_cyrillic-utf-8.inc.php b/lang/macedonian_cyrillic-utf-8.inc.php index 8ec6742ad..434e5996a 100644 --- a/lang/macedonian_cyrillic-utf-8.inc.php +++ b/lang/macedonian_cyrillic-utf-8.inc.php @@ -1078,4 +1078,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/malay-utf-8.inc.php b/lang/malay-utf-8.inc.php index 07fff6e25..d0c7e6154 100644 --- a/lang/malay-utf-8.inc.php +++ b/lang/malay-utf-8.inc.php @@ -1115,4 +1115,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/mongolian-utf-8.inc.php b/lang/mongolian-utf-8.inc.php index c62a6bdae..b64c5dd71 100644 --- a/lang/mongolian-utf-8.inc.php +++ b/lang/mongolian-utf-8.inc.php @@ -1098,4 +1098,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/norwegian-utf-8.inc.php b/lang/norwegian-utf-8.inc.php index 9de9d16c4..50385c102 100644 --- a/lang/norwegian-utf-8.inc.php +++ b/lang/norwegian-utf-8.inc.php @@ -1075,4 +1075,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/persian-utf-8.inc.php b/lang/persian-utf-8.inc.php index b960da898..8689aeccf 100644 --- a/lang/persian-utf-8.inc.php +++ b/lang/persian-utf-8.inc.php @@ -1100,4 +1100,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/polish-utf-8.inc.php b/lang/polish-utf-8.inc.php index 9032a397f..ec5db6632 100644 --- a/lang/polish-utf-8.inc.php +++ b/lang/polish-utf-8.inc.php @@ -1071,4 +1071,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/portuguese-utf-8.inc.php b/lang/portuguese-utf-8.inc.php index 9d9c35485..00fa3916b 100644 --- a/lang/portuguese-utf-8.inc.php +++ b/lang/portuguese-utf-8.inc.php @@ -1104,4 +1104,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/romanian-utf-8.inc.php b/lang/romanian-utf-8.inc.php index e96834c04..9e45fe50f 100644 --- a/lang/romanian-utf-8.inc.php +++ b/lang/romanian-utf-8.inc.php @@ -1092,4 +1092,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/russian-utf-8.inc.php b/lang/russian-utf-8.inc.php index 012600c53..f85112473 100644 --- a/lang/russian-utf-8.inc.php +++ b/lang/russian-utf-8.inc.php @@ -1079,4 +1079,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/serbian_cyrillic-utf-8.inc.php b/lang/serbian_cyrillic-utf-8.inc.php index 81d1f6731..1365604c7 100644 --- a/lang/serbian_cyrillic-utf-8.inc.php +++ b/lang/serbian_cyrillic-utf-8.inc.php @@ -1077,4 +1077,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/serbian_latin-utf-8.inc.php b/lang/serbian_latin-utf-8.inc.php index 1ac558fd4..e48ae5c74 100644 --- a/lang/serbian_latin-utf-8.inc.php +++ b/lang/serbian_latin-utf-8.inc.php @@ -1077,4 +1077,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/sinhala-utf-8.inc.php b/lang/sinhala-utf-8.inc.php index 7e9fba0dd..296fb6ad1 100644 --- a/lang/sinhala-utf-8.inc.php +++ b/lang/sinhala-utf-8.inc.php @@ -1080,4 +1080,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/slovak-utf-8.inc.php b/lang/slovak-utf-8.inc.php index ef3923a51..a4f1b74bf 100644 --- a/lang/slovak-utf-8.inc.php +++ b/lang/slovak-utf-8.inc.php @@ -1078,4 +1078,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/slovenian-utf-8.inc.php b/lang/slovenian-utf-8.inc.php index 652dcc8d6..f541ba4c3 100644 --- a/lang/slovenian-utf-8.inc.php +++ b/lang/slovenian-utf-8.inc.php @@ -1097,4 +1097,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/spanish-utf-8.inc.php b/lang/spanish-utf-8.inc.php index 8699dd434..79ecde2ca 100644 --- a/lang/spanish-utf-8.inc.php +++ b/lang/spanish-utf-8.inc.php @@ -1073,4 +1073,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/swedish-utf-8.inc.php b/lang/swedish-utf-8.inc.php index dbc517572..81b852749 100644 --- a/lang/swedish-utf-8.inc.php +++ b/lang/swedish-utf-8.inc.php @@ -1075,4 +1075,16 @@ $strYes = 'Ja'; $strZeroRemovesTheLimit = 'Anm: Genom att sätta dessa alternativ till 0 (noll) tas begränsningarna bort.'; $strZip = '"zippad"'; +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/tatarish-utf-8.inc.php b/lang/tatarish-utf-8.inc.php index 9d225dc55..fc69f8d32 100644 --- a/lang/tatarish-utf-8.inc.php +++ b/lang/tatarish-utf-8.inc.php @@ -1089,4 +1089,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/thai-utf-8.inc.php b/lang/thai-utf-8.inc.php index 996a0c1ac..2537b1137 100644 --- a/lang/thai-utf-8.inc.php +++ b/lang/thai-utf-8.inc.php @@ -1099,4 +1099,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/turkish-utf-8.inc.php b/lang/turkish-utf-8.inc.php index 0121fa930..1c5ea2745 100644 --- a/lang/turkish-utf-8.inc.php +++ b/lang/turkish-utf-8.inc.php @@ -1083,4 +1083,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/lang/ukrainian-utf-8.inc.php b/lang/ukrainian-utf-8.inc.php index 4e76c559a..262412c5b 100644 --- a/lang/ukrainian-utf-8.inc.php +++ b/lang/ukrainian-utf-8.inc.php @@ -1097,4 +1097,16 @@ $strWiki = 'Wiki'; //to translate $strWebServer = 'Web server'; //to translate $strPHPExtension = 'PHP extension'; //to translate $strCustomColor = 'Custom color'; //to translate +$strBLOBRepository = 'BLOB Repository'; //to translate +$strBLOBRepositoryDamaged = 'Damaged'; //to translate +$strBLOBRepositoryDisableAreYouSure = 'Are you sure you want to disable all BLOB references fot database %s?'; //to translate +$strBLOBRepositoryDisabled = 'Disabled'; //to translate +$strBLOBRepositoryDisable = 'Disable'; //to translate +$strBLOBRepositoryDisableStrongWarning = 'You are about to DISABLE a BLOB Repository!'; //to translate +$strBLOBRepositoryEnabled = 'Enabled'; //to translate +$strBLOBRepositoryEnable = 'Enable'; //to translate +$strBLOBRepositoryRemove = 'Remove BLOB Repository Reference'; //to translate +$strBLOBRepositoryRepair = 'Repair'; //to translate +$strBLOBRepositoryStatus = 'Status'; //to translate +$strBLOBRepositoryUpload = 'Upload to BLOB repository'; //to translate ?> diff --git a/libraries/File.class.php b/libraries/File.class.php index 117429f1b..138b841c7 100644 --- a/libraries/File.class.php +++ b/libraries/File.class.php @@ -12,6 +12,7 @@ * @todo when uploading a file into a blob field, should we also consider using * chunks like in import? UPDATE `table` SET `field` = `field` + [chunk] */ + class PMA_File { /** @@ -69,6 +70,11 @@ class PMA_File */ var $_charset = null; + /** + * @staticvar string most recent BLOB repository reference + */ + static $_recent_bs_reference = NULL; + /** * constructor * @@ -250,6 +256,8 @@ class PMA_File * @access public * @uses PMA_File::fetchUploadedFromTblChangeRequestMultiple() * @uses PMA_File::setUploadedFile() + * @uses PMA_File::setRecentBLOBReference() + * @uses curl_setopt_array() * @uses PMA_File::$_error_message * @uses $GLOBALS['strUploadErrorIniSize'] * @uses $GLOBALS['strUploadErrorFormSize'] @@ -270,10 +278,128 @@ class PMA_File } $file = $_FILES['fields_upload_' . $key]; + if (null !== $primary) { $file = PMA_File::fetchUploadedFromTblChangeRequestMultiple($file, $primary); } + // rajk - for blobstreaming + $is_bs_upload = FALSE; + + // check if this field requires a repository upload + if (isset($_REQUEST['upload_blob_repo_' . $key])) + $is_bs_upload = ($_REQUEST['upload_blob_repo_' . $key]['multi_edit'][0] == "on") ? TRUE : FALSE; + + // if request is an upload to the BLOB repository + if ($is_bs_upload) + { + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // if PMA configuration is loaded + if (!empty($PMA_Config)) + { + // load BS variables from PMA configuration + $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'); + $curlExists = $PMA_Config->get('CURL_EXISTS'); + $bs_database = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + $bs_database = $bs_database[$_REQUEST['db']]; + + $allBSTablesExist = TRUE; + + // determine if plugins and curl exist + if ($pluginsExist && $curlExists) + { + foreach ($bs_database as $table_key=>$table) + { + if (!$bs_database[$table_key]['Exists']) + { + $allBSTablesExist = FALSE; + break; + } + } + } + else + $allBSTablesExist = FALSE; + + // if necessary BS tables exist + if ($allBSTablesExist) + { + // setup bs variables for uploading + $bs_server = $PMA_Config->get('BLOBSTREAMING_SERVER'); + $bs_db = $_REQUEST['db']; + $bs_table = $_REQUEST['table']; + + // setup file handle and related variables + $tmp_file = fopen($file['tmp_name'], 'r'); + $tmp_file_type = $file['type']; + $tmp_file_size = $file['size']; + + if (!$tmp_file_type) + $tmp_file_type = NULL; + + // if none of the required variables contain data, return with an unknown error message + if (!$bs_server || !$bs_db || !$bs_table || !$tmp_file || !$tmp_file_size) + { + $this->_error_message = $GLOBALS['strUploadErrorUnknown']; + return FALSE; + } + else + $bs_server_path = 'http://' . $bs_server . '/' . $bs_db . '/' . $bs_table; + + // init curl handle + $curlHnd = curl_init ($bs_server_path); + + // if curl handle init successful + if ($curlHnd) + { + // specify custom header + $customHeader = array( + "Accept-Language: en-us;en;q=0;5", + "Accept-Charset: ISO-8859-1;utf-8;q=0.7,*;q=0.7", + "Content-type: $tmp_file_type" + ); + + // specify CURL options in array + $curlOptArr = array( + CURLOPT_PUT => TRUE, + CURLOPT_HEADER => TRUE, + CURLOPT_HTTPHEADER => $customHeader, + CURLOPT_INFILESIZE => $tmp_file_size, + CURLOPT_INFILE => $tmp_file, + CURLOPT_RETURNTRANSFER => TRUE + ); + + // pass array of options to curl handle setup function + curl_setopt_array($curlHnd, $curlOptArr); + + // execute curl request and retrieve error message(s) (if any) + $ret = curl_exec($curlHnd); + $errRet = curl_error($curlHnd); + + // close curl handle + curl_close($curlHnd); + + // split entire string into array of lines + $retArr = explode("\r\n", $ret); + + // check each line as a valid string of a BLOB reference + foreach ($retArr as $value) + if (strlen($value) > strlen("~*$bs_db/~") && "~*$bs_db/~" == substr($value, 0, strlen($bs_db) + 4)) + { + // is a valid reference, so set as current and break + PMA_File::setRecentBLOBReference($value); + break; + } + + // close file handle + if ($tmp_file) + fclose($tmp_file); + } // end if ($curlHnd) + } // end if ($allBSTablesExist) + } // end if ($PMA_Config) + } // end if ($is_bs_upload) + // check for file upload errors switch ($file['error']) { // cybot_tm: we do not use the PHP constants here cause not all constants @@ -365,12 +491,279 @@ class PMA_File if (! empty($_REQUEST['fields_uploadlocal_' . $key]['multi_edit'][$primary]) && is_string($_REQUEST['fields_uploadlocal_' . $key]['multi_edit'][$primary])) { // ... whether with multiple rows ... + // rajk - for blobstreaming + $is_bs_upload = FALSE; + + // check if this field requires a repository upload + if (isset($_REQUEST['upload_blob_repo_' . $key])) + $is_bs_upload = ($_REQUEST['upload_blob_repo_' . $key]['multi_edit'][0] == "on") ? TRUE : FALSE; + + // is a request to upload file to BLOB repository using uploadDir mechanism + if ($is_bs_upload) + { + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // if the PMA configuration was loaded + if (!empty($PMA_Config)) + { + // load BS variables from PMA configuration + $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'); + $curlExists = $PMA_Config->get('CURL_EXISTS'); + $bs_database = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + $bs_database = $bs_database[$_REQUEST['db']]; + + $allBSTablesExist = TRUE; + + // if plugins and curl exist + if ($pluginsExist && $curlExists) + { + foreach ($bs_database as $table_key=>$table) + { + if (!$bs_database[$table_key]['Exists']) + { + $allBSTablesExist = FALSE; + break; + } + } + } + else + $allBSTablesExist = FALSE; + + // if necessary BS tables exist + if ($allBSTablesExist) + { + // load BS variables + $bs_server = $PMA_Config->get('BLOBSTREAMING_SERVER'); + $bs_db = $_REQUEST['db']; + $bs_table = $_REQUEST['table']; + + // setup uploadDir mechanism and file variables + $tmp_filename = $GLOBALS['cfg']['UploadDir'] . '/' . $_REQUEST['fields_uploadlocal_' . $key]['multi_edit'][$primary]; + $tmp_file = fopen($tmp_filename, 'r'); + $tmp_file_size = filesize($tmp_filename); + + // check if fileinfo library exists + if ($PMA_Config->get('FILEINFO_EXISTS')) + { + // attempt to init fileinfo + $finfo = finfo_open(FILEINFO_MIME); + + // fileinfo exists + if ($finfo) + { + // pass in filename to fileinfo and close fileinfo handle after + $tmp_file_type = finfo_file($finfo, $tmp_filename); + finfo_close($finfo); + } + } + else // no fileinfo library exists, use file command + $tmp_file_type = exec("file -bi " . escapeshellarg($tmp_filename)); + + if (!$tmp_file_type) + $tmp_file_type = NULL; + + // necessary variables aren't loaded, return error message (unknown error) + if (!$bs_server || !$bs_db || !$bs_table || !$tmp_file || !$tmp_file_size) + { + $this->_error_message = $GLOBALS['strUploadErrorUnknown']; + return FALSE; + } + else + $bs_server_path = 'http://' . $bs_server . '/' . $bs_db . '/' . $bs_table; + + // init curl handle + $curlHnd = curl_init ($bs_server_path); + + // curl handle exists + if ($curlHnd) + { + // specify custom header + $customHeader = array( + "Accept-Language: en-us;en;q=0;5", + "Accept-Charset: ISO-8859-1;utf-8;q=0.7,*;q=0.7", + "Content-type: $tmp_file_type" + ); + + // specify custom curl options + $curlOptArr = array( + CURLOPT_PUT => TRUE, + CURLOPT_HEADER => TRUE, + CURLOPT_HTTPHEADER => $customHeader, + CURLOPT_INFILESIZE => $tmp_file_size, + CURLOPT_INFILE => $tmp_file, + CURLOPT_RETURNTRANSFER => TRUE + ); + + // setup custom curl options (as specified in above array) + curl_setopt_array($curlHnd, $curlOptArr); + + // execute curl request and retrieve error message(s) (if any) + $ret = curl_exec($curlHnd); + $errRet = curl_error($curlHnd); + + // close curl handle + curl_close($curlHnd); + + // split return string into lines + $retArr = explode("\r\n", $ret); + + // check subsequent lines for valid BLOB reference string + foreach ($retArr as $value) + if (strlen($value) > strlen("~*$bs_db/~") && "~*$bs_db/~" == substr($value, 0, strlen($bs_db) + 4)) + { + // is a valid reference, so set as current and break + PMA_File::setRecentBLOBReference($value); + break; + } + + // close file handle + if ($tmp_file) + fclose($tmp_file); + } // end if ($curlHnd) + } // end if ($allBSTablesExist) + } // end if ($PMA_Config) + } // end if ($is_bs_upload) + return $this->setLocalSelectedFile($_REQUEST['fields_uploadlocal_' . $key]['multi_edit'][$primary]); } else { return false; } } elseif (! empty($_REQUEST['fields_uploadlocal_' . $key]) && is_string($_REQUEST['fields_uploadlocal_' . $key])) { + // rajk - for blobstreaming + $is_bs_upload = FALSE; + + // check if this field requires a repository upload + if (isset($_REQUEST['upload_blob_repo_' . $key])) + $is_bs_upload = ($_REQUEST['upload_blob_repo_' . $key]['multi_edit'][0] == "on") ? TRUE : FALSE; + + // is a request to upload file to BLOB repository using uploadDir mechanism + if ($is_bs_upload) + { + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // if the PMA configuration was loaded + if (!empty($PMA_Config)) + { + // load BS variables from PMA configuration + $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'); + $curlExists = $PMA_Config->get('CURL_EXISTS'); + $bs_database = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + $bs_database = $bs_database[$_REQUEST['db']]; + + $allBSTablesExist = TRUE; + + // if plugins and curl exist + if ($pluginsExist && $curlExists) + { + foreach ($bs_database as $table_key=>$table) + { + if (!$bs_database[$table_key]['Exists']) + { + $allBSTablesExist = FALSE; + break; + } + } + } + else + $allBSTablesExist = FALSE; + + if ($allBSTablesExist) + { + // load BS variables + $bs_server = $PMA_Config->get('BLOBSTREAMING_SERVER'); + $bs_db = $_REQUEST['db']; + $bs_table = $_REQUEST['table']; + + // setup uploadDir mechanism and file variables + $tmp_filename = $GLOBALS['cfg']['UploadDir'] . '/' . $_REQUEST['fields_uploadlocal_' . $key]['multi_edit'][$primary]; + $tmp_file = fopen($tmp_filename, 'r'); + $tmp_file_size = filesize($tmp_filename); + + // check if fileinfo library exists + if ($PMA_Config->get('FILEINFO_EXISTS')) + { + // attempt to init fileinfo + $finfo = finfo_open(FILEINFO_MIME); + + // if fileinfo exists + if ($finfo) + { + // pass in filename to fileinfo and close fileinfo handle after + $tmp_file_type = finfo_file($finfo, $tmp_filename); + finfo_close($finfo); + } + } + else // no fileinfo library exists, use file command + $tmp_file_type = exec("file -bi " . escapeshellarg($tmp_filename)); + + if (!$tmp_file_type) + $tmp_file_type = NULL; + + // necessary variables aren't loaded, return error message (unknown error) + if (!$bs_server || !$bs_db || !$bs_table || !$tmp_file || !$tmp_file_size) + { + $this->_error_message = $GLOBALS['strUploadErrorUnknown']; + return FALSE; + } + else + $bs_server_path = 'http://' . $bs_server . '/' . $bs_db . '/' . $bs_table; + + // init curl handle + $curlHnd = curl_init ($bs_server_path); + + // if curl handle exists + if ($curlHnd) + { + // specify custom header + $customHeader = array( + "Accept-Language: en-us;en;q=0;5", + "Accept-Charset: ISO-8859-1;utf-8;q=0.7,*;q=0.7", + "Content-type: $tmp_file_type" + ); + + // specify custom curl options + $curlOptArr = array( + CURLOPT_PUT => TRUE, + CURLOPT_HEADER => TRUE, + CURLOPT_HTTPHEADER => $customHeader, + CURLOPT_INFILESIZE => $tmp_file_size, + CURLOPT_INFILE => $tmp_file, + CURLOPT_RETURNTRANSFER => TRUE + ); + + // setup custom curl options (as specified in above array) + curl_setopt_array($curlHnd, $curlOptArr); + + // execute curl request and retrieve error message(s) (if any) + $ret = curl_exec($curlHnd); + $errRet = curl_error($curlHnd); + + // close curl handle + curl_close($curlHnd); + + // split return string into lines + $retArr = explode("\r\n", $ret); + + // check subsequent lines for valid BLOB reference string + foreach ($retArr as $value) + if (strlen($value) > strlen("~*$bs_db/~") && "~*$bs_db/~" == substr($value, 0, strlen($bs_db) + 4)) + { + // is a valid reference, so set as current and break + PMA_File::setRecentBLOBReference($value); + break; + } + + // close file handle + if ($tmp_file) + fclose($tmp_file); + } // end if ($curlHnd) + } // end if ($allBSTablesExist) + } // end if ($PMA_Config) + } // end if ($is_bs_upload) + return $this->setLocalSelectedFile($_REQUEST['fields_uploadlocal_' . $key]); } @@ -861,5 +1254,30 @@ class PMA_File } } + + /** + * sets reference to most recent BLOB repository reference + * + * @access static public + * @param string - BLOB repository reference + */ + static function setRecentBLOBReference($ref) + { + PMA_File::$_recent_bs_reference = $ref; + } + + /** + * retrieves reference to most recent BLOB repository reference + * + * @access static public + * @return string - most recent BLOB repository reference + */ + static function getRecentBLOBReference() + { + $ref = PMA_File::$_recent_bs_reference; + PMA_File::$_recent_bs_reference = NULL; + + return $ref; + } } ?> diff --git a/libraries/blobstreaming.lib.php b/libraries/blobstreaming.lib.php new file mode 100644 index 000000000..bc4c20c88 --- /dev/null +++ b/libraries/blobstreaming.lib.php @@ -0,0 +1,717 @@ +get('Servers'); + $serverCfg = $serverCfg[$PMA_Config->settings['ServerDefault']]; + + // return if unable to retrieve default server configuration + if (!$serverCfg) + return FALSE; + + // if PHP extension in use is 'mysql', specify element 'PersistentConnections' + if ($serverCfg['extension'] == "mysql") + $serverCfg['PersistentConnections'] = $PMA_Config->settings['PersistentConnections']; + + // if connection type is TCP, unload socket variable + if (strtolower($serverCfg['connect_type']) == "tcp") + $serverCfg['socket'] = ""; + + // define BS Plugin variables + $allPluginsExist = TRUE; + + $PMA_Config->set('PBXT_NAME', 'pbxt'); + $PMA_Config->set('PBMS_NAME', 'mybs'); + + $plugins[$PMA_Config->get('PBXT_NAME')]['Library'] = 'libpbxt.so'; + $plugins[$PMA_Config->get('PBXT_NAME')]['Exists'] = FALSE; + + $plugins[$PMA_Config->get('PBMS_NAME')]['Library'] = 'libmybs.so'; + $plugins[$PMA_Config->get('PBMS_NAME')]['Exists'] = FALSE; + + // retrieve state of BS plugins + PMA_PluginsExist($plugins); + + foreach ($plugins as $plugin_key=>$plugin) + if (!$plugin['Exists']) + { + $allPluginsExist = FALSE; + break; + } // end if (!$plugin['Exists']) + + // set variable indicating BS plugin existance + $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', $allPluginsExist); + + // do the plugins exist? + if ($allPluginsExist) + { + // retrieve BS variables from PMA configuration + $bs_set_variables = array(); + + $bs_set_variables[$PMA_Config->get('PBMS_NAME') . '_garbage_threshold'] = (isset($serverCfg['bs_garbage_threshold'])) ? $server['bs_garbage_threshold'] : NULL; + $bs_set_variables[$PMA_Config->get('PBMS_NAME') . '_repository_threshold'] = (isset($serverCfg['bs_repository_threshold'])) ? $server['bs_repository_threshold'] : NULL; + $bs_set_variables[$PMA_Config->get('PBMS_NAME') . '_temp_blob_timeout'] = (isset($serverCfg['bs_temp_blob_timeout'])) ? $server['bs_temp_blob_timeout'] : NULL; + $bs_set_variables[$PMA_Config->get('PBMS_NAME') . '_temp_log_threshold'] = (isset($serverCfg['bs_temp_log_threshold'])) ? $server['bs_temp_log_threshold'] : NULL; + + // set BS variables to PMA configuration defaults + PMA_BS_SetVariables($bs_set_variables); + + // retrieve updated BS variables (configurable and unconfigurable) + $bs_variables = PMA_BS_GetVariables(); + + // if no BS variables exist, set plugin existance to false and return + if (count($bs_variables) <= 0) + { + $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', FALSE); + return FALSE; + } // end if (count($bs_variables) <= 0) + + // switch on BS field references + if (strtolower($bs_variables[$PMA_Config->get('PBMS_NAME') . '_field_references']) == "off") + PMA_BS_SetFieldReferences('ON'); + + // get BS server port + $BS_PORT = $bs_variables[$PMA_Config->get('PBMS_NAME') . '_port']; + + // if no BS server port exists, set plugin existance to false and return + if (!$BS_PORT) + { + $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', FALSE); + return FALSE; + } // end if (!$BS_PORT) + + // add selected BS, CURL and fileinfo library variables to PMA configuration + $PMA_Config->set('BLOBSTREAMING_PORT', $BS_PORT); + $PMA_Config->set('BLOBSTREAMING_HOST', $serverCfg['host']); + $PMA_Config->set('BLOBSTREAMING_SERVER', $serverCfg['host'] . ':' . $BS_PORT); + $PMA_Config->set('CURL_EXISTS', FALSE); + $PMA_Config->set('FILEINFO_EXISTS', FALSE); + + // check if CURL exists + if (function_exists("curl_init")) + { + // initialize curl handler + $curlHnd = curl_init(); + + // CURL exists, set necessary variable and close resource + if (!empty($curlHnd)) + { + $PMA_Config->set('CURL_EXISTS', TRUE); + curl_close($curlHnd); + } // end if (!empty($curlHnd)) + } // end if (function_exists("curl_init")) + + // check if PECL's fileinfo library exist + $finfo = NULL; + + if (function_exists("finfo_open")) + $finfo = finfo_open(FILEINFO_MIME); + + // fileinfo library exists, set necessary variable and close resource + if (!empty($finfo)) + { + $PMA_Config->set('FILEINFO_EXISTS', TRUE); + finfo_close($finfo); + } // end if (!empty($finfo)) + } // end if ($allPluginsExist) + else + return FALSE; + + $bs_tables = array(); + + // specify table structure for BS reference table + $bs_tables[$PMA_Config->get('PBMS_NAME') . '_reference'] = array(); + $bs_tables[$PMA_Config->get('PBMS_NAME') . '_reference']['struct'] = <<get('PBMS_NAME')}_reference + ( + Table_name CHAR(64) COMMENT 'The name of the referencing table', + Blob_id BIGINT COMMENT 'The BLOB reference number - part of the BLOB URL', + Column_name CHAR(64) COMMENT 'The column name of the referencing field', + Row_condition VARCHAR(255) COMMENT 'This condition identifies the row in the table', + Blob_url VARCHAR(200) COMMENT 'The BLOB URL for HTTP GET access', + Repository_id INT COMMENT 'The repository file number of the BLOB', + Repo_blob_offset BIGINT COMMENT 'The offset in the repository file', + Blob_size BIGINT COMMENT 'The size of the BLOB in bytes', + Deletion_time TIMESTAMP COMMENT 'The time the BLOB was deleted', + Remove_in INT COMMENT 'The number of seconds before the reference/BLOB is removed perminently', + Temp_log_id INT COMMENT 'Temporary log number of the referencing deletion entry', + Temp_log_offset BIGINT COMMENT 'Temporary log offset of the referencing deletion entry' + ) ENGINE=MyBS; +EOD; + + // specify table structure for BS repository table + $bs_tables[$PMA_Config->get('PBMS_NAME') . '_repository'] = array(); + $bs_tables[$PMA_Config->get('PBMS_NAME') . '_repository']['struct'] = <<get('PBMS_NAME')}_repository + ( + Repository_id INT COMMENT 'The repository file number', + Repo_blob_offset BIGINT COMMENT 'The offset of the BLOB in the repository file', + Blob_size BIGINT COMMENT 'The size of the BLOB in bytes', + Head_size SMALLINT UNSIGNED COMMENT 'The size of the BLOB header - proceeds the BLOB data', + Access_code INT COMMENT 'The 4-byte authorisation code required to access the BLOB - part of the BLOB URL', + Creation_time TIMESTAMP COMMENT 'The time the BLOB was created', + Last_ref_time TIMESTAMP COMMENT 'The last time the BLOB was referenced', + Last_access_time TIMESTAMP COMMENT 'The last time the BLOB was accessed (read)', + Content_type CHAR(128) COMMENT 'The content type of the BLOB - returned by HTTP GET calls', + Blob_data LONGBLOB COMMENT 'The data of this BLOB' + // load PMA configuration + ) ENGINE=MyBS; +EOD; + + // specify table structure for BS custom content type table + $bs_tables[$PMA_Config->get('PBMS_NAME') . '_custom_content_type'] = array(); + $bs_tables[$PMA_Config->get('PBMS_NAME') . '_custom_content_type']['struct'] = <<get('PBMS_NAME')}_custom_content_type + ( + Blob_url VARCHAR(200) COMMENT 'The BLOB URL for HTTP GET access', + Content_type VARCHAR(255) COMMENT 'The custom MIME type for a given BLOB reference as specified by the user', + + PRIMARY KEY(Blob_url) + ); +EOD; + + // add BS tables to PMA configuration + $PMA_Config->set('BLOBSTREAMING_TABLES', $bs_tables); + + return TRUE; +} + +/** + * checks for databases that support BLOBStreaming + * + * @access public + * @uses PMA_GetDatabases() + * @uses PMA_TablesExist() + * @uses PMA_Config::set() +*/ +function checkBLOBStreamableDatabases() +{ + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // return if unable to load PMA configuration + if (empty($PMA_Config)) + return; + + // retrieve BS tables from PMA configuration + $session_bs_tables = $PMA_Config->get('BLOBSTREAMING_TABLES'); + + $bs_databases = array(); + $bs_tables = array(); + + // return if BS tables do not exist + if (!$session_bs_tables) + return; + + foreach ($session_bs_tables as $table_key=>$table) + { + $bs_tables[$table_key] = array(); + $bs_tables[$table_key]['Exists'] = FALSE; + } + + // retrieve MySQL databases + $databases = PMA_GetDatabases(); + + // check if BS tables exist for each database + foreach ($databases as $db_key=>$db_name) + { + $bs_databases[$db_name] = $bs_tables; + + PMA_TablesExist($bs_databases[$db_name], $db_name); + } + + // set BS databases in PMA configuration + $PMA_Config->set('BLOBSTREAMABLE_DATABASES', $bs_databases); +} + +/** + * checks whether a set of plugins exist + * + * @access public + * @param array - a list of plugin names and accompanying library filenames to check for + * @uses PMA_DBI_query() + * @uses PMA_DBI_fetch_assoc() +*/ +function PMA_PluginsExist(&$plugins) +{ + if (PMA_MYSQL_INT_VERSION < 50109) { + return; + } + // run query to retrieve MySQL plugins + $query = "SHOW PLUGINS"; + $result = PMA_DBI_query($query); + + // while there are records to parse + while ($data = @PMA_DBI_fetch_assoc($result)) + { + // reset plugin state + $state = TRUE; + + // check if required plugins exist + foreach ($plugins as $plugin_key=>$plugin) + if (!$plugin['Exists']) + if ( + strtolower($data['Library']) == strtolower($plugin['Library']) && + $data['Status'] == "ACTIVE" + ) + $plugins[$plugin_key]['Exists'] = TRUE; + else + if ($state) + $state = FALSE; + + // break if all necessary plugins are found before all records are parsed + if ($state) + break; + } // end while ($data = @PMA_DBI_fetch_assoc($result)) +} + +/** + * checks whether a given set of tables exist in a given database + * + * @access public + * @param array - list of tables to look for + * @param string - name of database + * @uses PMA_DBI_select_db() + * @uses PMA_DBI_query() + * @uses PMA_DBI_fetch_assoc() + */ +function PMA_TablesExist(&$tables, $db_name) +{ + // select specified database + PMA_DBI_select_db($db_name); + + // run query to retrieve tables in specified database + $query = "SHOW TABLES"; + $result = PMA_DBI_query($query); + + // while there are records to parse + while ($data = @PMA_DBI_fetch_assoc($result)) + { + $state = TRUE; + + // check if necessary tables exist + foreach ($tables as $table_key=>$table) + if (!$table['Exists']) + if ($data['Tables_in_' . $db_name] == $table_key) + $tables[$table_key]['Exists'] = TRUE; + else + if ($state) + $state = FALSE; + + // break if necessary tables are found before all records are parsed + if ($state) + break; + } // end while ($data = @PMA_DBI_fetch_assoc($result)) +} + +/** + * returns a list of databases + * + * @access public + * @uses PMA_DBI_query() + * @uses PMA_DBI_fetch_assoc() + * @return array - list of databases acquired via MySQL +*/ +function PMA_GetDatabases() +{ + // run query to retrieve databases + $query = "SHOW DATABASES"; + $result = PMA_DBI_query($query); + + $databases = array(); + + // while there are records to parse + while ($data = @PMA_DBI_fetch_assoc($result)) + $databases[] = $data['Database']; + + // return list of databases + return $databases; +} + +/** + * sets BLOBStreaming variables to a list of specified arguments + * @access public + * @uses PMA_DBI_query() + * @returns boolean - success of variables setup +*/ + +function PMA_BS_SetVariables($bs_variables) +{ + // if no variables exist in array, return false + if (empty($bs_variables) || count($bs_variables) == 0) + return FALSE; + + // set BS variables to those specified in array + foreach ($bs_variables as $key=>$val) + if (!is_null($val) && strlen($val) > 0) + { + // set BS variable to specified value + $query = "SET GLOBAL $key=" . PMA_sqlAddSlashes($val); + $result = PMA_DBI_query($query); + + // if query fails execution, return false + if (!$result) + return FALSE; + } // end if (!is_null($val) && strlen($val) > 0) + + // return true on success + return TRUE; +} + +/** + * returns a list of BLOBStreaming variables used by MySQL + * + * @access public + * @uses PMA_Config::get() + * @uses PMA_DBI_query() + * @uses PMA_DBI_fetch_assoc() + * @return array - list of BLOBStreaming variables +*/ +function PMA_BS_GetVariables() +{ + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // return if unable to load PMA configuration + if (empty($PMA_Config)) + return NULL; + + // run query to retrieve BS variables + $query = "SHOW VARIABLES LIKE '%" . $PMA_Config->get('PBMS_NAME') . "%'"; + $result = PMA_DBI_query($query); + + $BS_Variables = array(); + + // while there are records to retrieve + while ($data = @PMA_DBI_fetch_assoc($result)) + $BS_Variables[$data['Variable_name']] = $data['Value']; + + // return BS variables + return $BS_Variables; +} + +/** + * sets the BLOBStreaming global field references to ON/OFF + * + * @access public + * @param string - ON or OFF + * @uses PMA_Config::get() + * @uses PMA_sqlAddslashes() + * @uses PMA_DBI_query() + * @return boolean - success/failure of query execution +*/ +function PMA_BS_SetFieldReferences($val) +{ + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // return if unable to load PMA configuration + if (empty($PMA_Config)) + return FALSE; + + // set field references to value specified + $query = "SET GLOBAL " . $PMA_Config->get('PBMS_NAME') . "_field_references=" . PMA_sqlAddslashes($val); + $result = PMA_DBI_query($query); + + // return success of query execution + if ($result) + return TRUE; + else + return FALSE; +} + +/** + * gets the SQL table definition for a given BLOBStreaming table + * + * @access public + * @param string - table name + * @uses PMA_Config::get() + * @return string - SQL table definition +*/ +function PMA_BS_GetTableStruct($tbl_name) +{ + // retrieve table structures for BS tables + $bs_tables = $_SESSION['PMA_Config']->get('BLOBSTREAMING_TABLES'); + + // return if tables don't exist + if (!$bs_tables) + return; + + // return if specified table doesn't exist in collection of BS tables + if (!isset($bs_tables[$tbl_name])) + return; + + // return specified table's structure + return $bs_tables[$tbl_name]['struct']; +} + +/** + * creates the BLOBStreaming tables for a given database + * + * @access public + * @param string - database name + * @uses PMA_Config::get() + * @uses PMA_DBI_select_db() + * @uses PMA_DBI_query() + * @uses PMA_BS_GetTableStruct() + * @return boolean - success/failure of transactional query execution +*/ +function PMA_BS_CreateTables($db_name) +{ + // retrieve BS tables + $bs_tables = $_SESSION['PMA_Config']->get('BLOBSTREAMING_TABLES'); + + // select specified database + PMA_DBI_select_db($db_name); + + // create necessary BS tables for specified database + foreach ($bs_tables as $table_key=>$table) + { + $result = PMA_DBI_query(PMA_BS_GetTableStruct($table_key)); + + // return false if query execution fails + if (!$result) + return FALSE; + } + + // return true on success + return TRUE; +} + +/** + * drops BLOBStreaming tables for a given database + * + * @access public + * @param string - database name + * @uses PMA_Config::get() + * @uses PMA_DBI_select_db() + * @uses PMA_backquote() + * @uses PMA_DBI_query() + * @return boolean - success/failure of transactional query execution +*/ +function PMA_BS_DropTables($db_name) +{ + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // return if unable to load PMA configuration + if (empty($PMA_Config)) + return FALSE; + + // retrieve BS tables + $bs_tables = $PMA_Config->get('BLOBSTREAMING_TABLES'); + + // select specified database + PMA_DBI_select_db($db_name); + + // drop BS tables + foreach ($bs_tables as $table_key=>$table) + { + $query = "DROP TABLE IF EXISTS " . PMA_backquote($table_key); + $result = PMA_DBI_query($query); + + // return false if query execution fails + if (!$result) + return FALSE; + } + + // return true on success + return TRUE; +} + +/** + * returns the field name for a primary key of a given table in a given database + * + * @access public + * @param string - database name + * @param string - table name + * @uses PMA_DBI_select_db() + * @uses PMA_backquote() + * @uses PMA_DBI_query() + * @uses PMA_DBI_fetch_assoc() + * @return string - field name for primary key +*/ +function PMA_BS_GetPrimaryField($db_name, $tbl_name) +{ + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // return if unable to load PMA configuration + if (empty($PMA_Config)) + return FALSE; + + // select specified database + PMA_DBI_select_db($db_name); + + // retrieve table fields + $query = "SHOW FULL FIELDS FROM " . PMA_backquote($tbl_name); + $result = PMA_DBI_query($query); + + // while there are records to parse + while ($data = PMA_DBI_fetch_assoc($result)) + if ("PRI" == $data['Key']) + return $data['Field']; + + // return NULL on no primary key + return NULL; +} + +/** + * checks whether a BLOB reference exists in the BLOB repository + * + * @access public + * @param string - BLOB reference + * @param string - database name + * @uses PMA_DBI_select_db() + * @uses PMA_backquote() + * @uses PMA_Config::get() + * @uses PMA_sqlAddslashes() + * @uses PMA_DBI_query() + * @return boolean - existence of BLOB reference +*/ +function PMA_BS_ReferenceExists($bs_reference, $db_name) +{ + $referenceExists = FALSE; + + // return false on invalid BS reference + if (strlen ($bs_reference) < strlen ("~*$db_name/~") || "~*$db_name/~" != substr ($bs_reference, 0, strlen ($db_name) + 4)) + return $referenceExists; + + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // return if unable to load PMA configuration + if (empty($PMA_Config)) + return $referenceExists; + + // select specified database + PMA_DBI_select_db($db_name); + + // run query on BS reference retrieval + $query = "SELECT * FROM " . PMA_backquote($PMA_Config->get('PBMS_NAME') . "_reference") . " WHERE Blob_url='" . PMA_sqlAddslashes($bs_reference) . "'"; + $result = PMA_DBI_query($query); + + // if record exists + if ($data = @PMA_DBI_fetch_assoc($result)) + $referenceExists = TRUE; + + // return reference existance + return $referenceExists; +} + +/** + * creates a HTTP link to a given blob reference for a given database + * + * @access public + * @param string - BLOB reference + * @param string - database name + * @uses PMA_Config::get() + * @uses PMA_DBI_select_db() + * @uses PMA_backquote() + * @uses PMA_sqlAddslashes() + * @uses PMA_DBI_query() + * @uses PMA_DBI_fetch_assoc() + * @return string - HTTP link or Error +*/ +function PMA_BS_CreateReferenceLink($bs_reference, $db_name) +{ + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // return if unable to load PMA configuration + if (empty($PMA_Config)) + return ''; + + // generate bs reference link + $bs_ref_link = 'http://' . $PMA_Config->get('BLOBSTREAMING_SERVER') . '/' . $bs_reference; + + // select specified database + PMA_DBI_select_db($db_name); + + $pbms_repo_bq = PMA_backquote($PMA_Config->get('PBMS_NAME') . "_repository"); + $pbms_ref_bq = PMA_backquote($PMA_Config->get('PBMS_NAME') . "_reference"); + $pbms_cust_content_bq = PMA_backquote($PMA_Config->get('PBMS_NAME') . "_custom_content_type"); + + // run query on determining specified BS reference + $query = "SELECT $pbms_repo_bq.Content_type, $pbms_cust_content_bq.Content_type AS Custom_type"; + $query .= " FROM $pbms_repo_bq LEFT JOIN $pbms_ref_bq ON"; + $query .= "$pbms_repo_bq.Repository_id=$pbms_ref_bq.Repository_id"; + $query .= " AND $pbms_repo_bq.Blob_size=$pbms_ref_bq.Blob_size"; + $query .= " AND $pbms_repo_bq.Repo_blob_offset=$pbms_ref_bq.Repo_blob_offset"; + $query .= " LEFT JOIN $pbms_cust_content_bq ON $pbms_cust_content_bq.Blob_url=$pbms_ref_bq.Blob_url"; + $query .= " WHERE $pbms_ref_bq.Blob_url='" . PMA_sqlAddslashes($bs_reference) . "'"; + + $result = PMA_DBI_query($query); + + // if record exists + if ($data = @PMA_DBI_fetch_assoc($result)) + { + // determine content-type for BS repository file (original or custom) + $content_type = isset($data['Custom_type']) ? $data['Custom_type'] : $data['Content_type']; + + if (!$content_type) + $content_type = NULL; + + $output = "$content_type"; + + // specify custom HTML for various content types + switch ($content_type) + { + // no content specified + case NULL: + $output = "NULL"; + break; + // image content + case 'image/jpeg': + case 'image/png': + $output .= ' (View Image)'; + break; + // audio content + case 'audio/mpeg': + $output .= ' (Play Audio)'; + break; + // video content + case 'application/x-flash-video': + case 'video/mpeg': + $output .= ' (View Video)'; + break; + // unsupported content. specify download + default: + $output .= ' (Download File)'; + } + + // return HTML + return $output; + } // end if ($data = @PMA_DBI_fetch_assoc($result)) + + // return on error + return 'Error'; +} + +?> diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 30ebbf3fc..227340e83 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -8,7 +8,7 @@ * * Order of sections for common.inc.php: * - * the authentication libraries must be loaded before db connections + * the authentication libraries must be before the connection to db * * ... so the required order is: * @@ -40,6 +40,7 @@ require_once './libraries/Error_Handler.class.php'; * initialize the error handler */ $GLOBALS['error_handler'] = new PMA_Error_Handler(); +$cfg['Error_Handler']['display'] = TRUE; // at this point PMA_PHP_INT_VERSION is not yet defined if (version_compare(phpversion(), '6', 'lt')) { @@ -409,6 +410,10 @@ if (! PMA_isValid($_REQUEST['token']) || $_SESSION[' PMA_token '] != $_REQUEST[' 'pma_lang', 'pma_charset', 'pma_collation_connection', /* Possible login form */ 'pma_servername', 'pma_username', 'pma_password', + /* rajk - for playing blobstreamable media */ + 'media_type', 'bs_reference', + /* rajk - for changing BLOB repository file MIME type */ + 'bs_db', 'bs_table', 'bs_ref', 'bs_new_mime_type' ); /** * Require cleanup functions @@ -703,7 +708,7 @@ $GLOBALS['pmaThemeImage'] = $_SESSION['PMA_Theme']->getImgPath(); if (@file_exists($_SESSION['PMA_Theme']->getLayoutFile())) { include $_SESSION['PMA_Theme']->getLayoutFile(); /** - * @todo remove if all themes are updated to use Navi instead of Left as frame name + * @todo remove if all themes are update use Navi instead of Left as frame name */ if (! isset($GLOBALS['cfg']['NaviWidth']) && isset($GLOBALS['cfg']['LeftWidth'])) { @@ -931,6 +936,13 @@ if (! defined('PMA_MINIMUM_COMMON')) { unset($_SESSION['profiling']); } + // rajk - library file for blobstreaming + require_once './libraries/blobstreaming.lib.php'; + + // rajk - checks for blobstreaming plugins and databases that support + // blobstreaming (by having the necessary tables for blobstreaming) + if (checkBLOBStreamingPlugins()) + checkBLOBStreamableDatabases(); } // end if !defined('PMA_MINIMUM_COMMON') // remove sensitive values from session diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 47588d73c..1f3ef0910 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -748,7 +748,23 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count = $table_groups = array(); + // for blobstreaming - list of blobstreaming tables - rajk + + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // if PMA configuration exists + if (!empty($PMA_Config)) + $session_bs_tables = $_SESSION['PMA_Config']->get('BLOBSTREAMING_TABLES'); + foreach ($tables as $table_name => $table) { + // if BS tables exist + if (isset($session_bs_tables)) + // compare table name to tables in list of blobstreaming tables + foreach ($session_bs_tables as $table_key=>$table_val) + // if table is in list, skip outer foreach loop + if ($table_name == $table_key) + continue 2; // check for correct row count if (null === $table['Rows']) { @@ -764,7 +780,7 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count = if ($tbl_is_view) { $table['Rows'] = PMA_Table::countRecords($db, $table['Name'], - $return = true); + $return = true); } } @@ -1091,7 +1107,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice') if (! empty($cfg['SQLQuery']['Explain']) && ! $query_too_big) { $explain_params = $url_params; // Detect if we are validating as well - // To preserve the validate URL data + // To preserve the validate uRL data if (! empty($GLOBALS['validatequery'])) { $explain_params['validatequery'] = 1; } @@ -1490,7 +1506,7 @@ function PMA_getTab($tab) $tab = array_merge($defaults, $tab); - // determine additional style-class + // determine additionnal style-class if (empty($tab['class'])) { if ($tab['text'] == $GLOBALS['strEmpty'] || $tab['text'] == $GLOBALS['strDrop']) { diff --git a/libraries/config.default.php b/libraries/config.default.php index 18b90e573..fe4b6899e 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -129,6 +129,12 @@ $cfg['Servers'][$i]['connect_type'] = 'tcp'; */ $cfg['Servers'][$i]['extension'] = 'mysql'; +/* rajk - added for blobstreaming */ +$cfg['Servers'][$i]['bs_garbage_threshold'] = ''; +$cfg['Servers'][$i]['bs_repository_threshold'] = ''; +$cfg['Servers'][$i]['bs_temp_blob_timeout'] = ''; +$cfg['Servers'][$i]['bs_temp_log_threshold'] = ''; + /** * Use compressed protocol for the MySQL connection (requires PHP >= 4.3.0) * diff --git a/libraries/core.lib.php b/libraries/core.lib.php index daa2ae4da..a01d08a1d 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -297,6 +297,33 @@ function PMA_getTableCount($db) null, PMA_DBI_QUERY_STORE); if ($tables) { $num_tables = PMA_DBI_num_rows($tables); + + // for blobstreaming - get blobstreaming tables + // for use in determining if a table here is a blobstreaming table - rajk + + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // if PMA configuration exists + if (!empty($PMA_Config)) + { + // load BS tables + $session_bs_tables = $_SESSION['PMA_Config']->get('BLOBSTREAMING_TABLES'); + + // if BS tables exist + if (isset ($session_bs_tables)) + while ($data = PMA_DBI_fetch_assoc($tables)) + foreach ($session_bs_tables as $table_key=>$table_val) + // if the table is a blobstreaming table, reduce the table count + if ($data['Tables_in_' . $db] == $table_key) + { + if ($num_tables > 0) + $num_tables--; + + break; + } + } // end if PMA configuration exists + PMA_DBI_free_result($tables); } else { $num_tables = 0; @@ -472,9 +499,9 @@ function PMA_checkPageValidity(&$page, $whitelist) } /** - * tries to find the value for the given environment variable name + * trys to find the value for the given environment vriable name * - * searches in $_SERVER, $_ENV then tries getenv() and apache_getenv() + * searchs in $_SERVER, $_ENV than trys getenv() and apache_getenv() * in this order * * @uses $_SERVER @@ -517,7 +544,7 @@ function PMA_removeCookie($cookie) } /** - * sets cookie if value is different from current cookie value, + * sets cookie if value is different from current cokkie value, * or removes if value is equal to default * * @uses PMA_Config::isHttps() diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index a1a6ce64c..8b1ef45c3 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1223,7 +1223,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { $nowrap = ' nowrap'; $where_comparison = ' = ' . $row[$i]; - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; } @@ -1235,7 +1235,56 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { // TEXT fields type so we have to ensure it's really a BLOB $field_flags = PMA_DBI_field_flags($dt_result, $i); if (stristr($field_flags, 'BINARY')) { - $blobtext = PMA_handle_non_printable_contents('BLOB', (isset($row[$i]) ? $row[$i] : ''), $transform_function, $transform_options, $default_function, $meta); + // rajk - for blobstreaming + + $bs_reference_exists = $allBSTablesExist = FALSE; + + // load PMA configuration + $PMA_Config = $_SESSION['PMA_Config']; + + // if PMA configuration exists + if ($PMA_Config) + { + // load BS variables + $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'); + + // if BS plugins exist + if ($pluginsExist) + { + // load BS databases + $bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + + // if BS db array and specified db string not empty and valid + if (!empty($bs_tables) && strlen($db) > 0) + { + $bs_tables = $bs_tables[$db]; + + if (isset($bs_tables)) + { + $allBSTablesExist = TRUE; + + // check if BS tables exist for given database + foreach ($bs_tables as $table_key=>$bs_tbl) + if (!$bs_tables[$table_key]['Exists']) + { + $allBSTablesExist = FALSE; + break; + } + } + } + } + } + + // if necessary BS tables exist + if ($allBSTablesExist) + $bs_reference_exists = PMA_BS_ReferenceExists($row[$i], $db); + + // if valid BS reference exists + if ($bs_reference_exists) + $blobtext = PMA_BS_CreateReferenceLink($row[$i], $db); + else + $blobtext = PMA_handle_non_printable_contents('BLOB', (isset($row[$i]) ? $row[$i] : ''), $transform_function, $transform_options, $default_function, $meta); + $vertical_display['data'][$row_no][$i] = ' ' . $blobtext . ''; unset($blobtext); } else { @@ -1290,7 +1339,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { // loic1: do not wrap if date field type $nowrap = ((preg_match('@DATE|TIME@i', $meta->type) || $bool_nowrap) ? ' nowrap' : ''); $where_comparison = ' = \'' . PMA_sqlAddslashes($row[$i]) . '\''; - $vertical_display['data'][$row_no][$i] = ' ' . "\n"; @@ -2159,13 +2208,12 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct * @param string $map * @param string $data * @param string $transform_function - * @param string $transform_options * @param string $default_function * @param string $nowrap * @param string $where_comparison * @return string formatted data */ -function PMA_prepare_row_data($mouse_events, $class, $condition_field, $analyzed_sql, $meta, $map, $data, $transform_function, $transform_options, $default_function, $nowrap, $where_comparison) { +function PMA_prepare_row_data($mouse_events, $class, $condition_field, $analyzed_sql, $meta, $map, $data, $transform_function, $default_function, $nowrap, $where_comparison) { // continue the tag started before calling this function: $result = $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . $nowrap . '">'; diff --git a/libraries/header_scripts.inc.php b/libraries/header_scripts.inc.php index 88e48d102..2fd4b03da 100644 --- a/libraries/header_scripts.inc.php +++ b/libraries/header_scripts.inc.php @@ -75,9 +75,17 @@ if (in_array('functions.js', $GLOBALS['js_include'])) { if ($GLOBALS['cfg']['Confirm']) { $GLOBALS['js_messages']['strDoYouReally'] = $GLOBALS['strDoYouReally']; $GLOBALS['js_messages']['strDropDatabaseStrongWarning'] = $GLOBALS['strDropDatabaseStrongWarning']; + + // rajk - for blobstreaming + $GLOBALS['js_messages']['strBLOBRepositoryDisableStrongWarning'] = $GLOBALS['strBLOBRepositoryDisableStrongWarning']; + $GLOBALS['js_messages']['strBLOBRepositoryDisableAreYouSure'] = sprintf($GLOBALS['strBLOBRepositoryDisableAreYouSure'], $GLOBALS['db']); } else { $GLOBALS['js_messages']['strDoYouReally'] = ''; $GLOBALS['js_messages']['strDropDatabaseStrongWarning'] = ''; + + // rajk - for blobstreaming + $GLOBALS['js_messages']['strBLOBRepositoryDisableStrongWarning'] = ''; + $GLOBALS['js_messages']['strBLOBRepositoryDisableAreYouSure'] = ''; } } elseif (in_array('indexes.js', $GLOBALS['js_include'])) { $GLOBALS['js_messages']['strFormEmpty'] = $GLOBALS['strFormEmpty']; diff --git a/scripts/setup.php b/scripts/setup.php index 68412e515..075757c82 100644 --- a/scripts/setup.php +++ b/scripts/setup.php @@ -999,6 +999,12 @@ function show_server_form($defaults = array(), $number = FALSE) { array('Server socket', 'socket', 'Socket on which MySQL server is listening, leave empty for default'), array('Connection type', 'connect_type', 'How to connect to server, keep tcp if unsure', array('tcp', 'socket')), array('PHP extension to use', 'extension', 'What PHP extension to use, use mysqli if supported', array('mysql', 'mysqli')), + /* added by rajk - for blobstreaming */ + array('PBMS Garbage Threshold', 'bs_garbage_threshold', 'The size in percentage of the garbage level of a BLOB repository file that must be reached for compaction'), + array('PBMS Repository Threshold', 'bs_repository_threshold', 'The size in bytes of a repository file before it is unlocked'), + array('PBMS Temporary BLOB Timeout', 'bs_temp_blob_timeout', 'The time in seconds before a temporary BLOB reference is scheduled for deletion'), + array('PBMS Temporary Log Threshold', 'bs_temp_log_threshold', 'The maximum size in bytes of a PBMS temporary log file'), + /* end of blobstreaming additions */ array('Compress connection', 'compress', 'Whether to compress connection to MySQL server', FALSE), array('Authentication type', 'auth_type', 'Authentication method to use', array('cookie', 'http', 'config', 'signon')), array('User for config auth', 'user', 'Leave empty if not using config auth'), diff --git a/tbl_change.php b/tbl_change.php index bf3e363ea..e63ebb8df 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -790,13 +790,68 @@ foreach ($rows as $row_id => $vrow) { if (($cfg['ProtectBinary'] && $field['is_blob']) || ($cfg['ProtectBinary'] == 'all' && $field['is_binary'])) { echo "\n"; - echo $strBinaryDoNotEdit; - if (isset($data)) { - $data_size = PMA_formatByteDown(strlen(stripslashes($data)), 3, 1); - echo ' ('. $data_size [0] . ' ' . $data_size[1] . ')'; - unset($data_size); + // rajk - for blobstreaming + $bs_reference_exists = FALSE; + + if (isset ($tbl_type) && strlen ($tbl_type) > 0) + { + // load PMA_Config + $PMA_Config = $_SESSION['PMA_Config']; + + if (!empty($PMA_Config)) + { + $requiredTblType = $PMA_Config->get('PBXT_NAME'); + + if ($requiredTblType == strtolower ($tbl_type)) + { + $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'); + + // check if blobstreaming plugins exist + if ($pluginsExist) + { + $bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + + if (!empty($bs_tables) && strlen($db) > 0) + { + $bs_tables = $bs_tables[$db]; + + if (isset($bs_tables)) + { + $allBSTablesExist = TRUE; + + foreach ($bs_tables as $table_key=>$bs_tbl) + if (!$bs_tables[$table_key]['Exists']) + { + $allBSTablesExist = FALSE; + break; + } + + if ($allBSTablesExist) + $bs_reference_exists = PMA_BS_ReferenceExists($data, $db); + } // end if (isset($bs_tables)) + } // end if (!empty($bs_tables) && strlen($db) > 0) + } // end if ($pluginsExist) + } // end if ($requiredTblType == strtolower ($tbl_type)) + } // end if (!empty($PMA_Config)) + } // end if (isset ($tbl_type) && strlen ($tbl_type) > 0) + + if ($bs_reference_exists) + { + echo ''; + echo ' ' . $strBLOBRepositoryRemove . "
"; + echo PMA_BS_CreateReferenceLink($data, $db); + echo "
"; } - echo "\n"; + else + { + echo $strBinaryDoNotEdit; + if (isset($data)) { + $data_size = PMA_formatByteDown(strlen(stripslashes($data)), 3, 1); + echo ' ('. $data_size [0] . ' ' . $data_size[1] . ')'; + unset($data_size); + } + echo "\n"; + } // end if ($bs_reference_exists) ?> @@ -834,6 +889,66 @@ foreach ($rows as $row_id => $vrow) { // (displayed whatever value the ProtectBinary has) if ($is_upload && $field['is_blob']) { + // added by rajk + // check if field type is of longblob + if ($field['pma_type'] == "longblob") + { + if (isset ($tbl_type) && strlen ($tbl_type) > 0) + { + // load PMA Config + $PMA_Config = $_SESSION['PMA_Config']; + + // is PMA_Config's data loaded? continue only if it is + if (!empty($PMA_Config)) + { + $requiredTblType = $PMA_Config->get('PBXT_NAME'); + + if ($requiredTblType == strtolower ($tbl_type)) + { + $pluginsExist = $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'); + + // check if blobstreaming plugins exist + if ($pluginsExist) + { + $curlExists = $PMA_Config->get('CURL_EXISTS'); + + // check if CURL exists + if ($curlExists) + { + $bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES'); + + // check for BLOBStreamable databases and if current database name is provided + if (!empty($bs_tables) && strlen($db) > 0) + { + $bs_tables = $bs_tables[$db]; + + // check if reference to BLOBStreaming tables exists + if (isset($bs_tables)) + { + $allBSTablesExist = TRUE; + + foreach ($bs_tables as $table_key=>$bs_tbl) + if (!$bs_tables[$table_key]['Exists']) + { + $allBSTablesExist = FALSE; + break; + } + + // check if necessary BLOBStreaming tables exist + if ($allBSTablesExist) + { + echo '
'; + echo ' ' . $strBLOBRepositoryUpload; + } // end if ($allBSTablesExist) + } // end if (isset($bs_tables) + } // end if (!empty($bs_tables) && strlen ($db) > 0) + } // end if ($curlExists) + } // end if ($pluginsExist) + } // end if ($requiredTblType == strtolower ($tbl_type)) + } // end if (!empty($PMA_Config)) + } // end if (isset ($tbl_type) && strlen ($tbl_type) > 0) + } + echo '
'; echo ' '; diff --git a/tbl_replace.php b/tbl_replace.php index 82c273b33..c8a5edbe7 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -35,6 +35,7 @@ * @uses $GLOBALS['table'] * @uses $GLOBALS['goto'] * @uses $GLOBALS['sql_query'] + * @uses PMA_File::getRecentBLOBReference() */ /** @@ -199,10 +200,41 @@ foreach ($loop_array as $rowcount => $primary_key) { ? $_REQUEST['auto_increment']['multi_edit'][$rowcount] : null; + $primary_field = PMA_BS_GetPrimaryField($GLOBALS['db'], $GLOBALS['table']); + foreach ($me_fields as $key => $val) { require './libraries/tbl_replace_fields.inc.php'; + // rajk - for blobstreaming + if (NULL != $primary_field || strlen($primary_field) > 0) + { + $remove_blob_repo = isset($_REQUEST['remove_blob_repo_' . $key]) ? $_REQUEST['remove_blob_repo_' . $key] : NULL; + $upload_blob_repo = isset($_REQUEST['upload_blob_repo_' . $key]) ? $_REQUEST['upload_blob_repo_' . $key] : NULL; + + // checks if an existing blob repository reference should be removed + if (isset($remove_blob_repo) && !isset($upload_blob_repo)) + { + $remove_blob_reference = $_REQUEST['remove_blob_ref_' . $key]; + + if (isset($remove_blob_reference)) + $val = "''"; + } + + // checks if this field requires a bs reference attached to it + $requires_bs_reference = isset($upload_blob_repo); + + if ($requires_bs_reference) + { + // get the most recent BLOB reference + $bs_reference = PMA_File::getRecentBLOBReference(); + + // if the most recent BLOB reference exists, set it as a field value + if (!is_null($bs_reference)) + $val = "'" . PMA_sqlAddslashes($bs_reference) . "'"; + } + } + if (empty($me_funcs[$key])) { $cur_value = $val; } elseif ('UNIX_TIMESTAMP' === $me_funcs[$key] && $val != "''") {