clarify function name
This commit is contained in:
@@ -592,7 +592,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?>
|
|||||||
SELECT *
|
SELECT *
|
||||||
FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages']) . '
|
FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages']) . '
|
||||||
WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
$test_rs = PMA_query_as_cu($test_query, null, PMA_DBI_QUERY_STORE);
|
$test_rs = PMA_query_as_controluser($test_query, null, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) { ?>
|
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) { ?>
|
||||||
<!-- PDF schema -->
|
<!-- PDF schema -->
|
||||||
|
@@ -547,7 +547,7 @@ class PMA_Table
|
|||||||
|
|
||||||
// must use PMA_DBI_QUERY_STORE here, since we execute another
|
// must use PMA_DBI_QUERY_STORE here, since we execute another
|
||||||
// query inside the loop
|
// query inside the loop
|
||||||
$table_copy_rs = PMA_query_as_cu($table_copy_query, true,
|
$table_copy_rs = PMA_query_as_controluser($table_copy_query, true,
|
||||||
PMA_DBI_QUERY_STORE);
|
PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
while ($table_copy_row = @PMA_DBI_fetch_assoc($table_copy_rs)) {
|
while ($table_copy_row = @PMA_DBI_fetch_assoc($table_copy_rs)) {
|
||||||
@@ -567,7 +567,7 @@ class PMA_Table
|
|||||||
(\'' . implode('\', \'', $value_parts) . '\',
|
(\'' . implode('\', \'', $value_parts) . '\',
|
||||||
\'' . implode('\', \'', $new_value_parts) . '\')';
|
\'' . implode('\', \'', $new_value_parts) . '\')';
|
||||||
|
|
||||||
PMA_query_as_cu($new_table_query);
|
PMA_query_as_controluser($new_table_query);
|
||||||
$last_id = PMA_DBI_insert_id();
|
$last_id = PMA_DBI_insert_id();
|
||||||
} // end while
|
} // end while
|
||||||
|
|
||||||
@@ -787,7 +787,7 @@ class PMA_Table
|
|||||||
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
unset($remove_query);
|
unset($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -800,7 +800,7 @@ class PMA_Table
|
|||||||
. ' table_name = \'' . PMA_sqlAddslashes($target_table) . '\''
|
. ' table_name = \'' . PMA_sqlAddslashes($target_table) . '\''
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -810,7 +810,7 @@ class PMA_Table
|
|||||||
. ' foreign_db = \'' . PMA_sqlAddslashes($target_db) . '\''
|
. ' foreign_db = \'' . PMA_sqlAddslashes($target_db) . '\''
|
||||||
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($source_db) . '\''
|
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($source_db) . '\''
|
||||||
. ' AND foreign_table = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
. ' AND foreign_table = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
|
|
||||||
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['relation'])
|
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['relation'])
|
||||||
@@ -818,7 +818,7 @@ class PMA_Table
|
|||||||
. ' master_db = \'' . PMA_sqlAddslashes($target_db) . '\''
|
. ' master_db = \'' . PMA_sqlAddslashes($target_db) . '\''
|
||||||
. ' WHERE master_db = \'' . PMA_sqlAddslashes($source_db) . '\''
|
. ' WHERE master_db = \'' . PMA_sqlAddslashes($source_db) . '\''
|
||||||
. ' AND master_table = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
. ' AND master_table = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,21 +835,21 @@ class PMA_Table
|
|||||||
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
/*
|
/*
|
||||||
$pdf_query = 'SELECT pdf_page_number '
|
$pdf_query = 'SELECT pdf_page_number '
|
||||||
. ' FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['table_coords'])
|
. ' FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['table_coords'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($target_table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($target_table) . '\'';
|
||||||
$pdf_rs = PMA_query_as_cu($pdf_query);
|
$pdf_rs = PMA_query_as_controluser($pdf_query);
|
||||||
|
|
||||||
while ($pdf_copy_row = PMA_DBI_fetch_assoc($pdf_rs)) {
|
while ($pdf_copy_row = PMA_DBI_fetch_assoc($pdf_rs)) {
|
||||||
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['pdf_pages'])
|
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['pdf_pages'])
|
||||||
. ' SET db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
. ' SET db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
||||||
. ' AND page_nr = \'' . PMA_sqlAddslashes($pdf_copy_row['pdf_page_number']) . '\'';
|
. ' AND page_nr = \'' . PMA_sqlAddslashes($pdf_copy_row['pdf_page_number']) . '\'';
|
||||||
$tb_rs = PMA_query_as_cu($table_query);
|
$tb_rs = PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
unset($tb_rs);
|
unset($tb_rs);
|
||||||
}
|
}
|
||||||
@@ -862,7 +862,7 @@ class PMA_Table
|
|||||||
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -880,7 +880,7 @@ class PMA_Table
|
|||||||
WHERE
|
WHERE
|
||||||
db_name = \'' . PMA_sqlAddslashes($source_db) . '\' AND
|
db_name = \'' . PMA_sqlAddslashes($source_db) . '\' AND
|
||||||
table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
|
||||||
$comments_copy_rs = PMA_query_as_cu($comments_copy_query);
|
$comments_copy_rs = PMA_query_as_controluser($comments_copy_query);
|
||||||
|
|
||||||
// Write every comment as new copied entry. [MIME]
|
// Write every comment as new copied entry. [MIME]
|
||||||
while ($comments_copy_row = PMA_DBI_fetch_assoc($comments_copy_rs)) {
|
while ($comments_copy_row = PMA_DBI_fetch_assoc($comments_copy_rs)) {
|
||||||
@@ -895,7 +895,7 @@ class PMA_Table
|
|||||||
. '\'' . PMA_sqlAddslashes($comments_copy_row['transformation']) . '\','
|
. '\'' . PMA_sqlAddslashes($comments_copy_row['transformation']) . '\','
|
||||||
. '\'' . PMA_sqlAddslashes($comments_copy_row['transformation_options']) . '\'' : '')
|
. '\'' . PMA_sqlAddslashes($comments_copy_row['transformation_options']) . '\'' : '')
|
||||||
. ')';
|
. ')';
|
||||||
PMA_query_as_cu($new_comment_query);
|
PMA_query_as_controluser($new_comment_query);
|
||||||
} // end while
|
} // end while
|
||||||
PMA_DBI_free_result($comments_copy_rs);
|
PMA_DBI_free_result($comments_copy_rs);
|
||||||
unset($comments_copy_rs);
|
unset($comments_copy_rs);
|
||||||
@@ -1040,7 +1040,7 @@ class PMA_Table
|
|||||||
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
||||||
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
||||||
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
unset($remove_query);
|
unset($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1052,7 +1052,7 @@ class PMA_Table
|
|||||||
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
||||||
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
||||||
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1064,7 +1064,7 @@ class PMA_Table
|
|||||||
`foreign_table` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
`foreign_table` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
||||||
WHERE `foreign_db` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
WHERE `foreign_db` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
||||||
AND `foreign_table` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
AND `foreign_table` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
|
|
||||||
$table_query = '
|
$table_query = '
|
||||||
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
|
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
|
||||||
@@ -1073,7 +1073,7 @@ class PMA_Table
|
|||||||
`master_table` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
`master_table` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
||||||
WHERE `master_db` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
WHERE `master_db` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
||||||
AND `master_table` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
AND `master_table` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1085,7 +1085,7 @@ class PMA_Table
|
|||||||
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
||||||
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
||||||
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1097,7 +1097,7 @@ class PMA_Table
|
|||||||
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
|
||||||
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
|
||||||
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
unset($table_query);
|
unset($table_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -119,7 +119,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
|
|||||||
$sql_query = $import_run_buffer['sql'];
|
$sql_query = $import_run_buffer['sql'];
|
||||||
} elseif ($run_query) {
|
} elseif ($run_query) {
|
||||||
if ($controluser) {
|
if ($controluser) {
|
||||||
$result = PMA_query_as_cu($import_run_buffer['sql']);
|
$result = PMA_query_as_controluser($import_run_buffer['sql']);
|
||||||
} else {
|
} else {
|
||||||
$result = PMA_DBI_try_query($import_run_buffer['sql']);
|
$result = PMA_DBI_try_query($import_run_buffer['sql']);
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ require_once './libraries/Table.class.php';
|
|||||||
*
|
*
|
||||||
* @author Mike Beck <mikebeck@users.sourceforge.net>
|
* @author Mike Beck <mikebeck@users.sourceforge.net>
|
||||||
*/
|
*/
|
||||||
function PMA_query_as_cu($sql, $show_error = true, $options = 0)
|
function PMA_query_as_controluser($sql, $show_error = true, $options = 0)
|
||||||
{
|
{
|
||||||
if ($show_error) {
|
if ($show_error) {
|
||||||
$result = PMA_DBI_query($sql, $GLOBALS['controllink'], $options);
|
$result = PMA_DBI_query($sql, $GLOBALS['controllink'], $options);
|
||||||
@@ -40,7 +40,7 @@ function PMA_query_as_cu($sql, $show_error = true, $options = 0)
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} // end of the "PMA_query_as_cu()" function
|
} // end of the "PMA_query_as_controluser()" function
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @uses $_SESSION['relation' . $GLOBALS['server']] for caching
|
* @uses $_SESSION['relation' . $GLOBALS['server']] for caching
|
||||||
@@ -198,7 +198,7 @@ function PMA_printDiagMessageForParameter($parameter, $relation_parameter_set, $
|
|||||||
* @uses PMA_DBI_QUERY_STORE
|
* @uses PMA_DBI_QUERY_STORE
|
||||||
* @uses PMA_DBI_select_db()
|
* @uses PMA_DBI_select_db()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @uses PMA_DBI_fetch_row()
|
* @uses PMA_DBI_fetch_row()
|
||||||
* @uses PMA_DBI_free_result()
|
* @uses PMA_DBI_free_result()
|
||||||
* @access protected
|
* @access protected
|
||||||
@@ -239,7 +239,7 @@ function PMA__getRelationsParam()
|
|||||||
// fear it might be too slow
|
// fear it might be too slow
|
||||||
|
|
||||||
$tab_query = 'SHOW TABLES FROM ' . PMA_backquote($GLOBALS['cfg']['Server']['pmadb']);
|
$tab_query = 'SHOW TABLES FROM ' . PMA_backquote($GLOBALS['cfg']['Server']['pmadb']);
|
||||||
$tab_rs = PMA_query_as_cu($tab_query, false, PMA_DBI_QUERY_STORE);
|
$tab_rs = PMA_query_as_controluser($tab_query, false, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
if (! $tab_rs) {
|
if (! $tab_rs) {
|
||||||
// query failed ... ?
|
// query failed ... ?
|
||||||
@@ -284,7 +284,7 @@ function PMA__getRelationsParam()
|
|||||||
$mime_query = 'SHOW FIELDS FROM '
|
$mime_query = 'SHOW FIELDS FROM '
|
||||||
. PMA_backquote($cfgRelation['db']) . '.'
|
. PMA_backquote($cfgRelation['db']) . '.'
|
||||||
. PMA_backquote($cfgRelation['column_info']);
|
. PMA_backquote($cfgRelation['column_info']);
|
||||||
$mime_rs = PMA_query_as_cu($mime_query, false);
|
$mime_rs = PMA_query_as_controluser($mime_query, false);
|
||||||
|
|
||||||
$mime_field_mimetype = false;
|
$mime_field_mimetype = false;
|
||||||
$mime_field_transformation = false;
|
$mime_field_transformation = false;
|
||||||
@@ -542,7 +542,7 @@ function PMA_getComments($db, $table = '')
|
|||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @uses strlen()
|
* @uses strlen()
|
||||||
* @param string the name of the db to check for
|
* @param string the name of the db to check for
|
||||||
* @return string comment
|
* @return string comment
|
||||||
@@ -560,7 +560,7 @@ function PMA_getDbComment($db)
|
|||||||
WHERE db_name = '" . PMA_sqlAddslashes($db) . "'
|
WHERE db_name = '" . PMA_sqlAddslashes($db) . "'
|
||||||
AND table_name = ''
|
AND table_name = ''
|
||||||
AND column_name = '(db_comment)'";
|
AND column_name = '(db_comment)'";
|
||||||
$com_rs = PMA_query_as_cu($com_qry, true, PMA_DBI_QUERY_STORE);
|
$com_rs = PMA_query_as_controluser($com_qry, true, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
if ($com_rs && PMA_DBI_num_rows($com_rs) > 0) {
|
if ($com_rs && PMA_DBI_num_rows($com_rs) > 0) {
|
||||||
$row = PMA_DBI_fetch_assoc($com_rs);
|
$row = PMA_DBI_fetch_assoc($com_rs);
|
||||||
@@ -585,7 +585,7 @@ function PMA_getDbComment($db)
|
|||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @uses strlen()
|
* @uses strlen()
|
||||||
* @param string the name of the db to check for
|
* @param string the name of the db to check for
|
||||||
* @return string comment
|
* @return string comment
|
||||||
@@ -601,7 +601,7 @@ function PMA_getDbComments()
|
|||||||
SELECT `db_name`, `comment`
|
SELECT `db_name`, `comment`
|
||||||
FROM " . PMA_backquote($cfgRelation['db']) . "." . PMA_backquote($cfgRelation['column_info']) . "
|
FROM " . PMA_backquote($cfgRelation['db']) . "." . PMA_backquote($cfgRelation['column_info']) . "
|
||||||
WHERE `column_name` = '(db_comment)'";
|
WHERE `column_name` = '(db_comment)'";
|
||||||
$com_rs = PMA_query_as_cu($com_qry, true, PMA_DBI_QUERY_STORE);
|
$com_rs = PMA_query_as_controluser($com_qry, true, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
if ($com_rs && PMA_DBI_num_rows($com_rs) > 0) {
|
if ($com_rs && PMA_DBI_num_rows($com_rs) > 0) {
|
||||||
while ($row = PMA_DBI_fetch_assoc($com_rs)) {
|
while ($row = PMA_DBI_fetch_assoc($com_rs)) {
|
||||||
@@ -620,7 +620,7 @@ function PMA_getDbComments()
|
|||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @uses strlen()
|
* @uses strlen()
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $db the name of the db
|
* @param string $db the name of the db
|
||||||
@@ -657,7 +657,7 @@ function PMA_setDbComment($db, $comment = '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($upd_query)){
|
if (isset($upd_query)){
|
||||||
return PMA_query_as_cu($upd_query);
|
return PMA_query_as_controluser($upd_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -669,7 +669,7 @@ function PMA_setDbComment($db, $comment = '')
|
|||||||
* @uses $_SESSION['sql_history']
|
* @uses $_SESSION['sql_history']
|
||||||
* @uses $cfg['QueryHistoryMax']
|
* @uses $cfg['QueryHistoryMax']
|
||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses count()
|
* @uses count()
|
||||||
@@ -714,7 +714,7 @@ function PMA_setHistory($db, $table, $username, $sqlquery)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PMA_query_as_cu('
|
PMA_query_as_controluser('
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['history']) . '
|
' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['history']) . '
|
||||||
(`username`,
|
(`username`,
|
||||||
@@ -778,7 +778,7 @@ function PMA_getHistory($username)
|
|||||||
* @uses $GLOBALS['controllink']
|
* @uses $GLOBALS['controllink']
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddSlashes()
|
* @uses PMA_sqlAddSlashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @uses PMA_DBI_fetch_value()
|
* @uses PMA_DBI_fetch_value()
|
||||||
* @param string $username the username
|
* @param string $username the username
|
||||||
* @access public
|
* @access public
|
||||||
@@ -802,7 +802,7 @@ function PMA_purgeHistory($username)
|
|||||||
LIMIT ' . $GLOBALS['cfg']['QueryHistoryMax'] . ', 1';
|
LIMIT ' . $GLOBALS['cfg']['QueryHistoryMax'] . ', 1';
|
||||||
|
|
||||||
if ($max_time = PMA_DBI_fetch_value($search_query, 0, 0, $GLOBALS['controllink'])) {
|
if ($max_time = PMA_DBI_fetch_value($search_query, 0, 0, $GLOBALS['controllink'])) {
|
||||||
PMA_query_as_cu('
|
PMA_query_as_controluser('
|
||||||
DELETE FROM
|
DELETE FROM
|
||||||
' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['history']) . '
|
' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['history']) . '
|
||||||
WHERE `username` = \'' . PMA_sqlAddSlashes($username) . '\'
|
WHERE `username` = \'' . PMA_sqlAddSlashes($username) . '\'
|
||||||
@@ -1103,7 +1103,7 @@ function PMA_getRelatives($from)
|
|||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @param string $db
|
* @param string $db
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @param string $field
|
* @param string $field
|
||||||
@@ -1119,7 +1119,7 @@ function PMA_REL_renameField($db, $table, $field, $new_name)
|
|||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
||||||
. ' AND display_field = \'' . PMA_sqlAddslashes($field) . '\'';
|
. ' AND display_field = \'' . PMA_sqlAddslashes($field) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['relwork']) {
|
if ($cfgRelation['relwork']) {
|
||||||
@@ -1128,14 +1128,14 @@ function PMA_REL_renameField($db, $table, $field, $new_name)
|
|||||||
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\''
|
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\''
|
||||||
. ' AND master_field = \'' . PMA_sqlAddslashes($field) . '\'';
|
. ' AND master_field = \'' . PMA_sqlAddslashes($field) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
|
|
||||||
$table_query = 'UPDATE ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
$table_query = 'UPDATE ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
||||||
. ' SET foreign_field = \'' . PMA_sqlAddslashes($new_name) . '\''
|
. ' SET foreign_field = \'' . PMA_sqlAddslashes($new_name) . '\''
|
||||||
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\''
|
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\''
|
||||||
. ' AND foreign_field = \'' . PMA_sqlAddslashes($field) . '\'';
|
. ' AND foreign_field = \'' . PMA_sqlAddslashes($field) . '\'';
|
||||||
PMA_query_as_cu($table_query);
|
PMA_query_as_controluser($table_query);
|
||||||
} // end if relwork
|
} // end if relwork
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1146,7 +1146,7 @@ function PMA_REL_renameField($db, $table, $field, $new_name)
|
|||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses $GLOBALS['cfgRelation']['db']
|
* @uses $GLOBALS['cfgRelation']['db']
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @uses PMA_DBI_insert_id()
|
* @uses PMA_DBI_insert_id()
|
||||||
* @uses $GLOBALS['controllink']
|
* @uses $GLOBALS['controllink']
|
||||||
* @param string $newpage
|
* @param string $newpage
|
||||||
@@ -1162,7 +1162,7 @@ function PMA_REL_create_page($newpage, $cfgRelation, $db, $query_default_option)
|
|||||||
$ins_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
$ins_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
||||||
. ' (db_name, page_descr)'
|
. ' (db_name, page_descr)'
|
||||||
. ' VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($newpage) . '\')';
|
. ' VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($newpage) . '\')';
|
||||||
PMA_query_as_cu($ins_query, FALSE, $query_default_option);
|
PMA_query_as_controluser($ins_query, FALSE, $query_default_option);
|
||||||
return PMA_DBI_insert_id(isset($GLOBALS['controllink']) ? $GLOBALS['controllink'] : '');
|
return PMA_DBI_insert_id(isset($GLOBALS['controllink']) ? $GLOBALS['controllink'] : '');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@@ -21,7 +21,7 @@ require_once './libraries/relation.lib.php';
|
|||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @param string $db
|
* @param string $db
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @param string $column
|
* @param string $column
|
||||||
@@ -35,7 +35,7 @@ function PMA_relationsCleanupColumn($db, $table, $column)
|
|||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
||||||
. ' AND column_name = \'' . PMA_sqlAddslashes($column) . '\'';
|
. ' AND column_name = \'' . PMA_sqlAddslashes($column) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['displaywork']) {
|
if ($cfgRelation['displaywork']) {
|
||||||
@@ -43,7 +43,7 @@ function PMA_relationsCleanupColumn($db, $table, $column)
|
|||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
|
||||||
. ' AND display_field = \'' . PMA_sqlAddslashes($column) . '\'';
|
. ' AND display_field = \'' . PMA_sqlAddslashes($column) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['relwork']) {
|
if ($cfgRelation['relwork']) {
|
||||||
@@ -51,13 +51,13 @@ function PMA_relationsCleanupColumn($db, $table, $column)
|
|||||||
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\''
|
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\''
|
||||||
. ' AND master_field = \'' . PMA_sqlAddslashes($column) . '\'';
|
. ' AND master_field = \'' . PMA_sqlAddslashes($column) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
|
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
||||||
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\''
|
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\''
|
||||||
. ' AND foreign_field = \'' . PMA_sqlAddslashes($column) . '\'';
|
. ' AND foreign_field = \'' . PMA_sqlAddslashes($column) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ function PMA_relationsCleanupColumn($db, $table, $column)
|
|||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @param string $db
|
* @param string $db
|
||||||
* @param string $table
|
* @param string $table
|
||||||
*/
|
*/
|
||||||
@@ -79,40 +79,40 @@ function PMA_relationsCleanupTable($db, $table)
|
|||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['displaywork']) {
|
if ($cfgRelation['displaywork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['pdfwork']) {
|
if ($cfgRelation['pdfwork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['designerwork']) {
|
if ($cfgRelation['designerwork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['designer_coords'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['designer_coords'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['relwork']) {
|
if ($cfgRelation['relwork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
||||||
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\'';
|
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
|
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
||||||
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\'';
|
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ function PMA_relationsCleanupTable($db, $table)
|
|||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @param string $db
|
* @param string $db
|
||||||
*/
|
*/
|
||||||
function PMA_relationsCleanupDatabase($db)
|
function PMA_relationsCleanupDatabase($db)
|
||||||
@@ -132,45 +132,45 @@ function PMA_relationsCleanupDatabase($db)
|
|||||||
if ($cfgRelation['commwork']) {
|
if ($cfgRelation['commwork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['bookmarkwork']) {
|
if ($cfgRelation['bookmarkwork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['bookmark'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['bookmark'])
|
||||||
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['displaywork']) {
|
if ($cfgRelation['displaywork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['pdfwork']) {
|
if ($cfgRelation['pdfwork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
|
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['designerwork']) {
|
if ($cfgRelation['designerwork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['designer_coords'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['designer_coords'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cfgRelation['relwork']) {
|
if ($cfgRelation['relwork']) {
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
||||||
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
|
|
||||||
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
|
||||||
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
PMA_query_as_cu($remove_query);
|
PMA_query_as_controluser($remove_query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -176,7 +176,7 @@ function PMA_getMIME($db, $table, $strict = false)
|
|||||||
* @uses PMA_getRelationsParam()
|
* @uses PMA_getRelationsParam()
|
||||||
* @uses PMA_backquote()
|
* @uses PMA_backquote()
|
||||||
* @uses PMA_sqlAddslashes()
|
* @uses PMA_sqlAddslashes()
|
||||||
* @uses PMA_query_as_cu()
|
* @uses PMA_query_as_controluser()
|
||||||
* @uses PMA_DBI_num_rows()
|
* @uses PMA_DBI_num_rows()
|
||||||
* @uses PMA_DBI_fetch_assoc()
|
* @uses PMA_DBI_fetch_assoc()
|
||||||
* @uses PMA_DBI_free_result()
|
* @uses PMA_DBI_free_result()
|
||||||
@@ -207,7 +207,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
|
|||||||
WHERE `db_name` = \'' . PMA_sqlAddslashes($db) . '\'
|
WHERE `db_name` = \'' . PMA_sqlAddslashes($db) . '\'
|
||||||
AND `table_name` = \'' . PMA_sqlAddslashes($table) . '\'
|
AND `table_name` = \'' . PMA_sqlAddslashes($table) . '\'
|
||||||
AND `column_name` = \'' . PMA_sqlAddslashes($key) . '\'';
|
AND `column_name` = \'' . PMA_sqlAddslashes($key) . '\'';
|
||||||
$test_rs = PMA_query_as_cu($test_qry, true, PMA_DBI_QUERY_STORE);
|
$test_rs = PMA_query_as_controluser($test_qry, true, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
|
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
|
||||||
$row = @PMA_DBI_fetch_assoc($test_rs);
|
$row = @PMA_DBI_fetch_assoc($test_rs);
|
||||||
@@ -242,7 +242,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($upd_query)){
|
if (isset($upd_query)){
|
||||||
return PMA_query_as_cu($upd_query);
|
return PMA_query_as_controluser($upd_query);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -64,12 +64,12 @@ if ($cfgRelation['pdfwork']) {
|
|||||||
$ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
$ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND pdf_page_number = ' . $chpage;
|
. ' AND pdf_page_number = ' . $chpage;
|
||||||
PMA_query_as_cu($ch_query, FALSE, $query_default_option);
|
PMA_query_as_controluser($ch_query, FALSE, $query_default_option);
|
||||||
|
|
||||||
$ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
$ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND page_nr = ' . $chpage;
|
. ' AND page_nr = ' . $chpage;
|
||||||
PMA_query_as_cu($ch_query, FALSE, $query_default_option);
|
PMA_query_as_controluser($ch_query, FALSE, $query_default_option);
|
||||||
|
|
||||||
unset($chpage);
|
unset($chpage);
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ if ($cfgRelation['pdfwork']) {
|
|||||||
. ' WHERE master_db = \'' . $db . '\''
|
. ' WHERE master_db = \'' . $db . '\''
|
||||||
. ' GROUP BY master_table'
|
. ' GROUP BY master_table'
|
||||||
. ' ORDER BY ' . PMA_backquote('COUNT(master_table)') . ' DESC ';
|
. ' ORDER BY ' . PMA_backquote('COUNT(master_table)') . ' DESC ';
|
||||||
$master_tables_rs = PMA_query_as_cu($master_tables, FALSE, $query_default_option);
|
$master_tables_rs = PMA_query_as_controluser($master_tables, FALSE, $query_default_option);
|
||||||
if ($master_tables_rs && PMA_DBI_num_rows($master_tables_rs) > 0) {
|
if ($master_tables_rs && PMA_DBI_num_rows($master_tables_rs) > 0) {
|
||||||
// first put all the master tables at beginning
|
// first put all the master tables at beginning
|
||||||
// of the list, so they are near the center of
|
// of the list, so they are near the center of
|
||||||
@@ -159,7 +159,7 @@ if ($cfgRelation['pdfwork']) {
|
|||||||
$insert_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords']) . ' '
|
$insert_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords']) . ' '
|
||||||
. '(db_name, table_name, pdf_page_number, x, y) '
|
. '(db_name, table_name, pdf_page_number, x, y) '
|
||||||
. 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($current_table) . '\',' . $pdf_page_number . ',' . $pos_x . ',' . $pos_y . ')';
|
. 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($current_table) . '\',' . $pdf_page_number . ',' . $pos_x . ',' . $pos_y . ')';
|
||||||
PMA_query_as_cu($insert_query, FALSE, $query_default_option);
|
PMA_query_as_controluser($insert_query, FALSE, $query_default_option);
|
||||||
|
|
||||||
// compute for the next table
|
// compute for the next table
|
||||||
switch ($direction) {
|
switch ($direction) {
|
||||||
@@ -206,7 +206,7 @@ if ($cfgRelation['pdfwork']) {
|
|||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
|
. ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
|
||||||
. ' AND pdf_page_number = ' . $chpage;
|
. ' AND pdf_page_number = ' . $chpage;
|
||||||
$test_rs = PMA_query_as_cu($test_query, FALSE, $query_default_option);
|
$test_rs = PMA_query_as_controluser($test_query, FALSE, $query_default_option);
|
||||||
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
|
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
|
||||||
if (isset($arrvalue['delete']) && $arrvalue['delete'] == 'y') {
|
if (isset($arrvalue['delete']) && $arrvalue['delete'] == 'y') {
|
||||||
$ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
$ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
||||||
@@ -225,7 +225,7 @@ if ($cfgRelation['pdfwork']) {
|
|||||||
. '(db_name, table_name, pdf_page_number, x, y) '
|
. '(db_name, table_name, pdf_page_number, x, y) '
|
||||||
. 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($arrvalue['name']) . '\',' . $chpage . ',' . $arrvalue['x'] . ',' . $arrvalue['y'] . ')';
|
. 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($arrvalue['name']) . '\',' . $chpage . ',' . $arrvalue['x'] . ',' . $arrvalue['y'] . ')';
|
||||||
}
|
}
|
||||||
PMA_query_as_cu($ch_query, FALSE, $query_default_option);
|
PMA_query_as_controluser($ch_query, FALSE, $query_default_option);
|
||||||
} // end if
|
} // end if
|
||||||
} // end for
|
} // end for
|
||||||
break;
|
break;
|
||||||
@@ -235,7 +235,7 @@ if ($cfgRelation['pdfwork']) {
|
|||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . "\n"
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . "\n"
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($current_row) . '\'' . "\n"
|
. ' AND table_name = \'' . PMA_sqlAddslashes($current_row) . '\'' . "\n"
|
||||||
. ' AND pdf_page_number = ' . $chpage;
|
. ' AND pdf_page_number = ' . $chpage;
|
||||||
PMA_query_as_cu($d_query, FALSE, $query_default_option);
|
PMA_query_as_controluser($d_query, FALSE, $query_default_option);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
@@ -251,7 +251,7 @@ if ($cfgRelation['pdfwork']) {
|
|||||||
// Now first show some possibility to choose a page for the pdf
|
// Now first show some possibility to choose a page for the pdf
|
||||||
$page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
$page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
|
||||||
$page_rs = PMA_query_as_cu($page_query, FALSE, $query_default_option);
|
$page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option);
|
||||||
|
|
||||||
if ($page_rs && PMA_DBI_num_rows($page_rs) > 0) {
|
if ($page_rs && PMA_DBI_num_rows($page_rs) > 0) {
|
||||||
?>
|
?>
|
||||||
@@ -323,7 +323,7 @@ if ($cfgRelation['pdfwork']) {
|
|||||||
$page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
$page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND pdf_page_number = ' . $chpage;
|
. ' AND pdf_page_number = ' . $chpage;
|
||||||
$page_rs = PMA_query_as_cu($page_query, FALSE, $query_default_option);
|
$page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option);
|
||||||
$array_sh_page = array();
|
$array_sh_page = array();
|
||||||
$draginit = '';
|
$draginit = '';
|
||||||
$reset_draginit = '';
|
$reset_draginit = '';
|
||||||
|
@@ -267,7 +267,7 @@ class PMA_PDF extends TCPDF {
|
|||||||
$test_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
$test_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND page_nr = \'' . $pdf_page_number . '\'';
|
. ' AND page_nr = \'' . $pdf_page_number . '\'';
|
||||||
$test_rs = PMA_query_as_cu($test_query);
|
$test_rs = PMA_query_as_controluser($test_query);
|
||||||
$pages = @PMA_DBI_fetch_assoc($test_rs);
|
$pages = @PMA_DBI_fetch_assoc($test_rs);
|
||||||
$this->SetFont('', 'B', 14);
|
$this->SetFont('', 'B', 14);
|
||||||
$this->Cell(0, 6, ucfirst($pages['page_descr']), 'B', 1, 'C');
|
$this->Cell(0, 6, ucfirst($pages['page_descr']), 'B', 1, 'C');
|
||||||
@@ -656,7 +656,7 @@ class PMA_RT_Table {
|
|||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table_name) . '\''
|
. ' AND table_name = \'' . PMA_sqlAddslashes($table_name) . '\''
|
||||||
. ' AND pdf_page_number = ' . $pdf_page_number;
|
. ' AND pdf_page_number = ' . $pdf_page_number;
|
||||||
$result = PMA_query_as_cu($sql, false, PMA_DBI_QUERY_STORE);
|
$result = PMA_query_as_controluser($sql, false, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
if (!$result || !PMA_DBI_num_rows($result)) {
|
if (!$result || !PMA_DBI_num_rows($result)) {
|
||||||
$pdf->PMA_PDF_die(sprintf($GLOBALS['strConfigureTableCoord'], $table_name));
|
$pdf->PMA_PDF_die(sprintf($GLOBALS['strConfigureTableCoord'], $table_name));
|
||||||
@@ -944,7 +944,7 @@ class PMA_RT {
|
|||||||
// Get the name of this pdfpage to use as filename (Mike Beck)
|
// Get the name of this pdfpage to use as filename (Mike Beck)
|
||||||
$_name_sql = 'SELECT page_descr FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
$_name_sql = 'SELECT page_descr FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
|
||||||
. ' WHERE page_nr = ' . $pdf_page_number;
|
. ' WHERE page_nr = ' . $pdf_page_number;
|
||||||
$_name_rs = PMA_query_as_cu($_name_sql);
|
$_name_rs = PMA_query_as_controluser($_name_sql);
|
||||||
if ($_name_rs) {
|
if ($_name_rs) {
|
||||||
$_name_row = PMA_DBI_fetch_row($_name_rs);
|
$_name_row = PMA_DBI_fetch_row($_name_rs);
|
||||||
$filename = $_name_row[0] . '.pdf';
|
$filename = $_name_row[0] . '.pdf';
|
||||||
@@ -998,7 +998,7 @@ class PMA_RT {
|
|||||||
$tab_sql = 'SELECT table_name FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
$tab_sql = 'SELECT table_name FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
|
||||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND pdf_page_number = ' . $which_rel;
|
. ' AND pdf_page_number = ' . $which_rel;
|
||||||
$tab_rs = PMA_query_as_cu($tab_sql, null, PMA_DBI_QUERY_STORE);
|
$tab_rs = PMA_query_as_controluser($tab_sql, null, PMA_DBI_QUERY_STORE);
|
||||||
if (!$tab_rs || !PMA_DBI_num_rows($tab_rs) > 0) {
|
if (!$tab_rs || !PMA_DBI_num_rows($tab_rs) > 0) {
|
||||||
$pdf->PMA_PDF_die($GLOBALS['strPdfNoTables']);
|
$pdf->PMA_PDF_die($GLOBALS['strPdfNoTables']);
|
||||||
// die('No tables');
|
// die('No tables');
|
||||||
@@ -1058,7 +1058,7 @@ class PMA_RT {
|
|||||||
// . ' AND foreign_db = \'' . PMA_sqlAddslashes($db) . '\' '
|
// . ' AND foreign_db = \'' . PMA_sqlAddslashes($db) . '\' '
|
||||||
// . ' AND master_table IN (' . $intable . ')'
|
// . ' AND master_table IN (' . $intable . ')'
|
||||||
// . ' AND foreign_table IN (' . $intable . ')';
|
// . ' AND foreign_table IN (' . $intable . ')';
|
||||||
// $result = PMA_query_as_cu($sql);
|
// $result = PMA_query_as_controluser($sql);
|
||||||
|
|
||||||
// lem9:
|
// lem9:
|
||||||
// previous logic was checking master tables and foreign tables
|
// previous logic was checking master tables and foreign tables
|
||||||
|
@@ -40,7 +40,7 @@ if ($cfgRelation['displaywork']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($upd_query)) {
|
if (isset($upd_query)) {
|
||||||
$upd_rs = PMA_query_as_cu($upd_query);
|
$upd_rs = PMA_query_as_controluser($upd_query);
|
||||||
}
|
}
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
|
@@ -28,11 +28,11 @@ if (isset($scale) && ! isset($createpage)) {
|
|||||||
|
|
||||||
$sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number . ", ROUND(x/" . $scale . ") , ROUND(y/" . $scale . ") y FROM " . $pmd_table . " WHERE db_name = '" . $db . "'";
|
$sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number . ", ROUND(x/" . $scale . ") , ROUND(y/" . $scale . ") y FROM " . $pmd_table . " WHERE db_name = '" . $db . "'";
|
||||||
|
|
||||||
PMA_query_as_cu($sql,TRUE,PMA_DBI_QUERY_STORE);
|
PMA_query_as_controluser($sql,TRUE,PMA_DBI_QUERY_STORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($imp)) {
|
if (isset($imp)) {
|
||||||
PMA_query_as_cu(
|
PMA_query_as_controluser(
|
||||||
'UPDATE ' . $pma_table . ',' . $pmd_table .
|
'UPDATE ' . $pma_table . ',' . $pmd_table .
|
||||||
' SET ' . $pmd_table . '.`x`= ' . $pma_table . '.`x` * '. $scale . ',
|
' SET ' . $pmd_table . '.`x`= ' . $pma_table . '.`x` * '. $scale . ',
|
||||||
' . $pmd_table . '.`y`= ' . $pma_table . '.`y` * '.$scale.'
|
' . $pmd_table . '.`y`= ' . $pma_table . '.`y` * '.$scale.'
|
||||||
@@ -78,7 +78,7 @@ require_once './libraries/header_meta_style.inc.php';
|
|||||||
|
|
||||||
<select name="pdf_page_number">
|
<select name="pdf_page_number">
|
||||||
<?php
|
<?php
|
||||||
$table_info_result = PMA_query_as_cu('SELECT * FROM '.PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages']).'
|
$table_info_result = PMA_query_as_controluser('SELECT * FROM '.PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages']).'
|
||||||
WHERE db_name = \''.$db.'\'');
|
WHERE db_name = \''.$db.'\'');
|
||||||
while($page = PMA_DBI_fetch_assoc($table_info_result))
|
while($page = PMA_DBI_fetch_assoc($table_info_result))
|
||||||
{
|
{
|
||||||
|
@@ -82,7 +82,7 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) &&
|
|||||||
. '\'' . PMA_sqlAddslashes($T1) . '\','
|
. '\'' . PMA_sqlAddslashes($T1) . '\','
|
||||||
. '\'' . PMA_sqlAddslashes($F1) . '\')';
|
. '\'' . PMA_sqlAddslashes($F1) . '\')';
|
||||||
|
|
||||||
if (PMA_query_as_cu($q , false, PMA_DBI_QUERY_STORE)) {
|
if (PMA_query_as_controluser($q , false, PMA_DBI_QUERY_STORE)) {
|
||||||
PMD_return_new(1, 'strInternalRelationAdded');
|
PMD_return_new(1, 'strInternalRelationAdded');
|
||||||
} else {
|
} else {
|
||||||
PMD_return_new(0, 'strErrorRelationAdded');
|
PMD_return_new(0, 'strErrorRelationAdded');
|
||||||
|
@@ -35,7 +35,7 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) &&
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// internal relations
|
// internal relations
|
||||||
PMA_query_as_cu('DELETE FROM '
|
PMA_query_as_controluser('DELETE FROM '
|
||||||
. PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
|
. PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
|
||||||
. $cfg['Server']['relation'].' WHERE '
|
. $cfg['Server']['relation'].' WHERE '
|
||||||
. 'master_db = \'' . PMA_sqlAddslashes($DB2) . '\''
|
. 'master_db = \'' . PMA_sqlAddslashes($DB2) . '\''
|
||||||
|
@@ -21,11 +21,11 @@ if (! $cfgRelation['designerwork']) {
|
|||||||
foreach ($t_x as $key => $value) {
|
foreach ($t_x as $key => $value) {
|
||||||
$KEY = empty($IS_AJAX) ? urldecode($key) : $key; // table name decode (post PDF exp/imp)
|
$KEY = empty($IS_AJAX) ? urldecode($key) : $key; // table name decode (post PDF exp/imp)
|
||||||
list($DB,$TAB) = explode(".", $KEY);
|
list($DB,$TAB) = explode(".", $KEY);
|
||||||
PMA_query_as_cu('DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
|
PMA_query_as_controluser('DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
|
||||||
WHERE `db_name` = \'' . PMA_sqlAddslashes($DB) . '\'
|
WHERE `db_name` = \'' . PMA_sqlAddslashes($DB) . '\'
|
||||||
AND `table_name` = \'' . PMA_sqlAddslashes($TAB) . '\'', true, PMA_DBI_QUERY_STORE);
|
AND `table_name` = \'' . PMA_sqlAddslashes($TAB) . '\'', true, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
PMA_query_as_cu('INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
|
PMA_query_as_controluser('INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
|
||||||
(db_name, table_name, x, y, v, h)
|
(db_name, table_name, x, y, v, h)
|
||||||
VALUES ('
|
VALUES ('
|
||||||
. '\'' . PMA_sqlAddslashes($DB) . '\', '
|
. '\'' . PMA_sqlAddslashes($DB) . '\', '
|
||||||
|
@@ -137,7 +137,7 @@ if (isset($destination) && $cfgRelation['relwork']) {
|
|||||||
. ' AND master_field = \'' . PMA_sqlAddslashes($master_field) . '\'';
|
. ' AND master_field = \'' . PMA_sqlAddslashes($master_field) . '\'';
|
||||||
} // end if... else....
|
} // end if... else....
|
||||||
if ($upd_query) {
|
if ($upd_query) {
|
||||||
PMA_query_as_cu($upd_query);
|
PMA_query_as_controluser($upd_query);
|
||||||
}
|
}
|
||||||
} // end while
|
} // end while
|
||||||
} // end if (updates for internal relations)
|
} // end if (updates for internal relations)
|
||||||
@@ -289,7 +289,7 @@ if ($cfgRelation['displaywork'] && isset($display_field)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($upd_query) {
|
if ($upd_query) {
|
||||||
PMA_query_as_cu($upd_query);
|
PMA_query_as_controluser($upd_query);
|
||||||
}
|
}
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user