clarify function name

This commit is contained in:
Marc Delisle
2009-06-24 11:34:56 +00:00
parent ac427c1ff4
commit e67f4cbc54
14 changed files with 89 additions and 89 deletions

View File

@@ -592,7 +592,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?>
SELECT *
FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages']) . '
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) { ?>
<!-- PDF schema -->

View File

@@ -547,7 +547,7 @@ class PMA_Table
// must use PMA_DBI_QUERY_STORE here, since we execute another
// 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);
while ($table_copy_row = @PMA_DBI_fetch_assoc($table_copy_rs)) {
@@ -567,7 +567,7 @@ class PMA_Table
(\'' . implode('\', \'', $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();
} // end while
@@ -787,7 +787,7 @@ class PMA_Table
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
unset($remove_query);
}
@@ -800,7 +800,7 @@ class PMA_Table
. ' table_name = \'' . PMA_sqlAddslashes($target_table) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
}
@@ -810,7 +810,7 @@ class PMA_Table
. ' foreign_db = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND foreign_table = \'' . PMA_sqlAddslashes($source_table) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
$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) . '\''
. ' WHERE master_db = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND master_table = \'' . PMA_sqlAddslashes($source_table) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
}
@@ -835,21 +835,21 @@ class PMA_Table
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
/*
$pdf_query = 'SELECT pdf_page_number '
. ' FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' 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)) {
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['pdf_pages'])
. ' SET db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' 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($tb_rs);
}
@@ -862,7 +862,7 @@ class PMA_Table
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
}
@@ -880,7 +880,7 @@ class PMA_Table
WHERE
db_name = \'' . PMA_sqlAddslashes($source_db) . '\' AND
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]
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_options']) . '\'' : '')
. ')';
PMA_query_as_cu($new_comment_query);
PMA_query_as_controluser($new_comment_query);
} // end while
PMA_DBI_free_result($comments_copy_rs);
unset($comments_copy_rs);
@@ -1040,7 +1040,7 @@ class PMA_Table
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
unset($remove_query);
}
@@ -1052,7 +1052,7 @@ class PMA_Table
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
}
@@ -1064,7 +1064,7 @@ class PMA_Table
`foreign_table` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `foreign_db` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `foreign_table` = \'' . PMA_sqlAddslashes($old_name) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
$table_query = '
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
@@ -1073,7 +1073,7 @@ class PMA_Table
`master_table` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `master_db` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `master_table` = \'' . PMA_sqlAddslashes($old_name) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
}
@@ -1085,7 +1085,7 @@ class PMA_Table
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
}
@@ -1097,7 +1097,7 @@ class PMA_Table
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
unset($table_query);
}

View File

@@ -119,7 +119,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
$sql_query = $import_run_buffer['sql'];
} elseif ($run_query) {
if ($controluser) {
$result = PMA_query_as_cu($import_run_buffer['sql']);
$result = PMA_query_as_controluser($import_run_buffer['sql']);
} else {
$result = PMA_DBI_try_query($import_run_buffer['sql']);
}

View File

@@ -27,7 +27,7 @@ require_once './libraries/Table.class.php';
*
* @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) {
$result = PMA_DBI_query($sql, $GLOBALS['controllink'], $options);
@@ -40,7 +40,7 @@ function PMA_query_as_cu($sql, $show_error = true, $options = 0)
} else {
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
@@ -198,7 +198,7 @@ function PMA_printDiagMessageForParameter($parameter, $relation_parameter_set, $
* @uses PMA_DBI_QUERY_STORE
* @uses PMA_DBI_select_db()
* @uses PMA_backquote()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @uses PMA_DBI_fetch_row()
* @uses PMA_DBI_free_result()
* @access protected
@@ -239,7 +239,7 @@ function PMA__getRelationsParam()
// fear it might be too slow
$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) {
// query failed ... ?
@@ -284,7 +284,7 @@ function PMA__getRelationsParam()
$mime_query = 'SHOW FIELDS FROM '
. PMA_backquote($cfgRelation['db']) . '.'
. 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_transformation = false;
@@ -542,7 +542,7 @@ function PMA_getComments($db, $table = '')
* @uses PMA_getRelationsParam()
* @uses PMA_backquote()
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @uses strlen()
* @param string the name of the db to check for
* @return string comment
@@ -560,7 +560,7 @@ function PMA_getDbComment($db)
WHERE db_name = '" . PMA_sqlAddslashes($db) . "'
AND table_name = ''
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) {
$row = PMA_DBI_fetch_assoc($com_rs);
@@ -585,7 +585,7 @@ function PMA_getDbComment($db)
* @uses PMA_getRelationsParam()
* @uses PMA_backquote()
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @uses strlen()
* @param string the name of the db to check for
* @return string comment
@@ -601,7 +601,7 @@ function PMA_getDbComments()
SELECT `db_name`, `comment`
FROM " . PMA_backquote($cfgRelation['db']) . "." . PMA_backquote($cfgRelation['column_info']) . "
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) {
while ($row = PMA_DBI_fetch_assoc($com_rs)) {
@@ -620,7 +620,7 @@ function PMA_getDbComments()
* @uses PMA_getRelationsParam()
* @uses PMA_backquote()
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @uses strlen()
* @access public
* @param string $db the name of the db
@@ -657,7 +657,7 @@ function PMA_setDbComment($db, $comment = '')
}
if (isset($upd_query)){
return PMA_query_as_cu($upd_query);
return PMA_query_as_controluser($upd_query);
}
return false;
@@ -669,7 +669,7 @@ function PMA_setDbComment($db, $comment = '')
* @uses $_SESSION['sql_history']
* @uses $cfg['QueryHistoryMax']
* @uses PMA_getRelationsParam()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @uses PMA_backquote()
* @uses PMA_sqlAddslashes()
* @uses count()
@@ -714,7 +714,7 @@ function PMA_setHistory($db, $table, $username, $sqlquery)
return;
}
PMA_query_as_cu('
PMA_query_as_controluser('
INSERT INTO
' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['history']) . '
(`username`,
@@ -778,7 +778,7 @@ function PMA_getHistory($username)
* @uses $GLOBALS['controllink']
* @uses PMA_backquote()
* @uses PMA_sqlAddSlashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @uses PMA_DBI_fetch_value()
* @param string $username the username
* @access public
@@ -802,7 +802,7 @@ function PMA_purgeHistory($username)
LIMIT ' . $GLOBALS['cfg']['QueryHistoryMax'] . ', 1';
if ($max_time = PMA_DBI_fetch_value($search_query, 0, 0, $GLOBALS['controllink'])) {
PMA_query_as_cu('
PMA_query_as_controluser('
DELETE FROM
' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['history']) . '
WHERE `username` = \'' . PMA_sqlAddSlashes($username) . '\'
@@ -1103,7 +1103,7 @@ function PMA_getRelatives($from)
* @uses PMA_getRelationsParam()
* @uses PMA_backquote()
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @param string $db
* @param string $table
* @param string $field
@@ -1119,7 +1119,7 @@ function PMA_REL_renameField($db, $table, $field, $new_name)
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
. ' AND display_field = \'' . PMA_sqlAddslashes($field) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
}
if ($cfgRelation['relwork']) {
@@ -1128,14 +1128,14 @@ function PMA_REL_renameField($db, $table, $field, $new_name)
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\''
. ' 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'])
. ' SET foreign_field = \'' . PMA_sqlAddslashes($new_name) . '\''
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\''
. ' AND foreign_field = \'' . PMA_sqlAddslashes($field) . '\'';
PMA_query_as_cu($table_query);
PMA_query_as_controluser($table_query);
} // end if relwork
}
@@ -1146,7 +1146,7 @@ function PMA_REL_renameField($db, $table, $field, $new_name)
* @uses PMA_backquote()
* @uses $GLOBALS['cfgRelation']['db']
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @uses PMA_DBI_insert_id()
* @uses $GLOBALS['controllink']
* @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'])
. ' (db_name, page_descr)'
. ' 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'] : '');
}
?>

View File

@@ -21,7 +21,7 @@ require_once './libraries/relation.lib.php';
* @uses PMA_getRelationsParam()
* @uses PMA_backquote()
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @param string $db
* @param string $table
* @param string $column
@@ -35,7 +35,7 @@ function PMA_relationsCleanupColumn($db, $table, $column)
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
. ' AND column_name = \'' . PMA_sqlAddslashes($column) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['displaywork']) {
@@ -43,7 +43,7 @@ function PMA_relationsCleanupColumn($db, $table, $column)
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\''
. ' AND display_field = \'' . PMA_sqlAddslashes($column) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['relwork']) {
@@ -51,13 +51,13 @@ function PMA_relationsCleanupColumn($db, $table, $column)
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND master_table = \'' . PMA_sqlAddslashes($table) . '\''
. ' 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'])
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND foreign_table = \'' . PMA_sqlAddslashes($table) . '\''
. ' 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_backquote()
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @param string $db
* @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'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['displaywork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['pdfwork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['designerwork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['designer_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['relwork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
. ' WHERE master_db = \'' . PMA_sqlAddslashes($db) . '\''
. ' 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'])
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\''
. ' 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_backquote()
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @param string $db
*/
function PMA_relationsCleanupDatabase($db)
@@ -132,45 +132,45 @@ function PMA_relationsCleanupDatabase($db)
if ($cfgRelation['commwork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['bookmarkwork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['bookmark'])
. ' WHERE dbase = \'' . PMA_sqlAddslashes($db) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['displaywork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['pdfwork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
. ' 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'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['designerwork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['designer_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
if ($cfgRelation['relwork']) {
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
. ' 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'])
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($db) . '\'';
PMA_query_as_cu($remove_query);
PMA_query_as_controluser($remove_query);
}
}

View File

@@ -176,7 +176,7 @@ function PMA_getMIME($db, $table, $strict = false)
* @uses PMA_getRelationsParam()
* @uses PMA_backquote()
* @uses PMA_sqlAddslashes()
* @uses PMA_query_as_cu()
* @uses PMA_query_as_controluser()
* @uses PMA_DBI_num_rows()
* @uses PMA_DBI_fetch_assoc()
* @uses PMA_DBI_free_result()
@@ -207,7 +207,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
WHERE `db_name` = \'' . PMA_sqlAddslashes($db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($table) . '\'
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) {
$row = @PMA_DBI_fetch_assoc($test_rs);
@@ -242,7 +242,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
}
if (isset($upd_query)){
return PMA_query_as_cu($upd_query);
return PMA_query_as_controluser($upd_query);
} else {
return false;
}

View File

@@ -64,12 +64,12 @@ if ($cfgRelation['pdfwork']) {
$ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' 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'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' 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);
}
@@ -111,7 +111,7 @@ if ($cfgRelation['pdfwork']) {
. ' WHERE master_db = \'' . $db . '\''
. ' GROUP BY master_table'
. ' 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) {
// first put all the master tables at beginning
// 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']) . ' '
. '(db_name, table_name, pdf_page_number, x, 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
switch ($direction) {
@@ -206,7 +206,7 @@ if ($cfgRelation['pdfwork']) {
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
. ' 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 (isset($arrvalue['delete']) && $arrvalue['delete'] == 'y') {
$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) '
. '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 for
break;
@@ -235,7 +235,7 @@ if ($cfgRelation['pdfwork']) {
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . "\n"
. ' AND table_name = \'' . PMA_sqlAddslashes($current_row) . '\'' . "\n"
. ' 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;
} // end switch
@@ -251,7 +251,7 @@ if ($cfgRelation['pdfwork']) {
// 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'])
. ' 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) {
?>
@@ -323,7 +323,7 @@ if ($cfgRelation['pdfwork']) {
$page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' 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();
$draginit = '';
$reset_draginit = '';

View File

@@ -267,7 +267,7 @@ class PMA_PDF extends TCPDF {
$test_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' 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);
$this->SetFont('', 'B', 14);
$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) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table_name) . '\''
. ' 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)) {
$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)
$_name_sql = 'SELECT page_descr FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
. ' 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) {
$_name_row = PMA_DBI_fetch_row($_name_rs);
$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'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' 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) {
$pdf->PMA_PDF_die($GLOBALS['strPdfNoTables']);
// die('No tables');
@@ -1058,7 +1058,7 @@ class PMA_RT {
// . ' AND foreign_db = \'' . PMA_sqlAddslashes($db) . '\' '
// . ' AND master_table IN (' . $intable . ')'
// . ' AND foreign_table IN (' . $intable . ')';
// $result = PMA_query_as_cu($sql);
// $result = PMA_query_as_controluser($sql);
// lem9:
// previous logic was checking master tables and foreign tables

View File

@@ -40,7 +40,7 @@ if ($cfgRelation['displaywork']) {
}
if (isset($upd_query)) {
$upd_rs = PMA_query_as_cu($upd_query);
$upd_rs = PMA_query_as_controluser($upd_query);
}
} // end if

View File

@@ -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 . "'";
PMA_query_as_cu($sql,TRUE,PMA_DBI_QUERY_STORE);
PMA_query_as_controluser($sql,TRUE,PMA_DBI_QUERY_STORE);
}
if (isset($imp)) {
PMA_query_as_cu(
PMA_query_as_controluser(
'UPDATE ' . $pma_table . ',' . $pmd_table .
' SET ' . $pmd_table . '.`x`= ' . $pma_table . '.`x` * '. $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">
<?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.'\'');
while($page = PMA_DBI_fetch_assoc($table_info_result))
{

View File

@@ -82,7 +82,7 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) &&
. '\'' . PMA_sqlAddslashes($T1) . '\','
. '\'' . 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');
} else {
PMD_return_new(0, 'strErrorRelationAdded');

View File

@@ -35,7 +35,7 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) &&
}
} else {
// internal relations
PMA_query_as_cu('DELETE FROM '
PMA_query_as_controluser('DELETE FROM '
. PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. $cfg['Server']['relation'].' WHERE '
. 'master_db = \'' . PMA_sqlAddslashes($DB2) . '\''

View File

@@ -21,11 +21,11 @@ if (! $cfgRelation['designerwork']) {
foreach ($t_x as $key => $value) {
$KEY = empty($IS_AJAX) ? urldecode($key) : $key; // table name decode (post PDF exp/imp)
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) . '\'
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)
VALUES ('
. '\'' . PMA_sqlAddslashes($DB) . '\', '

View File

@@ -137,7 +137,7 @@ if (isset($destination) && $cfgRelation['relwork']) {
. ' AND master_field = \'' . PMA_sqlAddslashes($master_field) . '\'';
} // end if... else....
if ($upd_query) {
PMA_query_as_cu($upd_query);
PMA_query_as_controluser($upd_query);
}
} // end while
} // end if (updates for internal relations)
@@ -289,7 +289,7 @@ if ($cfgRelation['displaywork'] && isset($display_field)) {
}
if ($upd_query) {
PMA_query_as_cu($upd_query);
PMA_query_as_controluser($upd_query);
}
} // end if