Skip to content
Browse files

Use camel case for function names (PMA_query_as_controluser => PMA_qu…

…eryAsControlUser)
  • Loading branch information...
1 parent f5ed603 commit ec046f7d119a6fa62dada62be25add8e37b5be41 @madhuracj madhuracj committed
View
2 db_operations.php
@@ -627,7 +627,7 @@
SELECT *
FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages']) . '
WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\'';
- $test_rs = PMA_query_as_controluser($test_query, null, PMA_DBI_QUERY_STORE);
+ $test_rs = PMA_queryAsControlUser($test_query, null, PMA_DBI_QUERY_STORE);
/*
* Export Relational Schema View
View
4 db_tracking.php
@@ -66,7 +66,7 @@
' GROUP BY table_name' .
' ORDER BY table_name ASC';
-$all_tables_result = PMA_query_as_controluser($all_tables_query);
+$all_tables_result = PMA_queryAsControlUser($all_tables_query);
// If a HEAD version exists
if (PMA_DBI_num_rows($all_tables_result) > 0) {
@@ -112,7 +112,7 @@
. '\' AND `table_name` = \'' . PMA_sqlAddSlashes($table_name)
. '\' AND `version` = \'' . $version_number . '\'';
- $table_result = PMA_query_as_controluser($table_query);
+ $table_result = PMA_queryAsControlUser($table_query);
$version_data = PMA_DBI_fetch_array($table_result);
if ($version_data['tracking_active'] == 1) {
View
2 libraries/RecentTable.class.php
@@ -83,7 +83,7 @@ public function getFromDb()
= " SELECT `tables` FROM " . $this->pma_table .
" WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'";
- $row = PMA_DBI_fetch_array(PMA_query_as_controluser($sql_query));
+ $row = PMA_DBI_fetch_array(PMA_queryAsControlUser($sql_query));
if (isset($row[0])) {
return json_decode($row[0], true);
} else {
View
10 libraries/Table.class.php
@@ -695,7 +695,7 @@ static public function duplicateInfo($work, $pma_table, $get_fields,
// must use PMA_DBI_QUERY_STORE here, since we execute another
// query inside the loop
- $table_copy_rs = PMA_query_as_controluser(
+ $table_copy_rs = PMA_queryAsControlUser(
$table_copy_query, true, PMA_DBI_QUERY_STORE
);
@@ -716,7 +716,7 @@ static public function duplicateInfo($work, $pma_table, $get_fields,
(\'' . implode('\', \'', $value_parts) . '\',
\'' . implode('\', \'', $new_value_parts) . '\')';
- PMA_query_as_controluser($new_table_query);
+ PMA_queryAsControlUser($new_table_query);
$last_id = PMA_DBI_insert_id();
} // end while
@@ -995,7 +995,7 @@ static public function moveCopy($source_db, $source_table, $target_db,
WHERE
db_name = \'' . PMA_sqlAddSlashes($source_db) . '\' AND
table_name = \'' . PMA_sqlAddSlashes($source_table) . '\'';
- $comments_copy_rs = PMA_query_as_controluser($comments_copy_query);
+ $comments_copy_rs = PMA_queryAsControlUser($comments_copy_query);
// Write every comment as new copied entry. [MIME]
while ($comments_copy_row = PMA_DBI_fetch_assoc($comments_copy_rs)) {
@@ -1010,7 +1010,7 @@ static public function moveCopy($source_db, $source_table, $target_db,
. '\'' . PMA_sqlAddSlashes($comments_copy_row['transformation']) . '\','
. '\'' . PMA_sqlAddSlashes($comments_copy_row['transformation_options']) . '\'' : '')
. ')';
- PMA_query_as_controluser($new_comment_query);
+ PMA_queryAsControlUser($new_comment_query);
} // end while
PMA_DBI_free_result($comments_copy_rs);
unset($comments_copy_rs);
@@ -1372,7 +1372,7 @@ protected function getUiPrefsFromDb()
. " AND `db_name` = '" . PMA_sqlAddSlashes($this->db_name) . "'"
. " AND `table_name` = '" . PMA_sqlAddSlashes($this->name) . "'";
- $row = PMA_DBI_fetch_array(PMA_query_as_controluser($sql_query));
+ $row = PMA_DBI_fetch_array(PMA_queryAsControlUser($sql_query));
if (isset($row[0])) {
return json_decode($row[0], true);
} else {
View
18 libraries/Tracker.class.php
@@ -213,7 +213,7 @@ static public function isTracked($dbname, $tablename)
" AND table_name = '" . PMA_sqlAddSlashes($tablename) . "' " .
" ORDER BY version DESC";
- $row = PMA_DBI_fetch_array(PMA_query_as_controluser($sql_query));
+ $row = PMA_DBI_fetch_array(PMA_queryAsControlUser($sql_query));
if (isset($row['tracking_active']) && $row['tracking_active'] == 1) {
return true;
@@ -322,7 +322,7 @@ static public function createVersion($dbname, $tablename, $version,
'" . PMA_sqlAddSlashes("\n") . "',
'" . PMA_sqlAddSlashes(self::_transformTrackingSet($tracking_set)) . "' )";
- $result = PMA_query_as_controluser($sql_query);
+ $result = PMA_queryAsControlUser($sql_query);
if ($result) {
// Deactivate previous version
@@ -349,7 +349,7 @@ static public function deleteTracking($dbname, $tablename)
. "DELETE FROM " . self::$pma_table
. " WHERE `db_name` = '" . PMA_sqlAddSlashes($dbname) . "'"
. " AND `table_name` = '" . PMA_sqlAddSlashes($tablename) . "'";
- $result = PMA_query_as_controluser($sql_query);
+ $result = PMA_queryAsControlUser($sql_query);
return $result;
}
@@ -411,7 +411,7 @@ static public function createDatabaseVersion($dbname, $version, $query,
'" . PMA_sqlAddSlashes("\n") . "',
'" . PMA_sqlAddSlashes(self::_transformTrackingSet($tracking_set)) . "' )";
- $result = PMA_query_as_controluser($sql_query);
+ $result = PMA_queryAsControlUser($sql_query);
return $result;
}
@@ -439,7 +439,7 @@ static private function _changeTracking($dbname, $tablename,
" AND `table_name` = '" . PMA_sqlAddSlashes($tablename) . "' " .
" AND `version` = '" . PMA_sqlAddSlashes($version) . "' ";
- $result = PMA_query_as_controluser($sql_query);
+ $result = PMA_queryAsControlUser($sql_query);
return $result;
}
@@ -485,7 +485,7 @@ static public function changeTrackingData($dbname, $tablename,
" AND `table_name` = '" . PMA_sqlAddSlashes($tablename) . "' " .
" AND `version` = '" . PMA_sqlAddSlashes($version) . "' ";
- $result = PMA_query_as_controluser($sql_query);
+ $result = PMA_queryAsControlUser($sql_query);
return $result;
}
@@ -547,7 +547,7 @@ static public function getVersion($dbname, $tablename, $statement = null)
? ' AND tracking & ' . self::_transformTrackingSet($statement) . ' <> 0'
: " AND FIND_IN_SET('" . $statement . "',tracking) > 0" ;
}
- $row = PMA_DBI_fetch_array(PMA_query_as_controluser($sql_query));
+ $row = PMA_DBI_fetch_array(PMA_queryAsControlUser($sql_query));
return isset($row[0])
? $row[0]
: -1;
@@ -579,7 +579,7 @@ static public function getTrackedData($dbname, $tablename, $version)
$sql_query .= " AND `version` = '" . PMA_sqlAddSlashes($version) ."' ".
" ORDER BY `version` DESC LIMIT 1";
- $mixed = PMA_DBI_fetch_assoc(PMA_query_as_controluser($sql_query));
+ $mixed = PMA_DBI_fetch_assoc(PMA_queryAsControlUser($sql_query));
// Parse log
$log_schema_entries = explode('# log ', $mixed['schema_sql']);
@@ -1001,7 +1001,7 @@ static public function handleQuery($query)
" AND `table_name` = '" . PMA_sqlAddSlashes($result['tablename']) . "' " .
" AND `version` = '" . PMA_sqlAddSlashes($version) . "' ";
- $result = PMA_query_as_controluser($sql_query);
+ $result = PMA_queryAsControlUser($sql_query);
}
}
}
View
2 libraries/import.lib.php
@@ -135,7 +135,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
);
} elseif ($run_query) {
if ($controluser) {
- $result = PMA_query_as_controluser(
+ $result = PMA_queryAsControlUser(
$import_run_buffer['sql']
);
} else {
View
26 libraries/relation.lib.php
@@ -21,7 +21,7 @@
* @access public
*
*/
-function PMA_query_as_controluser($sql, $show_error = true, $options = 0)
+function PMA_queryAsControlUser($sql, $show_error = true, $options = 0)
{
// Avoid caching of the number of rows affected; for example, this function
// is called for tracking purposes but we want to display the correct number
@@ -50,7 +50,7 @@ function PMA_query_as_controluser($sql, $show_error = true, $options = 0)
} else {
return false;
}
-} // end of the "PMA_query_as_controluser()" function
+} // end of the "PMA_queryAsControlUser()" function
/**
* Returns current relation parameters
@@ -382,7 +382,7 @@ function PMA__getRelationsParam()
$tab_query = 'SHOW TABLES FROM '
. PMA_backquote($GLOBALS['cfg']['Server']['pmadb']);
- $tab_rs = PMA_query_as_controluser($tab_query, false, PMA_DBI_QUERY_STORE);
+ $tab_rs = PMA_queryAsControlUser($tab_query, false, PMA_DBI_QUERY_STORE);
if (! $tab_rs) {
// query failed ... ?
@@ -686,7 +686,7 @@ function PMA_getDbComment($db)
WHERE db_name = '" . PMA_sqlAddSlashes($db) . "'
AND table_name = ''
AND column_name = '(db_comment)'";
- $com_rs = PMA_query_as_controluser($com_qry, true, PMA_DBI_QUERY_STORE);
+ $com_rs = PMA_queryAsControlUser($com_qry, true, PMA_DBI_QUERY_STORE);
if ($com_rs && PMA_DBI_num_rows($com_rs) > 0) {
$row = PMA_DBI_fetch_assoc($com_rs);
@@ -716,7 +716,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_controluser($com_qry, true, PMA_DBI_QUERY_STORE);
+ $com_rs = PMA_queryAsControlUser($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)) {
@@ -769,7 +769,7 @@ function PMA_setDbComment($db, $comment = '')
}
if (isset($upd_query)) {
- return PMA_query_as_controluser($upd_query);
+ return PMA_queryAsControlUser($upd_query);
}
return false;
@@ -820,7 +820,7 @@ function PMA_setHistory($db, $table, $username, $sqlquery)
return;
}
- PMA_query_as_controluser(
+ PMA_queryAsControlUser(
'INSERT INTO
' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['history']) . '
(`username`,
@@ -896,7 +896,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_controluser(
+ PMA_queryAsControlUser(
'DELETE FROM
' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['history']) . '
WHERE `username` = \'' . PMA_sqlAddSlashes($username) . '\'
@@ -1209,7 +1209,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_controluser($table_query);
+ PMA_queryAsControlUser($table_query);
}
if ($cfgRelation['relwork']) {
@@ -1220,7 +1220,7 @@ 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_controluser($table_query);
+ PMA_queryAsControlUser($table_query);
$table_query = 'UPDATE '
. PMA_backquote($cfgRelation['db']) . '.'
@@ -1229,7 +1229,7 @@ function PMA_REL_renameField($db, $table, $field, $new_name)
. ' WHERE foreign_db = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND foreign_table = \'' . PMA_sqlAddSlashes($table) . '\''
. ' AND foreign_field = \'' . PMA_sqlAddSlashes($field) . '\'';
- PMA_query_as_controluser($table_query);
+ PMA_queryAsControlUser($table_query);
} // end if relwork
}
@@ -1261,7 +1261,7 @@ function PMA_REL_renameSingleTable($table,
. $db_field . ' = \'' . PMA_sqlAddSlashes($source_db) . '\''
. ' AND '
. $table_field . ' = \'' . PMA_sqlAddSlashes($source_table) . '\'';
- PMA_query_as_controluser($query);
+ PMA_queryAsControlUser($query);
}
@@ -1364,7 +1364,7 @@ function PMA_REL_createPage($newpage, $cfgRelation, $db)
. ' VALUES (\''
. PMA_sqlAddSlashes($db) . '\', \''
. PMA_sqlAddSlashes($newpage) . '\')';
- PMA_query_as_controluser($ins_query, false);
+ PMA_queryAsControlUser($ins_query, false);
return PMA_DBI_insert_id(
isset($GLOBALS['controllink']) ? $GLOBALS['controllink'] : ''
);
View
36 libraries/relation_cleanup.lib.php
@@ -25,7 +25,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_controluser($remove_query);
+ PMA_queryAsControlUser($remove_query);
}
if ($cfgRelation['displaywork']) {
@@ -33,7 +33,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_controluser($remove_query);
+ PMA_queryAsControlUser($remove_query);
}
if ($cfgRelation['relwork']) {
@@ -41,13 +41,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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($remove_query);
}
}
@@ -65,40 +65,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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($remove_query);
}
}
@@ -114,45 +114,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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($remove_query);
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\'';
- PMA_query_as_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($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_controluser($remove_query);
+ PMA_queryAsControlUser($remove_query);
$remove_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['relation'])
. ' WHERE foreign_db = \'' . PMA_sqlAddSlashes($db) . '\'';
- PMA_query_as_controluser($remove_query);
+ PMA_queryAsControlUser($remove_query);
}
}
View
2 libraries/schema/Dia_Relation_Schema.class.php
@@ -259,7 +259,7 @@ function __construct($tableName, $pageNumber, $showKeys = false)
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($tableName) . '\''
. ' AND pdf_page_number = ' . $pageNumber;
- $result = PMA_query_as_controluser($sql, false, PMA_DBI_QUERY_STORE);
+ $result = PMA_queryAsControlUser($sql, false, PMA_DBI_QUERY_STORE);
if (! $result || ! PMA_DBI_num_rows($result)) {
$dia->dieSchema(
$pageNumber,
View
2 libraries/schema/Eps_Relation_Schema.class.php
@@ -464,7 +464,7 @@ function __construct(
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($tableName) . '\''
. ' AND pdf_page_number = ' . $pageNumber;
- $result = PMA_query_as_controluser($sql, false, PMA_DBI_QUERY_STORE);
+ $result = PMA_queryAsControlUser($sql, false, PMA_DBI_QUERY_STORE);
if (! $result || ! PMA_DBI_num_rows($result)) {
$eps->dieSchema(
View
2 libraries/schema/Export_Relation_Schema.class.php
@@ -198,7 +198,7 @@ public function getAllTables($db, $pageNumber)
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND pdf_page_number = ' . $pageNumber;
- $tab_rs = PMA_query_as_controluser($tab_sql, null, PMA_DBI_QUERY_STORE);
+ $tab_rs = PMA_queryAsControlUser($tab_sql, null, PMA_DBI_QUERY_STORE);
if (!$tab_rs || !PMA_DBI_num_rows($tab_rs) > 0) {
$this->dieSchema('', __('This page does not contain any tables!'));
}
View
6 libraries/schema/Pdf_Relation_Schema.class.php
@@ -214,7 +214,7 @@ function Header()
. PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND page_nr = \'' . $pdf_page_number . '\'';
- $test_rs = PMA_query_as_controluser($test_query);
+ $test_rs = PMA_queryAsControlUser($test_query);
$pages = @PMA_DBI_fetch_assoc($test_rs);
$this->SetFont($this->_ff, 'B', 14);
$this->Cell(0, 6, ucfirst($pages['page_descr']), 'B', 1, 'C');
@@ -443,7 +443,7 @@ function __construct($tableName, $fontSize, $pageNumber, &$sameWideWidth,
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($tableName) . '\''
. ' AND pdf_page_number = ' . $pageNumber;
- $result = PMA_query_as_controluser($sql, false, PMA_DBI_QUERY_STORE);
+ $result = PMA_queryAsControlUser($sql, false, PMA_DBI_QUERY_STORE);
if (! $result || ! PMA_DBI_num_rows($result)) {
$pdf->Error(
sprintf(
@@ -1144,7 +1144,7 @@ private function _showOutput($pageNumber)
. PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE page_nr = ' . $pageNumber;
- $_name_rs = PMA_query_as_controluser($_name_sql);
+ $_name_rs = PMA_queryAsControlUser($_name_sql);
if ($_name_rs) {
$_name_row = PMA_DBI_fetch_row($_name_rs);
$filename = $_name_row[0] . '.pdf';
View
2 libraries/schema/Svg_Relation_Schema.class.php
@@ -432,7 +432,7 @@ function __construct(
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($tableName) . '\''
. ' AND pdf_page_number = ' . $pageNumber;
- $result = PMA_query_as_controluser($sql, false, PMA_DBI_QUERY_STORE);
+ $result = PMA_queryAsControlUser($sql, false, PMA_DBI_QUERY_STORE);
if (!$result || !PMA_DBI_num_rows($result)) {
$svg->dieSchema(
View
18 libraries/schema/User_Schema.class.php
@@ -167,7 +167,7 @@ public function selectPage()
. PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\'';
- $page_rs = PMA_query_as_controluser($page_query, false, PMA_DBI_QUERY_STORE);
+ $page_rs = PMA_queryAsControlUser($page_query, false, PMA_DBI_QUERY_STORE);
if ($page_rs && PMA_DBI_num_rows($page_rs) > 0) {
?>
<form method="get" action="schema_edit.php" name="frm_select_page">
@@ -251,7 +251,7 @@ public function showTableDashBoard()
. '.' . PMA_backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND pdf_page_number = \'' . PMA_sqlAddSlashes($this->chosenPage) . '\'';
- $page_rs = PMA_query_as_controluser($page_query, false);
+ $page_rs = PMA_queryAsControlUser($page_query, false);
$array_sh_page = array();
while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
$array_sh_page[] = $temp_sh_page;
@@ -587,7 +587,7 @@ private function _deleteTableRows($delrow,$cfgRelation,$db,$chpage)
. ' AND table_name = \'' . PMA_sqlAddSlashes($current_row) . '\'' . "\n"
. ' AND pdf_page_number = \'' . PMA_sqlAddSlashes($chpage) . '\'';
echo $del_query;
- PMA_query_as_controluser($del_query, false);
+ PMA_queryAsControlUser($del_query, false);
}
}
@@ -635,7 +635,7 @@ public function deleteCoordinates($db, $cfgRelation, $choosePage)
. PMA_backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND pdf_page_number = \'' . PMA_sqlAddSlashes($choosePage) . '\'';
- PMA_query_as_controluser($query, false);
+ PMA_queryAsControlUser($query, false);
}
/**
@@ -654,7 +654,7 @@ public function deletePages($db, $cfgRelation, $choosePage)
. PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND page_nr = \'' . PMA_sqlAddSlashes($choosePage) . '\'';
- PMA_query_as_controluser($query, false);
+ PMA_queryAsControlUser($query, false);
}
/**
@@ -715,7 +715,7 @@ public function processRelations($db, $pageNumber, $cfgRelation)
. ' WHERE master_db = \'' . PMA_sqlAddSlashes($db) . '\''
. ' GROUP BY master_table'
. ' ORDER BY COUNT(master_table) DESC';
- $master_tables_rs = PMA_query_as_controluser(
+ $master_tables_rs = PMA_queryAsControlUser(
$master_tables, false, PMA_DBI_QUERY_STORE
);
if ($master_tables_rs && PMA_DBI_num_rows($master_tables_rs) > 0) {
@@ -796,7 +796,7 @@ public function addRelationCoordinates($all_tables, $pageNumber, $db, $cfgRelati
. 'VALUES (\'' . PMA_sqlAddSlashes($db) . '\', \''
. PMA_sqlAddSlashes($current_table) . '\',' . $pageNumber
. ',' . $pos_x . ',' . $pos_y . ')';
- PMA_query_as_controluser($insert_query, false);
+ PMA_queryAsControlUser($insert_query, false);
/*
* compute for the next table
@@ -854,7 +854,7 @@ private function _editCoordinates($db, $cfgRelation)
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($arrvalue['name']) . '\''
. ' AND pdf_page_number = \'' . PMA_sqlAddSlashes($this->chosenPage) . '\'';
- $test_rs = PMA_query_as_controluser($test_query, false, PMA_DBI_QUERY_STORE);
+ $test_rs = PMA_queryAsControlUser($test_query, false, PMA_DBI_QUERY_STORE);
//echo $test_query;
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
if (isset($arrvalue['delete']) && $arrvalue['delete'] == 'y') {
@@ -882,7 +882,7 @@ private function _editCoordinates($db, $cfgRelation)
. $arrvalue['x'] . ',' . $arrvalue['y'] . ')';
}
//echo $ch_query;
- PMA_query_as_controluser($ch_query, false);
+ PMA_queryAsControlUser($ch_query, false);
} // end if
} // end for
}
View
2 libraries/schema/Visio_Relation_Schema.class.php
@@ -263,7 +263,7 @@ function __construct($tableName, $pageNumber, &$same_wide_width, $showKeys = fal
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($tableName) . '\''
. ' AND pdf_page_number = ' . $pageNumber;
- $result = PMA_query_as_controluser($sql, false, PMA_DBI_QUERY_STORE);
+ $result = PMA_queryAsControlUser($sql, false, PMA_DBI_QUERY_STORE);
if (!$result || !PMA_DBI_num_rows($result)) {
$visio->dieSchema(
View
4 libraries/transformations.lib.php
@@ -227,7 +227,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_controluser($test_qry, true, PMA_DBI_QUERY_STORE);
+ $test_rs = PMA_queryAsControlUser($test_qry, true, PMA_DBI_QUERY_STORE);
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
$row = @PMA_DBI_fetch_assoc($test_rs);
@@ -263,7 +263,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
}
if (isset($upd_query)) {
- return PMA_query_as_controluser($upd_query);
+ return PMA_queryAsControlUser($upd_query);
} else {
return false;
}
View
2 pmd_display_field.php
@@ -41,7 +41,7 @@
}
if (isset($upd_query)) {
- $upd_rs = PMA_query_as_controluser($upd_query);
+ $upd_rs = PMA_queryAsControlUser($upd_query);
}
} // end if
View
6 pmd_pdf.php
@@ -57,11 +57,11 @@
if ('export' == $mode) {
$sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number_q . ", ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y FROM " . $pmd_table . " WHERE db_name = '" . PMA_sqlAddSlashes($db) . "'";
- PMA_query_as_controluser($sql, true, PMA_DBI_QUERY_STORE);
+ PMA_queryAsControlUser($sql, true, PMA_DBI_QUERY_STORE);
}
if ('import' == $mode) {
- PMA_query_as_controluser(
+ PMA_queryAsControlUser(
'UPDATE ' . $pma_table . ',' . $pmd_table .
' SET ' . $pmd_table . '.`x`= ' . $pma_table . '.`x` * '. $scale_q . ',
' . $pmd_table . '.`y`= ' . $pma_table . '.`y` * '. $scale_q .'
@@ -98,7 +98,7 @@
$choices = array();
-$table_info_result = PMA_query_as_controluser(
+$table_info_result = PMA_queryAsControlUser(
'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db'])
. '.' . PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
View
2 pmd_relation_new.php
@@ -93,7 +93,7 @@
. '\'' . PMA_sqlAddSlashes($T1) . '\','
. '\'' . PMA_sqlAddSlashes($F1) . '\')';
- if (PMA_query_as_controluser($q, false, PMA_DBI_QUERY_STORE)) {
+ if (PMA_queryAsControlUser($q, false, PMA_DBI_QUERY_STORE)) {
PMD_return_new(1, __('Internal relation added'));
} else {
PMD_return_new(0, __('Error: Relation not added.'));
View
2 pmd_relation_upd.php
@@ -46,7 +46,7 @@
}
if ($try_to_delete_internal_relation) {
// internal relations
- PMA_query_as_controluser(
+ PMA_queryAsControlUser(
'DELETE FROM '
. PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. $cfg['Server']['relation'].' WHERE '
View
4 pmd_save_pos.php
@@ -39,14 +39,14 @@
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_controluser(
+ PMA_queryAsControlUser(
'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_controluser(
+ PMA_queryAsControlUser(
'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords'])
. ' (db_name, table_name, x, y, v, h)'
. ' VALUES ('
View
4 tbl_relation.php
@@ -175,7 +175,7 @@ function PMA_backquote_split($text)
. ' AND master_field = \'' . PMA_sqlAddSlashes($master_field) . '\'';
} // end if... else....
if ($upd_query) {
- PMA_query_as_controluser($upd_query);
+ PMA_queryAsControlUser($upd_query);
}
} // end while
} // end if (updates for internal relations)
@@ -321,7 +321,7 @@ function PMA_backquote_split($text)
}
if ($upd_query) {
- PMA_query_as_controluser($upd_query);
+ PMA_queryAsControlUser($upd_query);
}
} // end if
View
4 tbl_tracking.php
@@ -655,7 +655,7 @@ function PMA_filter_tracking($data, $filter_ts_from, $filter_ts_to, $filter_user
" WHERE db_name = '" . PMA_sqlAddSlashes($GLOBALS['db']) . "' " .
" ORDER BY db_name, table_name";
-$sql_result = PMA_query_as_controluser($sql_query);
+$sql_result = PMA_queryAsControlUser($sql_query);
if (PMA_DBI_num_rows($sql_result) > 0) {
?>
@@ -696,7 +696,7 @@ function PMA_filter_tracking($data, $filter_ts_from, $filter_ts_to, $filter_user
" AND table_name = '" . PMA_sqlAddSlashes($_REQUEST['table']) ."' ".
" ORDER BY version DESC ";
-$sql_result = PMA_query_as_controluser($sql_query);
+$sql_result = PMA_queryAsControlUser($sql_query);
$last_version = 0;
$maxversion = PMA_DBI_fetch_array($sql_result);

0 comments on commit ec046f7

Please sign in to comment.
Something went wrong with that request. Please try again.