Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
32d3b35df8
@ -43,6 +43,7 @@ phpMyAdmin - ChangeLog
|
||||
- bug #4741 in ./libraries/Advisor.class.php#184 vsprintf(): Too few arguments
|
||||
- bug #4743 Unable to move cursor with keyboard in filter rows box
|
||||
- bug Incorrect link in doc
|
||||
- bug #4745 Tracking does not handle views properly
|
||||
|
||||
4.3.8.0 (2015-01-24)
|
||||
- bug Undefined constant PMA_DRIZZLE
|
||||
|
||||
@ -47,11 +47,12 @@ function PMA_filterTracking(
|
||||
* @param int $last_version last version
|
||||
* @param string $db database
|
||||
* @param array $selected selected tables
|
||||
* @param string $type type of the table; table, view or both
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function PMA_getHtmlForDataDefinitionAndManipulationStatements($url_query,
|
||||
$last_version, $db, $selected
|
||||
$last_version, $db, $selected, $type = 'both'
|
||||
) {
|
||||
$html = '<div id="div_create_version">';
|
||||
$html .= '<form method="post" action="' . $url_query . '">';
|
||||
@ -77,31 +78,54 @@ function PMA_getHtmlForDataDefinitionAndManipulationStatements($url_query,
|
||||
. '" />';
|
||||
$html .= '<p>' . __('Track these data definition statements:')
|
||||
. '</p>';
|
||||
$html .= '<input type="checkbox" name="alter_table" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'ALTER TABLE'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> ALTER TABLE<br/>';
|
||||
$html .= '<input type="checkbox" name="rename_table" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'RENAME TABLE'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> RENAME TABLE<br/>';
|
||||
$html .= '<input type="checkbox" name="create_table" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'CREATE TABLE'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> CREATE TABLE<br/>';
|
||||
$html .= '<input type="checkbox" name="drop_table" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'DROP TABLE'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> DROP TABLE<br/>';
|
||||
|
||||
if ($type == 'both' || $type == 'table') {
|
||||
$html .= '<input type="checkbox" name="alter_table" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'ALTER TABLE'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> ALTER TABLE<br/>';
|
||||
$html .= '<input type="checkbox" name="rename_table" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'RENAME TABLE'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> RENAME TABLE<br/>';
|
||||
$html .= '<input type="checkbox" name="create_table" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'CREATE TABLE'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> CREATE TABLE<br/>';
|
||||
$html .= '<input type="checkbox" name="drop_table" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'DROP TABLE'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> DROP TABLE<br/>';
|
||||
} elseif ($type == 'both' || $type == 'view') {
|
||||
$html .= '<input type="checkbox" name="alter_view" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'ALTER VIEW'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> ALTER VIEW<br/>';
|
||||
$html .= '<input type="checkbox" name="drop_view" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'DROP VIEW'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> DROP VIEW<br/>';
|
||||
$html .= '<input type="checkbox" name="create_view" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
'CREATE VIEW'
|
||||
) !== false ? ' checked="checked"' : '')
|
||||
. ' /> CREATE VIEW<br/>';
|
||||
}
|
||||
$html .= '<br/>';
|
||||
|
||||
$html .= '<input type="checkbox" name="create_index" value="true"'
|
||||
. (/*overload*/mb_stripos(
|
||||
$GLOBALS['cfg']['Server']['tracking_default_statements'],
|
||||
@ -1216,6 +1240,15 @@ function PMA_getTrackingSet()
|
||||
if (isset($_REQUEST['drop_table']) && $_REQUEST['drop_table'] == true) {
|
||||
$tracking_set .= 'DROP TABLE,';
|
||||
}
|
||||
if (isset($_REQUEST['alter_view']) && $_REQUEST['alter_view'] == true) {
|
||||
$tracking_set .= 'ALTER VIEW,';
|
||||
}
|
||||
if (isset($_REQUEST['create_view']) && $_REQUEST['create_view'] == true) {
|
||||
$tracking_set .= 'CREATE VIEW,';
|
||||
}
|
||||
if (isset($_REQUEST['drop_view']) && $_REQUEST['drop_view'] == true) {
|
||||
$tracking_set .= 'DROP VIEW,';
|
||||
}
|
||||
if (isset($_REQUEST['create_index']) && $_REQUEST['create_index'] == true) {
|
||||
$tracking_set .= 'CREATE INDEX,';
|
||||
}
|
||||
|
||||
@ -186,11 +186,13 @@ if ($last_version > 0) {
|
||||
);
|
||||
}
|
||||
|
||||
$type = PMA_Table::isView($GLOBALS['db'], $GLOBALS['table']) ? 'view' : 'table';
|
||||
$html .= PMA_getHtmlForDataDefinitionAndManipulationStatements(
|
||||
'tbl_tracking.php' . $url_query,
|
||||
$last_version,
|
||||
$GLOBALS['db'],
|
||||
array($GLOBALS['table'])
|
||||
array($GLOBALS['table']),
|
||||
$type
|
||||
);
|
||||
|
||||
$html .= '<br class="clearfloat"/>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user