Permalink
Browse files

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

…eryAsControlUser)
  • Loading branch information...
madhuracj committed Jun 23, 2012
1 parent f5ed603 commit ec046f7d119a6fa62dada62be25add8e37b5be41
View
@@ -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
@@ -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) {
@@ -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
@@ -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 {
@@ -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
@@ -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
@@ -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'] : ''
);
Oops, something went wrong.

0 comments on commit ec046f7

Please sign in to comment.