Skip to content

Commit a2f78a6

Browse files
author
ninadsp
committed
Resolve merge conflicts for upstream merge
2 parents 2bec345 + d0fc397 commit a2f78a6

175 files changed

Lines changed: 76574 additions & 70366 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ChangeLog

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,22 @@ $Id$
9191
+ [core] Dropped AllowAnywhereRecoding configuration variable.
9292
- rfe #3016457 [interface] Define tab order in SQL form to allow easier tab
9393
navigation.
94-
+ [code] Centralized format string expansion, @VARIABLES@ are recommended way
95-
now.
94+
+ [core] Centralized format string expansion, @VARIABLES@ are recommended way
95+
now, used by file name templates, default queries, export and title
96+
generating.
9697
+ [validator] SQL validator works also with SOAP PHP extension.
9798
- [interface] Better formatting for SQL validator results.
99+
- [doc] The linked-tables infrastructure is now called phpMyAdmin
100+
configuration storage.
101+
- [interface] Move drop/empty links from being tabs to Operations tab.
102+
- [interface] Fixed rendering of error/notice/info titles background.
98103

99104
3.3.6.0 (not yet released)
100-
- bug #3031705 [core] Do not use CONCAT for DECIMAL fields.
105+
- bug #3033063 [core] Navi gets wrong db name
106+
- bug #3031705 [core] Fix generating condition for real numbers by comparing
107+
them to string.
101108

102-
3.3.5.0 (not yet released)
109+
3.3.5.0 (2010-07-26)
103110
- patch #2932113 [information_schema] Slow export when having lots of
104111
databases, thanks to Stéphane Pontier - shadow_walker
105112
- bug #3022705 [import] Import button does not work in Catalan when there
@@ -114,6 +121,7 @@ $Id$
114121
- bug [export] CSV for MS Excel (Windows) should have semi-colon as separator
115122
- [core] Update library PHPExcel to version 1.7.3c
116123
- bug #2994885, bug #3029168 [import] Convert Excel column name correctly
124+
- bug [scripts] MySQL 5.5.5 does not accept TIMESTAMP(14) in create_tables.sql
117125

118126
3.3.4.0 (2010-06-28)
119127
- bug #2996161 [import] properly escape import value

Documentation.html

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h2 id="require">Requirements</h2>
6969
</li>
7070
<li>To support uploading of ZIP files, you need the PHP <tt>zip</tt> extension.</li>
7171
<li>For proper support of multibyte strings (eg. UTF-8, which is
72-
currently default), you should install mbstring and ctype
72+
currently the default), you should install the mbstring and ctype
7373
extensions.
7474
</li>
7575
<li>You need GD2 support in PHP to display inline
@@ -84,6 +84,9 @@ <h2 id="require">Requirements</h2>
8484
</li>
8585
<li>To support upload progress bars, see <a href="#faq2_9">
8686
<abbr title="Frequently Asked Questions">FAQ</abbr> 2.9</a>.</li>
87+
<li>To support BLOB streaming, see PHP and MySQL requirements
88+
in <a href="#faq6_25">
89+
<abbr title="Frequently Asked Questions">FAQ</abbr> 6.25</a>.</li>
8790
</ul>
8891
</li>
8992
<li><b>MySQL</b> 5.0 or newer (<a href="#faq1_17">details</a>);</li>
@@ -167,7 +170,7 @@ <h2 id="setup">Installation</h2>
167170

168171
<ol><li><a href="#quick_install">Quick Install</a></li>
169172
<li><a href="#setup_script">Setup script usage</a></li>
170-
<li><a href="#linked-tables">Linked-tables infrastructure</a></li>
173+
<li><a href="#linked-tables">phpMyAdmin configuration storage</a></li>
171174
<li><a href="#upgrading">Upgrading from an older version</a></li>
172175
<li><a href="#authentication_modes">Using authentication modes</a></li>
173176
</ol>
@@ -323,7 +326,7 @@ <h3 id="quick_install">Quick Install</h3>
323326
</li>
324327
</ol>
325328

326-
<h3 id="linked-tables">Linked-tables infrastructure</h3>
329+
<h3 id="linked-tables">phpMyAdmin configuration storage</h3>
327330

328331
<p> For a whole set of new features (bookmarks, comments,
329332
<abbr title="structured query language">SQL</abbr>-history,
@@ -370,7 +373,7 @@ <h3 id="upgrading">Upgrading from an older version</h3>
370373
is version-specific.</p>
371374

372375
<p> If you have upgraded your MySQL server from a version previous to 4.1.2 to
373-
version 4.1.2 or newer and if you use the pmadb/linked table infrastructure,
376+
version 4.1.2 or newer and if you use the phpMyAdmin configuration storage,
374377
you should run the SQL script found in
375378
<tt>scripts/upgrade_tables_mysql_4_1_2+.sql</tt>.</p>
376379

@@ -440,8 +443,9 @@ <h3 id="authentication_modes">Using authentication modes</h3>
440443
GRANT SELECT, INSERT, UPDATE, DELETE ON &lt;pma_db&gt;.* TO 'pma'@'localhost';
441444
</pre>
442445

443-
(this of course requires that your <a href="#linked-tables">linked-tables
444-
infrastructure</a> be set up).<br /></li>
446+
(this of course requires that your <a href="#linked-tables">phpMyAdmin
447+
configuration storage</a> be set up).
448+
<br /></li>
445449

446450
<li>Then each of the <i>true</i> users should be granted a set of privileges
447451
on a set of particular databases. Normally you shouldn't give global
@@ -862,11 +866,11 @@ <h2 id="config">Configuration</h2>
862866
<dt id="pmadb">
863867
<span id="cfg_Servers_pmadb">$cfg['Servers'][$i]['pmadb']</span> string
864868
</dt>
865-
<dd>The name of the database containing the linked-tables infrastructure.
869+
<dd>The name of the database containing the phpMyAdmin configuration storage.
866870
<br /><br />
867871

868-
See the <a href="#linked-tables">Linked-tables infrastructure</a>
869-
section in this document to see the benefits of this infrastructure,
872+
See the <a href="#linked-tables">phpMyAdmin configuration storage</a>
873+
section in this document to see the benefits of this feature,
870874
and for a quick way of creating this database and the needed tables.
871875
<br /><br />
872876

@@ -875,7 +879,7 @@ <h2 id="config">Configuration</h2>
875879
case, just put your current database name in
876880
<tt>$cfg['Servers'][$i]['pmadb']</tt>. For a multi-user installation,
877881
set this parameter to the name of your central database containing
878-
the linked-tables infrastructure.</dd>
882+
the phpMyAdmin configuration storage.</dd>
879883

880884
<dt id="bookmark">
881885
<span id="cfg_Servers_bookmarktable">$cfg['Servers'][$i]['bookmarktable']</span> string
@@ -884,7 +888,7 @@ <h2 id="config">Configuration</h2>
884888
useful for queries you often run.<br /><br />
885889

886890
To allow the usage of this functionality:
887-
<ul><li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
891+
<ul><li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>
888892
<li>enter the table name in
889893
<tt>$cfg['Servers'][$i]['bookmarktable']</tt></li>
890894
</ul>
@@ -920,8 +924,8 @@ <h2 id="config">Configuration</h2>
920924

921925
To allow the usage of this functionality:
922926

923-
<ul><li>set up <a href="#pmadb">pmadb</a> and the linked-tables
924-
infrastructure</li>
927+
<ul><li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin
928+
configuration storage</li>
925929
<li>put the relation table name in
926930
<tt>$cfg['Servers'][$i]['relation']</tt></li>
927931
<li>now as normal user open phpMyAdmin and for each one of your
@@ -945,7 +949,7 @@ <h2 id="config">Configuration</h2>
945949
cursor over the corresponding key.<br />
946950
This configuration variable will hold the name of this special
947951
table. To allow the usage of this functionality:
948-
<ul><li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
952+
<ul><li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>
949953
<li>put the table name in
950954
<tt>$cfg['Servers'][$i]['table_info']</tt> (e.g.
951955
'pma_table_info')</li>
@@ -972,8 +976,7 @@ <h2 id="config">Configuration</h2>
972976

973977
To allow the usage of this functionality:
974978

975-
<ul><li>set up <a href="#pmadb">pmadb</a> and the linked-tables
976-
infrastructure</li>
979+
<ul><li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>
977980
<li>put the correct table names in
978981
<tt>$cfg['Servers'][$i]['table_coords']</tt> and
979982
<tt>$cfg['Servers'][$i]['pdf_pages']</tt></li>
@@ -1004,8 +1007,7 @@ <h2 id="config">Configuration</h2>
10041007
<br /><br />
10051008

10061009
To allow the usage of this functionality:
1007-
<ul><li>set up <a href="#pmadb">pmadb</a> and the linked-tables
1008-
infrastructure</li>
1010+
<ul><li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>
10091011
<li>put the table name in
10101012
<tt>$cfg['Servers'][$i]['column_info']</tt> (e.g.
10111013
'pma_column_info')</li>
@@ -1045,8 +1047,7 @@ <h2 id="config">Configuration</h2>
10451047

10461048
To allow the usage of this functionality:
10471049

1048-
<ul><li>set up <a href="#pmadb">pmadb</a> and the linked-tables
1049-
infrastructure</li>
1050+
<ul><li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>
10501051
<li>put the table name in <tt>$cfg['Servers'][$i]['history']</tt>
10511052
(e.g. 'pma_history')
10521053
</li>
@@ -1078,7 +1079,7 @@ <h2 id="config">Configuration</h2>
10781079
To allow the usage of this functionality:
10791080

10801081
<ul>
1081-
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
1082+
<li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>
10821083
<li>put the table name in <tt>$cfg['Servers'][$i]['tracking']</tt> (e.g. 'pma_tracking')</li>
10831084
</ul>
10841085
</dd>
@@ -1149,8 +1150,7 @@ <h2 id="config">Configuration</h2>
11491150

11501151
To allow the usage of this functionality:
11511152

1152-
<ul><li>set up <a href="#pmadb">pmadb</a> and the linked-tables
1153-
infrastructure</li>
1153+
<ul><li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>
11541154
<li>put the table name in <tt>$cfg['Servers'][$i]['designer_coords']</tt> (e.g. 'pma_designer_coords')
11551155
</li>
11561156
</ul>
@@ -2182,9 +2182,9 @@ <h2 id="config">Configuration</h2>
21822182
<span id="cfg_DefaultQueryDatabase">$cfg['DefaultQueryDatabase']</span> string
21832183
</dt>
21842184
<dd>Default queries that will be displayed in query boxes when user didn't
2185-
specify any. Use %d for database name, %t for table name and %f for a
2186-
comma separated list of column names. Note that %t and %f are only
2187-
applicable to <tt>$cfg['DefaultQueryTable']</tt>.</dd>
2185+
specify any. You can use standard
2186+
<a href="#faq6_27">format string expansion</a>.
2187+
</dd>
21882188

21892189
<dt id="cfg_SQP_fmtType">$cfg['SQP']['fmtType'] string [<tt>html</tt>|<tt>none</tt>]</dt>
21902190
<dd>
@@ -4306,13 +4306,20 @@ <h4 id="faq6_24">
43064306
<h4 id="faq6_25">
43074307
<a href="#faq6_25">6.25 How does BLOB streaming work in phpMyAdmin?</a></h4>
43084308

4309-
<p> First, for general information about BLOB streaming on MySQL, visit <a href="http://blobstreaming.org">blobstreaming.org</a>. We currently support streaming if you are running MySQL 5.1 with the PBXT and PBMS storage engines. Moreover, only PBMS 0.5.04 is supported.</p>
4309+
<p> For general information about BLOB streaming on MySQL, visit <a href="http://blobstreaming.org">blobstreaming.org</a>. You need the following components:</p>
4310+
<ul>
4311+
<li>PBMS BLOB Streaming Daemon for MySQL (0.5.15 or later)</li>
4312+
<li>Streaming enabled PBXT Storage engine for MySQL (1.0.11-6 or
4313+
later)</li>
4314+
<li>PBMS Client Library for MySQL (0.5.15 or later)</li>
4315+
<li>PBMS PHP Extension for MySQL (0.1.1 or later)</li>
4316+
</ul>
4317+
4318+
<p>Here are details about configuration and operation:</p>
43104319

43114320
<ol>
4312-
<li>In <tt>config.inc.php</tt> your host should be defined with a FQDN (fully qualified domain name) instead of something like &quot;localhost&quot;.</li>
4313-
<li>A current limitation is that your first login via phpMyAdmin to a freshly-started server must be done with an account that has the SUPER privilege.</li>
4314-
<li>On your target database, go to Operations and in the &quot;BLOB Repository&quot; section, click &quot;Enable&quot;. This creates the PBMS system tables inside your database.</li>
4315-
<li>Ensure that your target table is under the PBXT storage engine and has a LONGBLOB column.</li>
4321+
<li>In <tt>config.inc.php</tt> your host should be defined with a FQDN (fully qualified domain name) instead of &quot;localhost&quot;.</li>
4322+
<li>Ensure that your target table is under the PBXT storage engine and has a LONGBLOB column and a primary key.</li>
43164323
<li>When you insert or update a row in this table, put a checkmark on the &quot;Upload to BLOB repository&quot; optional choice; otherwise, the upload will be done directly in your column instead of the repository.</li>
43174324
<li>Finally when you browse your table, you'll see in your column a link to stream your data, for example &quot;View image&quot;. A header containing the correct MIME-type will be sent to your browser; this MIME-type was stored at upload time but in case it's incorrect, it's possible to edit it by clicking on the displayed MIME-type.</li>
43184325
</ol>
@@ -4346,6 +4353,8 @@ <h4 id="faq6_27">
43464353
<dd>Currently opened database</dd>
43474354
<dt><code>@TABLE@</code></dt>
43484355
<dd>Currently opened table</dd>
4356+
<dt><code>@FIELDS@</code></dt>
4357+
<dd>Fields of currently opened table</dd>
43494358
<dt><code>@PHPMYADMIN@</code></dt>
43504359
<dd>phpMyAdmin with version</dd>
43514360
</dl>
@@ -4845,6 +4854,11 @@ <h3>Credits, in chronological order</h3>
48454854
<li>Replication support</li>
48464855
</ul></li>
48474856

4857+
<li>Barrie Leslie
4858+
<ul>
4859+
<li>BLOBstreaming support with PBMS PHP extension</li>
4860+
</ul></li>
4861+
48484862
</ul>
48494863

48504864
<p>

browse_foreigners.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* Displays the frame
2323
*/
2424
$per_page = 200;
25-
require_once './libraries/relation.lib.php'; // foreign keys
2625
require_once './libraries/transformations.lib.php'; // Transformations
2726
$cfgRelation = PMA_getRelationsParam();
2827
$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE);

bs_change_mime_type.php

Lines changed: 12 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -30,70 +30,19 @@
3030
$bsNewMIMEType = isset($_REQUEST['bs_new_mime_type']) ? urldecode($_REQUEST['bs_new_mime_type']) : NULL;
3131

3232
// necessary variables exist
33-
if ($bsDB && $bsTable && $bsReference && $bsNewMIMEType)
33+
if ($bsDB && $bsTable && $bsReference && $bsNewMIMEType)
3434
{
35-
// load PMA configuration
36-
$PMA_Config = $GLOBALS['PMA_Config'];
37-
38-
// if PMA configuration exists
39-
if (!empty($PMA_Config))
40-
{
41-
// if BS plugins exist
42-
if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'))
43-
{
44-
$pbms_ref_tbl = $PMA_Config->get('PBMS_NAME') . '_reference';
45-
$pbms_cust_content_type_tbl = $PMA_Config->get('PBMS_NAME') . '_custom_content_type';
46-
47-
// if specified DB is selected
48-
if (PMA_DBI_select_db($bsDB))
49-
{
50-
$query = "SELECT * FROM " . PMA_backquote($pbms_ref_tbl);
51-
$query .= " WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'";
52-
53-
$result = PMA_DBI_query($query);
54-
55-
// if record exists
56-
if ($data = PMA_DBI_fetch_assoc($result))
57-
{
58-
$query = "SELECT count(*) FROM " . PMA_backquote($pbms_cust_content_type_tbl);
59-
$query .= " WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'";
60-
61-
$result = PMA_DBI_query($query);
62-
63-
// if record exists
64-
if ($data = PMA_DBI_fetch_assoc($result))
65-
{
66-
if (1 == $data['count(*)'])
67-
{
68-
$query = "UPDATE " . PMA_backquote($pbms_cust_content_type_tbl) . " SET Content_type='";
69-
$query .= PMA_sqlAddslashes($bsNewMIMEType) . "' WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'";
70-
}
71-
else
72-
{
73-
$query = "INSERT INTO " . PMA_backquote($pbms_cust_content_type_tbl) . " (Blob_url, Content_type)";
74-
$query .= " VALUES('" . PMA_sqlAddslashes($bsReference) . "', '" . PMA_sqlAddslashes($bsNewMIMEType) . "')";
75-
}
76-
77-
$result = PMA_DBI_query($query);
78-
79-
// if query execution succeeded
80-
if ($result)
81-
{
82-
// determine redirector page
83-
$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';
84-
85-
// redirect to specified page
86-
?>
87-
<script>
88-
window.location = "<?php echo $newLoc ?>";
89-
</script>
90-
<?php
91-
} // end if ($result)
92-
} // end if ($data = PMA_DBI_fetch_assoc($result))
93-
} // end if ($data = PMA_DBI_fetch_assoc($result))
94-
} // end if (PMA_DBI_select_db($bsDB))
95-
} // end if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'))
96-
} // end if (!empty($PMA_Config))
35+
if (PMA_BS_SetContentType($bsDB, $bsTable, $bsReference, $bsNewMIMEType)) {
36+
// determine redirector page
37+
$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';
38+
39+
// redirect to specified page
40+
?>
41+
<script>
42+
window.location = "<?php echo $newLoc ?>";
43+
</script>
44+
<?php
45+
} // end if ($result)
9746
} // end if ($bsDB && $bsTable && $bsReference && $bsNewMIMEType)
9847

9948
?>

bs_disp_as_mime_type.php

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
*/
1010
require_once './libraries/common.inc.php';
1111

12-
// load PMA configuration
13-
$PMA_Config = $GLOBALS['PMA_Config'];
14-
15-
// retrieve BS server variables from PMA configuration
16-
$bs_server = $PMA_Config->get('BLOBSTREAMING_SERVER');
17-
if (empty($bs_server)) die('No blob streaming server configured!');
18-
1912
// Check URL parameters
2013
PMA_checkParameters(array('reference', 'c_type'));
2114

@@ -30,15 +23,23 @@
3023
*/
3124
$c_type = preg_replace('/[^A-Za-z0-9/_-]/', '_', $_REQUEST['c_type']);
3225

33-
$filename = 'http://' . $bs_server . '/' . $reference;
26+
// Get the blob streaming URL
27+
$filename = PMA_BS_getURL($reference);
28+
if (empty($filename)) {
29+
die(__('No blob streaming server configured!'));
30+
}
3431

3532
$hdrs = get_headers($filename, 1);
3633

37-
if ($hdrs === FALSE) die('Failed to fetch headers');
34+
if ($hdrs === FALSE) {
35+
die(__('Failed to fetch headers'));
36+
}
3837

3938
$fHnd = fopen($filename, "rb");
4039

41-
if ($fHnd === FALSE) die('Failed to open remote URL');
40+
if ($fHnd === FALSE) {
41+
die(__('Failed to open remote URL'));
42+
}
4243

4344
$f_size = $hdrs['Content-Length'];
4445

@@ -58,8 +59,9 @@
5859
$content .= fread($fHnd, $f_size);
5960
$pos = strlen($content);
6061

61-
if ($pos >= $f_size)
62+
if ($pos >= $f_size) {
6263
break;
64+
}
6365
}
6466

6567
echo $content;

0 commit comments

Comments
 (0)