Merge remote branch 'phpmyadmin/master'

Conflicts:
	tbl_select.php
This commit is contained in:
Ammar Yasir 2011-07-01 15:34:39 +05:30
commit 2a4c47c0a2
318 changed files with 109059 additions and 68582 deletions

View File

@ -22,10 +22,16 @@ phpMyAdmin - ChangeLog
- Patch #3316969 PMA_ajaxShowMessage() does not respect timeout
+ AJAX for Change on multiple rows in table Browse
+ [interface] Improved support for stored routines
+ [display] More options for browsing GIS data
+ [interface] Support for spatial indexes
+ [display] GIS data visualization
+ AJAX for table structure multiple-columns change
3.4.4.0 (not yet released)
- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
- bug #3323101 [parser] Invalid escape sequence in SQL parser
3.4.3.0 (not yet released)
3.4.3.0 (2011-06-27)
- bug #3311170 [sync] Missing helper icons in Synchronize
- patch #3304473 [setup] Redefine a lable that was wrong
- bug #3304544 [parser] master is not a reserved word

View File

@ -1,7 +1,9 @@
<?php
/**
* Events management.
*
* @package phpMyAdmin
*/
require_once './libraries/common.inc.php';
require_once './libraries/common.lib.php';

View File

@ -3,10 +3,6 @@
/**
* dumps a database
*
* @uses libraries/db_common.inc.php
* @uses libraries/db_info.inc.php
* @uses libraries/display_export.lib.php
* @uses $tables from libraries/db_info.inc.php
* @package phpMyAdmin
*/

View File

@ -47,7 +47,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
// lower_case_table_names=1 `DB` becomes `db`
$lower_case_table_names = PMA_DBI_fetch_value('SHOW VARIABLES LIKE "lower_case_table_names"', 0, 1);
if ($lower_case_table_names === '1') {
$newname = strtolower($newname);
$newname = PMA_strtolower($newname);
}
$local_query = 'CREATE DATABASE ' . PMA_backquote($newname);
@ -69,37 +69,36 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
$GLOBALS['pma']->databases->build();
}
if (PMA_MYSQL_INT_VERSION >= 50000) {
// here I don't use DELIMITER because it's not part of the
// language; I have to send each statement one by one
// here I don't use DELIMITER because it's not part of the
// language; I have to send each statement one by one
// to avoid selecting alternatively the current and new db
// we would need to modify the CREATE definitions to qualify
// the db name
$procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
if ($procedure_names) {
foreach($procedure_names as $procedure_name) {
PMA_DBI_select_db($db);
$tmp_query = PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name);
// collect for later display
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
PMA_DBI_select_db($newname);
PMA_DBI_query($tmp_query);
}
}
$function_names = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
if ($function_names) {
foreach($function_names as $function_name) {
PMA_DBI_select_db($db);
$tmp_query = PMA_DBI_get_definition($db, 'FUNCTION', $function_name);
// collect for later display
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
PMA_DBI_select_db($newname);
PMA_DBI_query($tmp_query);
}
// to avoid selecting alternatively the current and new db
// we would need to modify the CREATE definitions to qualify
// the db name
$procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
if ($procedure_names) {
foreach($procedure_names as $procedure_name) {
PMA_DBI_select_db($db);
$tmp_query = PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name);
// collect for later display
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
PMA_DBI_select_db($newname);
PMA_DBI_query($tmp_query);
}
}
$function_names = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
if ($function_names) {
foreach($function_names as $function_name) {
PMA_DBI_select_db($db);
$tmp_query = PMA_DBI_get_definition($db, 'FUNCTION', $function_name);
// collect for later display
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
PMA_DBI_select_db($newname);
PMA_DBI_query($tmp_query);
}
}
// go back to current db, just in case
PMA_DBI_select_db($db);
@ -233,7 +232,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
// to avoid selecting alternatively the current and new db
// we would need to modify the CREATE definitions to qualify
// the db name
$event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddslashes($db,true) . '\';');
$event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db,true) . '\';');
if ($event_names) {
foreach($event_names as $event_name) {
PMA_DBI_select_db($db);
@ -244,9 +243,10 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
PMA_DBI_query($tmp_query);
}
}
}
// go back to current db, just in case
PMA_DBI_select_db($db);
}
// go back to current db, just in case
PMA_DBI_select_db($db);
// Duplicate the bookmarks for this db (done once for each db)
if (! $_error && $db != $newname) {
@ -586,7 +586,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?>
$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) . '\'';
$test_rs = PMA_query_as_controluser($test_query, null, PMA_DBI_QUERY_STORE);
/*

View File

@ -53,7 +53,7 @@ if ($cfg['SkipLockedTables'] == true) {
if ($result != false && PMA_DBI_num_rows($result) > 0) {
while ($tmp = PMA_DBI_fetch_row($result)) {
if (! isset($sot_cache[$tmp[0]])) {
$sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\';');
$sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddSlashes($tmp[0], true) . '\';');
$sts_tmp = PMA_DBI_fetch_assoc($sts_result);
$tables[] = $sts_tmp;
} else { // table in use

View File

@ -1,6 +1,8 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Routines management.
*
* @package phpMyAdmin
*/
@ -97,7 +99,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
if (is_array($value)) { // is SET type
$value = implode(',', $value);
}
$value = PMA_sqladdslashes($value);
$value = PMA_sqlAddSlashes($value);
if (! empty($_REQUEST['funcs'][$routine['param_name'][$i]])
&& in_array($_REQUEST['funcs'][$routine['param_name'][$i]], $cfg['Functions'])) {
$queries[] = "SET @p$i={$_REQUEST['funcs'][$routine['param_name'][$i]]}('$value');\n";
@ -152,7 +154,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
$message = __('Your SQL query has been executed successfully');
if ($routine['type'] == 'PROCEDURE') {
$message .= '<br />';
$message .= sprintf(__('%s row(s) affected by the last statement inside the procedure'), $affected);
$message .= sprintf(_ngettext('%d row affected by the last statement inside the procedure', '%d rows affected by the last statement inside the procedure', $affected), $affected);
}
$message = PMA_message::success($message);
// Pass the SQL queries through the "pretty printer"
@ -187,7 +189,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
}
} else {
$output = '';
$message = PMA_message::error(sprintf(__('Query "%s" failed'), $query) . '<br /><br />'
$message = PMA_message::error(sprintf(__('The following query has failed: "%s"'), $query) . '<br /><br />'
. __('MySQL said: ') . PMA_DBI_getError(null));
}
// Print/send output
@ -206,7 +208,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
}
} else {
$message = __('Error in processing request') . ' : '
. sprintf(__('No routine with name %s found in database %s'),
. sprintf(__('No routine with name %1$s found in database %2$s'),
htmlspecialchars(PMA_backquote($_REQUEST['routine_name'])),
htmlspecialchars(PMA_backquote($db)));
$message = PMA_message::error($message);
@ -237,7 +239,12 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
// exit;
}
} else if (($GLOBALS['is_ajax_request'] == true)) {
PMA_ajaxResponse(PMA_message::error(), false);
$message = __('Error in processing request') . ' : '
. sprintf(__('No routine with name %1$s found in database %2$s'),
htmlspecialchars(PMA_backquote($_REQUEST['routine_name'])),
htmlspecialchars(PMA_backquote($db)));
$message = PMA_message::error($message);
PMA_ajaxResponse($message, false);
}
} else if (! empty($_GET['exportroutine']) && ! empty($_GET['routine_name'])) {
/**
@ -246,8 +253,8 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
$routine_name = htmlspecialchars(PMA_backquote($_GET['routine_name']));
$routine_type = PMA_DBI_fetch_value("SELECT ROUTINE_TYPE "
. "FROM INFORMATION_SCHEMA.ROUTINES "
. "WHERE ROUTINE_SCHEMA='" . PMA_sqlAddslashes($db) . "' "
. "AND SPECIFIC_NAME='" . PMA_sqlAddslashes($_GET['routine_name']) . "';");
. "WHERE ROUTINE_SCHEMA='" . PMA_sqlAddSlashes($db) . "' "
. "AND SPECIFIC_NAME='" . PMA_sqlAddSlashes($_GET['routine_name']) . "';");
if (! empty($routine_type) && $create_proc = PMA_DBI_get_definition($db, $routine_type, $_GET['routine_name'])) {
$create_proc = '<textarea cols="40" rows="15" style="width: 100%;">' . htmlspecialchars($create_proc) . '</textarea>';
if ($GLOBALS['is_ajax_request']) {
@ -261,7 +268,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
}
} else {
$response = __('Error in processing request') . ' : '
. sprintf(__('No routine with name %s found in database %s'),
. sprintf(__('No routine with name %1$s found in database %2$s'),
$routine_name, htmlspecialchars(PMA_backquote($db)));
$response = PMA_message::error($response);
if ($GLOBALS['is_ajax_request']) {
@ -287,12 +294,12 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
$drop_routine = "DROP {$_REQUEST['routine_original_type']} " . PMA_backquote($_REQUEST['routine_original_name']) . ";\n";
$result = PMA_DBI_try_query($drop_routine);
if (! $result) {
$routine_errors[] = sprintf(__('Query "%s" failed'), $drop_routine) . '<br />'
$routine_errors[] = sprintf(__('The following query has failed: "%s"'), $drop_routine) . '<br />'
. __('MySQL said: ') . PMA_DBI_getError(null);
} else {
$result = PMA_DBI_try_query($routine_query);
if (! $result) {
$routine_errors[] = sprintf(__('Query "%s" failed'), $routine_query) . '<br />'
$routine_errors[] = sprintf(__('The following query has failed: "%s"'), $routine_query) . '<br />'
. __('MySQL said: ') . PMA_DBI_getError(null);
// We dropped the old routine, but were unable to create the new one
// Try to restore the backup query
@ -316,7 +323,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
// 'Add a new routine' mode
$result = PMA_DBI_try_query($routine_query);
if (! $result) {
$routine_errors[] = sprintf(__('Query "%s" failed'), $routine_query) . '<br /><br />'
$routine_errors[] = sprintf(__('The following query has failed: "%s"'), $routine_query) . '<br /><br />'
. __('MySQL said: ') . PMA_DBI_getError(null);
} else {
$message = PMA_Message::success(__('Routine %1$s has been created.'));
@ -340,7 +347,7 @@ if (! empty($_REQUEST['execute_routine']) && ! empty($_REQUEST['routine_name']))
$extra_data = array();
if ($message->isSuccess()) {
$columns = "`SPECIFIC_NAME`, `ROUTINE_NAME`, `ROUTINE_TYPE`, `DTD_IDENTIFIER`, `ROUTINE_DEFINITION`";
$where = "ROUTINE_SCHEMA='" . PMA_sqlAddslashes($db) . "' AND ROUTINE_NAME='" . PMA_sqlAddslashes($_REQUEST['routine_name']) . "'";
$where = "ROUTINE_SCHEMA='" . PMA_sqlAddSlashes($db) . "' AND ROUTINE_NAME='" . PMA_sqlAddSlashes($_REQUEST['routine_name']) . "'";
$routine = PMA_DBI_fetch_single_row("SELECT $columns FROM `INFORMATION_SCHEMA`.`ROUTINES` WHERE $where;");
$extra_data['name'] = htmlspecialchars(strtoupper($_REQUEST['routine_name']));
$extra_data['new_row'] = PMA_RTN_getRowForRoutinesList($routine, 0, true);
@ -400,7 +407,7 @@ if (count($routine_errors) || ( empty($_REQUEST['routine_process_addroutine']) &
// exit;
} else {
$message = __('Error in processing request') . ' : '
. sprintf(__('No routine with name %s found in database %s'),
. sprintf(__('No routine with name %1$s found in database %2$s'),
htmlspecialchars(PMA_backquote($_REQUEST['routine_name'])),
htmlspecialchars(PMA_backquote($db)));
$message = PMA_message::error($message);

View File

@ -5,30 +5,6 @@
*
* @todo make use of UNION when searching multiple tables
* @todo display executed query, optional?
* @uses $cfg['UseDbSearch']
* @uses $GLOBALS['db']
* @uses PMA_DBI_get_tables()
* @uses PMA_sqlAddslashes()
* @uses PMA_getSearchSqls()
* @uses PMA_DBI_fetch_value()
* @uses PMA_linkOrButton()
* @uses PMA_generate_common_url()
* @uses PMA_generate_common_hidden_inputs()
* @uses PMA_showMySQLDocu()
* @uses $_REQUEST['search_str']
* @uses $_REQUEST['submit_search']
* @uses $_REQUEST['search_option']
* @uses $_REQUEST['table_select']
* @uses $_REQUEST['unselectall']
* @uses $_REQUEST['selectall']
* @uses $_REQUEST['field_str']
* @uses is_string()
* @uses htmlspecialchars()
* @uses array_key_exists()
* @uses is_array()
* @uses array_intersect()
* @uses sprintf()
* @uses in_array()
* @package phpMyAdmin
*/
@ -85,11 +61,11 @@ if (empty($_REQUEST['search_str']) || ! is_string($_REQUEST['search_str'])) {
$searched = htmlspecialchars($_REQUEST['search_str']);
// For "as regular expression" (search option 4), we should not treat
// this as an expression that contains a LIKE (second parameter of
// PMA_sqlAddslashes()).
// PMA_sqlAddSlashes()).
//
// Usage example: If user is seaching for a literal $ in a regexp search,
// he should enter \$ as the value.
$search_str = PMA_sqlAddslashes($_REQUEST['search_str'], ($search_option == 4 ? false : true));
$search_str = PMA_sqlAddSlashes($_REQUEST['search_str'], ($search_option == 4 ? false : true));
}
$tables_selected = array();
@ -108,7 +84,7 @@ if (isset($_REQUEST['selectall'])) {
if (empty($_REQUEST['field_str']) || ! is_string($_REQUEST['field_str'])) {
unset($field_str);
} else {
$field_str = PMA_sqlAddslashes($_REQUEST['field_str'], true);
$field_str = PMA_sqlAddSlashes($_REQUEST['field_str'], true);
}
/**
@ -130,7 +106,6 @@ if (isset($_REQUEST['submit_search'])) {
* Builds the SQL search query
*
* @todo can we make use of fulltextsearch IN BOOLEAN MODE for this?
* @uses PMA_DBI_query
* PMA_backquote
* PMA_DBI_free_result
* PMA_DBI_fetch_assoc
@ -297,7 +272,7 @@ else {
<legend><?php echo __('Search in database'); ?></legend>
<table class="formlayout">
<tr><td><?php echo __('Word(s) or value(s) to search for (wildcard: "%"):'); ?></td>
<tr><td><?php echo __('Words or values to search for (wildcard: "%"):'); ?></td>
<td><input type="text" name="search_str" size="60"
value="<?php echo $searched; ?>" /></td>
</tr>
@ -320,7 +295,7 @@ unset($choices);
</td>
</tr>
<tr><td align="right" valign="top">
<?php echo __('Inside table(s):'); ?></td>
<?php echo __('Inside tables:'); ?></td>
<td rowspan="2">
<?php
echo ' <select name="table_select[]" size="6" multiple="multiple">' . "\n";

View File

@ -67,7 +67,7 @@ require_once './libraries/db_links.inc.php';
$all_tables_query = ' SELECT table_name, MAX(version) as version FROM ' .
PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
PMA_backquote($GLOBALS['cfg']['Server']['tracking']) .
' WHERE ' . PMA_backquote('db_name') . ' = \'' . PMA_sqlAddslashes($_REQUEST['db']) . '\' ' .
' WHERE ' . PMA_backquote('db_name') . ' = \'' . PMA_sqlAddSlashes($_REQUEST['db']) . '\' ' .
' GROUP BY '. PMA_backquote('table_name') .
' ORDER BY '. PMA_backquote('table_name') .' ASC';
@ -110,7 +110,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) {
$table_query = ' SELECT * FROM ' .
PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
PMA_backquote($GLOBALS['cfg']['Server']['tracking']) .
' WHERE `db_name` = \'' . PMA_sqlAddslashes($_REQUEST['db']) . '\' AND `table_name` = \'' . PMA_sqlAddslashes($table_name) . '\' AND `version` = \'' . $version_number . '\'';
' WHERE `db_name` = \'' . PMA_sqlAddSlashes($_REQUEST['db']) . '\' AND `table_name` = \'' . PMA_sqlAddSlashes($table_name) . '\' AND `version` = \'' . $version_number . '\'';
$table_result = PMA_query_as_controluser($table_query);
$version_data = PMA_DBI_fetch_array($table_result);

View File

@ -53,11 +53,11 @@ require_once './libraries/header_meta_style.inc.php';
?>
</div>
<p>
<a href="enum_editor.php?token=<?php echo urlencode($_GET['token']); ?>&field=<?php echo urlencode($_GET['field']); ?>&extra_fields=<?php echo $_GET['extra_fields'] + 1; ?>&values=<?php echo urlencode(join(",", $values)); ?>">
<a href="enum_editor.php<?php echo PMA_generate_common_url(array('field' => $_GET['field'], 'extra_fields' => $_GET['extra_fields'] + 1, 'values' => join(',', $values))); ?>">
<?php echo __('+ Restart insertion and add a new value'); ?>
</a>
</p>
<input type="hidden" name="token" value="<?php echo htmlspecialchars($_GET['token']); ?>" />
<?php echo PMA_generate_common_hidden_inputs(); ?>
<input type="hidden" name="field" value="<?php echo htmlspecialchars($_GET['field']); ?>" />
<input type="hidden" name="num_fields" value="<?php echo $total_fields; ?>" />
<input type="submit" value="<?php echo __('Go'); ?>" />

View File

@ -3,7 +3,6 @@
/**
* Core script for import, this is just the glue around all other stuff
*
* @uses PMA_Bookmark_getList()
* @package phpMyAdmin
*/
@ -108,7 +107,7 @@ if ($import_type == 'table') {
}
$err_url = $goto
. '?' . $common
. (preg_match('@^tbl_[a-z]*\.php$@', $goto) ? '&amp;table=' . urlencode($table) : '');
. (preg_match('@^tbl_[a-z]*\.php$@', $goto) ? '&amp;table=' . htmlspecialchars($table) : '');
$_SESSION['Import_message']['go_back_url'] = $err_url;
}
@ -154,7 +153,7 @@ if (!empty($id_bookmark)) {
case 0: // bookmarked query that have to be run
$import_text = PMA_Bookmark_get($db, $id_bookmark, 'id', isset($action_bookmark_all));
if (isset($bookmark_variable) && !empty($bookmark_variable)) {
$import_text = preg_replace('|/\*(.*)\[VARIABLE\](.*)\*/|imsU', '${1}' . PMA_sqlAddslashes($bookmark_variable) . '${2}', $import_text);
$import_text = preg_replace('|/\*(.*)\[VARIABLE\](.*)\*/|imsU', '${1}' . PMA_sqlAddSlashes($bookmark_variable) . '${2}', $import_text);
}
// refresh left frame on changes in table or db structure

View File

@ -3,26 +3,7 @@
/**
* forms frameset
*
* @uses $GLOBALS['cfg']['QueryHistoryDB']
* @uses $GLOBALS['cfg']['Server']['user']
* @uses $GLOBALS['cfg']['DefaultTabServer'] as src for the mainframe
* @uses $GLOBALS['cfg']['DefaultTabDatabase'] as src for the mainframe
* @uses $GLOBALS['cfg']['NaviWidth'] for navi frame width
* @uses $GLOBALS['collation_connection'] from $_REQUEST (grab_globals.lib.php)
* or common.inc.php
* @uses $GLOBALS['available_languages'] from common.inc.php (select_lang.lib.php)
* @uses $GLOBALS['db']
* @uses $GLOBALS['lang']
* @uses $GLOBALS['text_dir']
* @uses $_ENV['HTTP_HOST']
* @uses PMA_getRelationsParam()
* @uses PMA_purgeHistory()
* @uses PMA_generate_common_url()
* @uses PMA_VERSION
* @uses session_write_close()
* @uses time()
* @uses PMA_getenv()
* @uses header() to send charset
* @package phpMyAdmin
*/
@ -73,7 +54,7 @@ if (! strlen($GLOBALS['db'])) {
} else {
$_GET['db'] = $GLOBALS['db'];
$_GET['table'] = $GLOBALS['table'];
$main_target = $GLOBALS['cfg']['DefaultTabTable'];
$main_target = isset($GLOBALS['goto']) ? $GLOBALS['goto'] : $GLOBALS['cfg']['DefaultTabTable'];
}
$url_query = PMA_generate_common_url($_GET);

View File

@ -246,7 +246,7 @@ $(document).ready(function() {
if(data.success == true) {
// Routine created successfully
PMA_ajaxRemoveMessage($msg);
PMA_slidingMessage($('#js_query_display'), data.message);
PMA_slidingMessage(data.message);
$ajaxDialog.dialog('close');
// If we are in 'edit' mode, we must remove the reference to the old row.
if (mode == 'edit') {
@ -516,7 +516,7 @@ $(document).ready(function() {
if(data.success == true) {
// Routine executed successfully
PMA_ajaxRemoveMessage($msg);
PMA_slidingMessage($('#js_query_display'), data.message);
PMA_slidingMessage(data.message);
$ajaxDialog.dialog('close');
} else {
PMA_ajaxShowMessage(data.error);
@ -542,7 +542,7 @@ $(document).ready(function() {
$ajaxDialog.find('input[name^=params]').first().focus();
} else {
// Routine executed successfully
PMA_slidingMessage($('#js_query_display'), data.message);
PMA_slidingMessage(data.message);
}
} else {
PMA_ajaxShowMessage(data.error);

View File

@ -1300,7 +1300,7 @@ function PMA_ajaxShowMessage(message, timeout) {
* Removes the message shown for an Ajax operation when it's completed
*/
function PMA_ajaxRemoveMessage($this_msgbox) {
if ($this_msgbox != 'undefined' && $this_msgbox instanceof jQuery) {
if ($this_msgbox != undefined && $this_msgbox instanceof jQuery) {
$this_msgbox
.stop(true, true)
.fadeOut('medium');
@ -1448,7 +1448,7 @@ function PMA_createChart(passedSettings) {
enabled:false
},
xAxis: {
type: 'datetime',
type: 'datetime'
},
yAxis: {
min: 0,
@ -2013,6 +2013,10 @@ $(document).ready(function() {
* Hides certain table structure actions, replacing them with the word "More". They are displayed
* in a dropdown menu when the user hovers over the word "More."
*/
displayMoreTableOpts();
});
function displayMoreTableOpts() {
// Remove the actions from the table cells (they are available by default for JavaScript-disabled browsers)
// if the table is not a view or information_schema (otherwise there is only one action to hide and there's no point)
if($("input[type='hidden'][name='table_type']").val() == "table") {
@ -2022,6 +2026,7 @@ $(document).ready(function() {
$table.find("td[class='unique']").remove();
$table.find("td[class='index']").remove();
$table.find("td[class='fulltext']").remove();
$table.find("td[class='spatial']").remove();
$table.find("th[class='action']").attr("colspan", 3);
// Display the "more" text
@ -2080,8 +2085,7 @@ $(document).ready(function() {
}
});
}
});
}
$(document).ready(initTooltips);
/* Displays tooltips */
@ -2448,55 +2452,78 @@ $(document).ready(function() {
/**
* Creates a message inside an object with a sliding effect
*
* @param msg A string containing the text to display
* @param $obj a jQuery object containing the reference
* to the element where to put the message
* @param msg A string containing the text to display
* This is optional, if no element is
* provided, one will be created below the
* navigation links at the top of the page
*
* @return bool True on success, false on failure
*/
function PMA_slidingMessage($obj, msg) {
if ($obj != 'undefined' && $obj instanceof jQuery) {
if ($obj.has('div').length > 0) {
// If there already is a message inside the
// target object, we must get rid of it
function PMA_slidingMessage(msg, $obj) {
if (msg == undefined || msg.length == 0) {
// Don't show an empty message
return false;
}
if ($obj == undefined || ! $obj instanceof jQuery || $obj.length == 0) {
// If the second argument was not supplied,
// we might have to create a new DOM node.
if ($('#PMA_slidingMessage').length == 0) {
$('#topmenucontainer')
.after('<span id="PMA_slidingMessage" '
+ 'style="display: inline-block;"></span>');
}
$obj = $('#PMA_slidingMessage');
}
if ($obj.has('div').length > 0) {
// If there already is a message inside the
// target object, we must get rid of it
$obj
.find('div')
.first()
.fadeOut(function () {
$obj
.children()
.remove();
$obj
.append('<div style="display: none;">' + msg + '</div>')
.animate({
height: $obj.find('div').first().height()
})
.find('div')
.first()
.fadeOut(function () {
$(this).remove();
$obj.animate({
height: $obj.find('div').first().height()
});
.fadeIn();
});
} else {
// Object does not already have a message
// inside it, so we simply slide it down
var h = $obj
.width('100%')
.html('<div style="display: none;">' + msg + '</div>')
.find('div')
.first()
.height();
$obj
.find('div')
.first()
.css('height', 0)
.show()
.animate({
height: h
}, function() {
// Set the height of the parent
// to the height of the child
$obj
.height(
$obj
.find('div')
.first()
.fadeIn();
});
} else {
// Object does not already have a message
// inside it, so we simply slide it down
$obj
.width('100%')
.html('<div style="display: none;">' + msg + '</div>')
.find('div')
.first()
.slideDown(function() {
// Set the height of the parent
// to the height of the child
$obj
.height(
$obj
.find('div')
.first()
.height()
);
});
}
return true;
} else {
return false;
.height()
);
});
}
return true;
} // end PMA_slidingMessage()
/**
@ -2553,7 +2580,7 @@ $(document).ready(function() {
}
// Show the query that we just executed
PMA_ajaxRemoveMessage($msg);
PMA_slidingMessage($('#js_query_display'), data.sql_query);
PMA_slidingMessage(data.sql_query);
} else {
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
}

View File

@ -41,5 +41,98 @@ function checkIndexName()
return true;
} // end of the 'checkIndexName()' function
onload = checkIndexName;
/**
* Hides/shows the inputs and submits appropriately depending
* on whether the index type chosen is 'SPATIAL' or not.
*/
function checkIndexType()
{
/**
* @var Object Dropdown to select the index type.
*/
$select_index_type = $('#select_index_type');
/**
* @var Object Table header for the size column.
*/
$size_header = $('thead tr th:nth-child(2)');
/**
* @var Object Inputs to specify the columns for the index.
*/
$column_inputs = $('select[name="index[columns][names][]"]');
/**
* @var Object Inputs to specify sizes for columns of the index.
*/
$size_inputs = $('input[name="index[columns][sub_parts][]"]');
/**
* @var Object Span containg the controllers to add more columns
*/
$add_more = $('#addMoreColumns');
if ($select_index_type.val() == 'SPATIAL') {
// Disable and hide the size column
$size_header.hide();
$size_inputs.each(function(){
$(this)
.attr('disabled', true)
.parent('td').hide();
});
// Disable and hide the columns of the index other than the first one
var initial = true;
$column_inputs.each(function() {
$column_input = $(this);
if (! initial) {
$column_input
.attr('disabled', true)
.parent('td').hide();
} else {
initial = false;
}
});
// Hide controllers to add more columns
$add_more.hide();
} else {
// Enable and show the size column
$size_header.show();
$size_inputs.each(function() {
$(this)
.attr('disabled', false)
.parent('td').show();
});
// Enable and show the columns of the index
$column_inputs.each(function() {
$(this)
.attr('disabled', false)
.parent('td').show();
});
// Show controllers to add more columns
$add_more.show();
}
}
/**#@+
* @namespace jQuery
*/
/**
* @description <p>Ajax scripts for table index page</p>
*
* Actions ajaxified here:
* <ul>
* <li>Showing/hiding inputs depending on the index type chosen</li>
* </ul>
*
* @name document.ready
* @memberOf jQuery
*/
$(document).ready(function() {
checkIndexType();
$('#select_index_type').bind('change', checkIndexType);
});
/**#@- */

View File

@ -0,0 +1,5 @@
/*!
* jquery.event.drag - v 2.0.0 * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
* Open Source MIT License - http://threedubmedia.com/code/license
*/
;(function(f){f.fn.drag=function(b,a,d){var e=typeof b=="string"?b:"",k=f.isFunction(b)?b:f.isFunction(a)?a:null;if(e.indexOf("drag")!==0)e="drag"+e;d=(b==k?a:d)||{};return k?this.bind(e,d,k):this.trigger(e)};var i=f.event,h=i.special,c=h.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:false,drop:true,click:false},datakey:"dragdata",livekey:"livedrag",add:function(b){var a=f.data(this,c.datakey),d=b.data||{};a.related+=1;if(!a.live&&b.selector){a.live=true;i.add(this,"draginit."+ c.livekey,c.delegate)}f.each(c.defaults,function(e){if(d[e]!==undefined)a[e]=d[e]})},remove:function(){f.data(this,c.datakey).related-=1},setup:function(){if(!f.data(this,c.datakey)){var b=f.extend({related:0},c.defaults);f.data(this,c.datakey,b);i.add(this,"mousedown",c.init,b);this.attachEvent&&this.attachEvent("ondragstart",c.dontstart)}},teardown:function(){if(!f.data(this,c.datakey).related){f.removeData(this,c.datakey);i.remove(this,"mousedown",c.init);i.remove(this,"draginit",c.delegate);c.textselect(true); this.detachEvent&&this.detachEvent("ondragstart",c.dontstart)}},init:function(b){var a=b.data,d;if(!(a.which>0&&b.which!=a.which))if(!f(b.target).is(a.not))if(!(a.handle&&!f(b.target).closest(a.handle,b.currentTarget).length)){a.propagates=1;a.interactions=[c.interaction(this,a)];a.target=b.target;a.pageX=b.pageX;a.pageY=b.pageY;a.dragging=null;d=c.hijack(b,"draginit",a);if(a.propagates){if((d=c.flatten(d))&&d.length){a.interactions=[];f.each(d,function(){a.interactions.push(c.interaction(this,a))})}a.propagates= a.interactions.length;a.drop!==false&&h.drop&&h.drop.handler(b,a);c.textselect(false);i.add(document,"mousemove mouseup",c.handler,a);return false}}},interaction:function(b,a){return{drag:b,callback:new c.callback,droppable:[],offset:f(b)[a.relative?"position":"offset"]()||{top:0,left:0}}},handler:function(b){var a=b.data;switch(b.type){case !a.dragging&&"mousemove":if(Math.pow(b.pageX-a.pageX,2)+Math.pow(b.pageY-a.pageY,2)<Math.pow(a.distance,2))break;b.target=a.target;c.hijack(b,"dragstart",a); if(a.propagates)a.dragging=true;case "mousemove":if(a.dragging){c.hijack(b,"drag",a);if(a.propagates){a.drop!==false&&h.drop&&h.drop.handler(b,a);break}b.type="mouseup"}case "mouseup":i.remove(document,"mousemove mouseup",c.handler);if(a.dragging){a.drop!==false&&h.drop&&h.drop.handler(b,a);c.hijack(b,"dragend",a)}c.textselect(true);if(a.click===false&&a.dragging){jQuery.event.triggered=true;setTimeout(function(){jQuery.event.triggered=false},20);a.dragging=false}break}},delegate:function(b){var a= [],d,e=f.data(this,"events")||{};f.each(e.live||[],function(k,j){if(j.preType.indexOf("drag")===0)if(d=f(b.target).closest(j.selector,b.currentTarget)[0]){i.add(d,j.origType+"."+c.livekey,j.origHandler,j.data);f.inArray(d,a)<0&&a.push(d)}});if(!a.length)return false;return f(a).bind("dragend."+c.livekey,function(){i.remove(this,"."+c.livekey)})},hijack:function(b,a,d,e,k){if(d){var j={event:b.originalEvent,type:b.type},n=a.indexOf("drop")?"drag":"drop",l,o=e||0,g,m;e=!isNaN(e)?e:d.interactions.length; b.type=a;b.originalEvent=null;d.results=[];do if(g=d.interactions[o])if(!(a!=="dragend"&&g.cancelled)){m=c.properties(b,d,g);g.results=[];f(k||g[n]||d.droppable).each(function(q,p){l=(m.target=p)?i.handle.call(p,b,m):null;if(l===false){if(n=="drag"){g.cancelled=true;d.propagates-=1}if(a=="drop")g[n][q]=null}else if(a=="dropinit")g.droppable.push(c.element(l)||p);if(a=="dragstart")g.proxy=f(c.element(l)||g.drag)[0];g.results.push(l);delete b.result;if(a!=="dropinit")return l});d.results[o]=c.flatten(g.results); if(a=="dropinit")g.droppable=c.flatten(g.droppable);a=="dragstart"&&!g.cancelled&&m.update()}while(++o<e);b.type=j.type;b.originalEvent=j.event;return c.flatten(d.results)}},properties:function(b,a,d){var e=d.callback;e.drag=d.drag;e.proxy=d.proxy||d.drag;e.startX=a.pageX;e.startY=a.pageY;e.deltaX=b.pageX-a.pageX;e.deltaY=b.pageY-a.pageY;e.originalX=d.offset.left;e.originalY=d.offset.top;e.offsetX=b.pageX-(a.pageX-e.originalX);e.offsetY=b.pageY-(a.pageY-e.originalY);e.drop=c.flatten((d.drop||[]).slice()); e.available=c.flatten((d.droppable||[]).slice());return e},element:function(b){if(b&&(b.jquery||b.nodeType==1))return b},flatten:function(b){return f.map(b,function(a){return a&&a.jquery?f.makeArray(a):a&&a.length?c.flatten(a):a})},textselect:function(b){f(document)[b?"unbind":"bind"]("selectstart",c.dontstart).attr("unselectable",b?"off":"on").css("MozUserSelect",b?"":"none")},dontstart:function(){return false},callback:function(){}};c.callback.prototype={update:function(){h.drop&&this.available.length&& f.each(this.available,function(b){h.drop.locate(this,b)})}};h.draginit=h.dragstart=h.dragend=c})(jQuery);

View File

@ -0,0 +1,78 @@
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
*
* Requires: 1.2.2+
*/
(function($) {
var types = ['DOMMouseScroll', 'mousewheel'];
$.event.special.mousewheel = {
setup: function() {
if ( this.addEventListener ) {
for ( var i=types.length; i; ) {
this.addEventListener( types[--i], handler, false );
}
} else {
this.onmousewheel = handler;
}
},
teardown: function() {
if ( this.removeEventListener ) {
for ( var i=types.length; i; ) {
this.removeEventListener( types[--i], handler, false );
}
} else {
this.onmousewheel = null;
}
}
};
$.fn.extend({
mousewheel: function(fn) {
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
},
unmousewheel: function(fn) {
return this.unbind("mousewheel", fn);
}
});
function handler(event) {
var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
event = $.event.fix(orgEvent);
event.type = "mousewheel";
// Old school scrollwheel delta
if ( event.wheelDelta ) { delta = event.wheelDelta/120; }
if ( event.detail ) { delta = -event.detail/3; }
// New school multidimensional scroll (touchpads) deltas
deltaY = delta;
// Gecko
if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
deltaY = 0;
deltaX = -1*delta;
}
// Webkit
if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
// Add event and delta to the front of the arguments
args.unshift(event, delta, deltaX, deltaY);
return $.event.handle.apply(this, args);
}
})(jQuery);

1339
js/jquery/jquery.svg.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -314,6 +314,7 @@
db: window.parent.db,
table: window.parent.table,
token: window.parent.token,
server: window.parent.server,
set_col_order: true,
col_order: this.colOrder.toString(),
table_create_time: this.tableCreateTime

View File

@ -24,7 +24,7 @@ require_once './libraries/js_escape.lib.php';
$js_messages['strClickToSelect'] = __('Click to select');
$js_messages['strClickToUnselect'] = __('Click to unselect');
$js_messages['strNoDropDatabases'] = __('"DROP DATABASE" statements are disabled.');
$js_messages['strNoDropDatabases'] = $cfg['AllowUserDropDatabase'] ? '' : __('"DROP DATABASE" statements are disabled.');
/* For confirmations */
$js_messages['strDoYouReally'] = __('Do you really want to ');

2553
js/openlayers/OpenLayers.js Normal file

File diff suppressed because one or more lines are too long

BIN
js/openlayers/img/blank.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

View File

@ -0,0 +1,10 @@
.olLayerGoogleCopyright {
right: 3px;
bottom: 2px;
left: auto;
}
.olLayerGooglePoweredBy {
left: 2px;
bottom: 2px;
}

View File

@ -0,0 +1,7 @@
.olControlZoomPanel div {
background-image: url(img/zoom-panel-NOALPHA.png);
}
.olControlPanPanel div {
background-image: url(img/pan-panel-NOALPHA.png);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,397 @@
div.olMap {
z-index: 0;
padding: 0px!important;
margin: 0px!important;
cursor: default;
}
div.olMapViewport {
text-align: left;
}
div.olLayerDiv {
-moz-user-select: none;
}
.olLayerGoogleCopyright {
left: 2px;
bottom: 2px;
}
.olLayerGooglePoweredBy {
left: 2px;
bottom: 15px;
}
.olControlAttribution {
font-size: smaller;
right: 3px;
bottom: 4.5em;
position: absolute;
display: block;
}
.olControlScale {
right: 3px;
bottom: 3em;
display: block;
position: absolute;
font-size: smaller;
}
.olControlScaleLine {
display: block;
position: absolute;
left: 10px;
bottom: 15px;
font-size: xx-small;
}
.olControlScaleLineBottom {
border: solid 2px black;
border-bottom: none;
margin-top:-2px;
text-align: center;
}
.olControlScaleLineTop {
border: solid 2px black;
border-top: none;
text-align: center;
}
.olControlPermalink {
right: 3px;
bottom: 1.5em;
display: block;
position: absolute;
font-size: smaller;
}
div.olControlMousePosition {
bottom: 0em;
right: 3px;
display: block;
position: absolute;
font-family: Arial;
font-size: smaller;
}
.olControlOverviewMapContainer {
position: absolute;
bottom: 0px;
right: 0px;
}
.olControlOverviewMapElement {
padding: 10px 18px 10px 10px;
background-color: #00008B;
-moz-border-radius: 1em 0 0 0;
}
.olControlOverviewMapMinimizeButton {
right: 0px;
bottom: 80px;
}
.olControlOverviewMapMaximizeButton {
right: 0px;
bottom: 80px;
}
.olControlOverviewMapExtentRectangle {
overflow: hidden;
background-image: url("img/blank.gif");
cursor: move;
border: 2px dotted red;
}
.olControlOverviewMapRectReplacement {
overflow: hidden;
cursor: move;
background-image: url("img/overview_replacement.gif");
background-repeat: no-repeat;
background-position: center;
}
.olLayerGeoRSSDescription {
float:left;
width:100%;
overflow:auto;
font-size:1.0em;
}
.olLayerGeoRSSClose {
float:right;
color:gray;
font-size:1.2em;
margin-right:6px;
font-family:sans-serif;
}
.olLayerGeoRSSTitle {
float:left;font-size:1.2em;
}
.olPopupContent {
padding:5px;
overflow: auto;
}
.olControlNavToolbar {
width:0px;
height:0px;
}
.olControlNavToolbar div {
display:block;
width: 28px;
height: 28px;
top: 300px;
left: 6px;
position: relative;
}
.olControlNavigationHistory {
background-image: url("img/navigation_history.png");
background-repeat: no-repeat;
width: 24px;
height: 24px;
}
.olControlNavigationHistoryPreviousItemActive {
background-position: 0px 0px;
}
.olControlNavigationHistoryPreviousItemInactive {
background-position: 0px -24px;
}
.olControlNavigationHistoryNextItemActive {
background-position: -24px 0px;
}
.olControlNavigationHistoryNextItemInactive {
background-position: -24px -24px;
}
.olControlNavToolbar .olControlNavigationItemActive {
background-image: url("img/panning-hand-on.png");
background-repeat: no-repeat;
}
.olControlNavToolbar .olControlNavigationItemInactive {
background-image: url("img/panning-hand-off.png");
background-repeat: no-repeat;
}
.olControlNavToolbar .olControlZoomBoxItemActive {
background-image: url("img/drag-rectangle-on.png");
background-color: orange;
background-repeat: no-repeat;
}
.olControlNavToolbar .olControlZoomBoxItemInactive {
background-image: url("img/drag-rectangle-off.png");
background-repeat: no-repeat;
}
.olControlEditingToolbar {
float:right;
right: 0px;
height: 30px;
width: 200px;
}
.olControlEditingToolbar div {
background-image: url("img/editing_tool_bar.png");
background-repeat: no-repeat;
float:right;
width: 24px;
height: 24px;
margin: 5px;
}
.olControlEditingToolbar .olControlNavigationItemActive {
background-position: -103px -23px;
}
.olControlEditingToolbar .olControlNavigationItemInactive {
background-position: -103px -0px;
}
.olControlEditingToolbar .olControlDrawFeaturePointItemActive {
background-position: -77px -23px;
}
.olControlEditingToolbar .olControlDrawFeaturePointItemInactive {
background-position: -77px -0px;
}
.olControlEditingToolbar .olControlDrawFeaturePathItemInactive {
background-position: -51px 0px;
}
.olControlEditingToolbar .olControlDrawFeaturePathItemActive {
background-position: -51px -23px;
}
.olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive {
background-position: -26px 0px;
}
.olControlEditingToolbar .olControlDrawFeaturePolygonItemActive {
background-position: -26px -23px ;
}
div.olControlSaveFeaturesItemActive {
background-image: url(img/save_features_on.png);
background-repeat: no-repeat;
background-position: 0px 1px;
}
div.olControlSaveFeaturesItemInactive {
background-image: url(img/save_features_off.png);
background-repeat: no-repeat;
background-position: 0px 1px;
}
.olHandlerBoxZoomBox {
border: 2px solid red;
position: absolute;
background-color: white;
opacity: 0.50;
font-size: 1px;
filter: alpha(opacity=50);
}
.olHandlerBoxSelectFeature {
border: 2px solid blue;
position: absolute;
background-color: white;
opacity: 0.50;
font-size: 1px;
filter: alpha(opacity=50);
}
.olControlPanPanel {
top: 10px;
left: 5px;
}
.olControlPanPanel div {
background-image: url(img/pan-panel.png);
height: 18px;
width: 18px;
cursor: pointer;
position: absolute;
}
.olControlPanPanel .olControlPanNorthItemInactive {
top: 0px;
left: 9px;
background-position: 0px 0px;
}
.olControlPanPanel .olControlPanSouthItemInactive {
top: 36px;
left: 9px;
background-position: 18px 0px;
}
.olControlPanPanel .olControlPanWestItemInactive {
position: absolute;
top: 18px;
left: 0px;
background-position: 0px 18px;
}
.olControlPanPanel .olControlPanEastItemInactive {
top: 18px;
left: 18px;
background-position: 18px 18px;
}
.olControlZoomPanel {
top: 71px;
left: 14px;
}
.olControlZoomPanel div {
background-image: url(img/zoom-panel.png);
position: absolute;
height: 18px;
width: 18px;
cursor: pointer;
}
.olControlZoomPanel .olControlZoomInItemInactive {
top: 0px;
left: 0px;
background-position: 0px 0px;
}
.olControlZoomPanel .olControlZoomToMaxExtentItemInactive {
top: 18px;
left: 0px;
background-position: 0px -18px;
}
.olControlZoomPanel .olControlZoomOutItemInactive {
top: 36px;
left: 0px;
background-position: 0px 18px;
}
.olPopupCloseBox {
background: url("img/close.gif") no-repeat;
cursor: pointer;
}
.olFramedCloudPopupContent {
padding: 5px;
overflow: auto;
}
.olControlNoSelect {
-moz-user-select: none;
}
.olImageLoadError {
background-color: pink;
opacity: 0.5;
filter: alpha(opacity=50); /* IE */
}
/**
* Cursor styles
*/
.olCursorWait {
cursor: wait;
}
.olDragDown {
cursor: move;
}
.olDrawBox {
cursor: crosshair;
}
.olControlDragFeatureOver {
cursor: move;
}
.olControlDragFeatureActive.olControlDragFeatureOver.olDragDown {
cursor: -moz-grabbing;
}
/**
* Layer switcher
*/
.olControlLayerSwitcher {
position: absolute;
top: 25px;
right: 0px;
width: 20em;
font-family: sans-serif;
font-weight: bold;
margin-top: 3px;
margin-left: 3px;
margin-bottom: 3px;
font-size: smaller;
color: white;
background-color: transparent;
}
.olControlLayerSwitcher .layersDiv {
padding-top: 5px;
padding-left: 10px;
padding-bottom: 5px;
padding-right: 75px;
background-color: darkblue;
width: 100%;
height: 100%;
}
.olControlLayerSwitcher .layersDiv .baseLbl,
.olControlLayerSwitcher .layersDiv .dataLbl {
margin-top: 3px;
margin-left: 3px;
margin-bottom: 3px;
}
.olControlLayerSwitcher .layersDiv .baseLayersDiv,
.olControlLayerSwitcher .layersDiv .dataLayersDiv {
padding-left: 10px;
}
.olControlLayerSwitcher .maximizeDiv,
.olControlLayerSwitcher .minimizeDiv {
top: 5px;
right: 0px;
}

View File

@ -243,7 +243,7 @@ $(function() {
chart_activeTimeouts[$tab.attr('id')+"_chart_cnt"] = null;
tabChart[$tab.attr('id')].destroy();
// Also reset the select list
$tab.find('.statuslinks select').get(0).selectedIndex = 0;
$tab.find('.statuslinks select').get(0).selectedIndex = 2;
}
if(! settings.chart) settings.chart = {};
@ -255,7 +255,7 @@ $(function() {
tabChart[$tab.attr('id')] = PMA_createChart(settings);
$(link).html(PMA_messages['strStaticData']);
$tab.find('.statuslinks a.tabRefresh').hide();
$tab.find('.statuslinks select').show();
$tab.find('.statuslinks .refreshList').show();
} else {
clearTimeout(chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"]);
chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"]=null;
@ -264,8 +264,8 @@ $(function() {
tabStatus[$tab.attr('id')]='static';
tabChart[$tab.attr('id')].destroy();
$tab.find('.statuslinks a.tabRefresh').show();
$tab.find('.statuslinks select').get(0).selectedIndex=0;
$tab.find('.statuslinks select').hide();
$tab.find('.statuslinks select').get(0).selectedIndex=2;
$tab.find('.statuslinks .refreshList').hide();
}
}

View File

@ -187,6 +187,13 @@ $(document).ready(function() {
cache: 'false'
});
/* Hides the bookmarkoptions checkboxes when the bookmark label is empty */
$('input#bkm_label').keyup(function() {
$('input#id_bkm_all_users, input#id_bkm_replace')
.parent()
.toggle($(this).attr('value').length > 0);
}).trigger('keyup');
/**
* current value of the direction in which the table is displayed
* @type String

250
js/tbl_gis_visualization.js Normal file
View File

@ -0,0 +1,250 @@
/**
* @fileoverview functions used for visualizing GIS data
*
* @requires jquery
* @requires jquery/jquery.svg.js
* @requires jquery/jquery.mousewheel.js
* @requires jquery/jquery.event.drag-2.0.min.js
*/
var x = 0;
var y = 0;
var scale = 1;
var svg;
/**
* Zooms and pans the visualization.
*/
function zoomAndPan() {
var g = svg.getElementById('groupPanel');
g.setAttribute('transform', 'translate(' + x + ', ' + y + ') scale(' + scale + ')');
var id;
var circle;
$('circle.vector').each(function() {
id = $(this).attr('id');
circle = svg.getElementById(id);
svg.change(circle, {
r : (3 / scale),
"stroke-width" : (2 / scale)
});
});
var line;
$('polyline.vector').each(function() {
id = $(this).attr('id');
line = svg.getElementById(id);
svg.change(line, {
"stroke-width" : (2 / scale)
});
});
var polygon;
$('path.vector').each(function() {
id = $(this).attr('id');
polygon = svg.getElementById(id);
svg.change(polygon, {
"stroke-width" : (0.5 / scale)
});
});
}
/**
* Ajax handlers for GIS visualization page
*
* Actions Ajaxified here:
*
* Zooming in and zooming out on mousewheel movement.
* Panning the visualization on dragging.
* Zooming in on double clicking.
* Zooming out on clicking the zoom out button.
* Panning on clicking the arrow buttons.
* Displaying tooltips for GIS objects.
*/
$(document).ready(function() {
var $placeholder = $('#placeholder');
var $openlayersmap = $('#openlayersmap');
if ($('#choice').prop('checked') != true) {
$openlayersmap.hide();
} else {
$placeholder.hide();
}
var cssObj = {
'border' : '1px solid #aaa',
'width' : $placeholder.width(),
'height' : $placeholder.height(),
'float' : 'right'
};
$openlayersmap.css(cssObj);
drawOpenLayers();
$('.choice').show();
$('#choice').bind('click', function() {
if ($(this).prop('checked') == false) {
$placeholder.show();
$openlayersmap.hide();
} else {
$placeholder.hide();
$openlayersmap.show();
}
});
$('#placeholder').svg({
onLoad: function(svg_ref) {
svg = svg_ref;
}
});
// Removes the second SVG element unnecessarily added due to the above command.
$('#placeholder').find('svg:nth-child(2)').remove();
if ($("#placeholder svg").length > 0) {
var pmaThemeImage = $('#pmaThemeImage').attr('value');
// add panning arrows
$('<img class="button" id="left_arrow" src="' + pmaThemeImage + 'west-mini.png">').appendTo($placeholder);
$('<img class="button" id="right_arrow" src="' + pmaThemeImage + 'east-mini.png">').appendTo($placeholder);
$('<img class="button" id="up_arrow" src="' + pmaThemeImage + 'north-mini.png">').appendTo($placeholder);
$('<img class="button" id="down_arrow" src="' + pmaThemeImage + 'south-mini.png">').appendTo($placeholder);
// add zooming controls
$('<img class="button" id="zoom_in" src="' + pmaThemeImage + 'zoom-plus-mini.png">').appendTo($placeholder);
$('<img class="button" id="zoom_world" src="' + pmaThemeImage + 'zoom-world-mini.png">').appendTo($placeholder);
$('<img class="button" id="zoom_out" src="' + pmaThemeImage + 'zoom-minus-mini.png">').appendTo($placeholder);
}
$('#placeholder').live('mousewheel', function(event, delta) {
if (delta > 0) {
//zoom in
scale *= 1.5;
// zooming in keeping the position under mouse pointer unmoved.
x = event.layerX - (event.layerX - x) * 1.5;
y = event.layerY - (event.layerY - y) * 1.5;
zoomAndPan();
} else {
//zoom out
scale /= 1.5;
// zooming out keeping the position under mouse pointer unmoved.
x = event.layerX - (event.layerX - x) / 1.5;
y = event.layerY - (event.layerY - y) / 1.5;
zoomAndPan();
}
return true;
});
var dragX = 0; var dragY = 0;
$('svg').live('dragstart', function(event, dd) {
$placeholder.addClass('placeholderDrag');
dragX = Math.round(dd.offsetX);
dragY = Math.round(dd.offsetY);
});
$('svg').live('mouseup', function(event) {
$placeholder.removeClass('placeholderDrag');
});
$('svg').live('drag', function(event, dd) {
newX = Math.round(dd.offsetX);
x += newX - dragX;
dragX = newX;
newY = Math.round(dd.offsetY);
y += newY - dragY;
dragY = newY;
zoomAndPan();
});
$('#placeholder').live('dblclick', function(event) {
scale *= 1.5;
// zooming in keeping the position under mouse pointer unmoved.
x = event.layerX - (event.layerX - x) * 1.5;
y = event.layerY - (event.layerY - y) * 1.5;
zoomAndPan();
});
$('#zoom_in').live('click', function(e) {
e.preventDefault();
//zoom in
scale *= 1.5;
width = $('#placeholder svg').attr('width');
height = $('#placeholder svg').attr('height');
// zooming in keeping the center unmoved.
x = width / 2 - (width / 2 - x) * 1.5;
y = height / 2 - (height / 2 - y) * 1.5;
zoomAndPan();
});
$('#zoom_world').live('click', function(e) {
e.preventDefault();
scale = 1;
x = 0;
y = 0;
zoomAndPan();
});
$('#zoom_out').live('click', function(e) {
e.preventDefault();
//zoom out
scale /= 1.5;
width = $('#placeholder svg').attr('width');
height = $('#placeholder svg').attr('height');
// zooming out keeping the center unmoved.
x = width / 2 - (width / 2 - x) / 1.5;
y = height / 2 - (height / 2 - y) / 1.5;
zoomAndPan();
});
$('#left_arrow').live('click', function(e) {
e.preventDefault();
x += 100;
zoomAndPan();
});
$('#right_arrow').live('click', function(e) {
e.preventDefault();
x -= 100;
zoomAndPan();
});
$('#up_arrow').live('click', function(e) {
e.preventDefault();
y += 100;
zoomAndPan();
});
$('#down_arrow').live('click', function(e) {
e.preventDefault();
y -= 100;
zoomAndPan();
});
/**
* Detect the mousemove event and show tooltips.
*/
$('.polygon, .multipolygon, .point, .multipoint, .linestring, .multilinestring, '
+ '.geometrycollection').live('mousemove', function(event) {
contents = $(this).attr('name');
$("#tooltip").remove();
if (contents != '') {
$('<div id="tooltip">' + contents + '</div>').css({
position : 'absolute',
display : 'none',
top : event.pageY + 10,
left : event.pageX + 10,
border : '1px solid #fdd',
padding : '2px',
'background-color' : '#fee',
opacity : 0.80
}).appendTo("body").fadeIn(200);
}
});
/**
* Detect the mouseout event and hide tooltips.
*/
$('.polygon, .multipolygon, .point, .multipoint, .linestring, .multilinestring, '
+ '.geometrycollection').live('mouseout', function(event) {
$("#tooltip").remove();
});
});

View File

@ -145,5 +145,109 @@ $(document).ready(function() {
}) // end $.get()
}) // end $.PMA_confirm()
}) //end Drop Primary Key/Index
/**
*Ajax event handler for muti column change
**/
$("#fieldsForm.ajax .mult_submit[value=change]").live('click', function(event){
event.preventDefault();
/*Check whether atleast one row is selected for change*/
if($("#tablestructure tbody tr").hasClass("marked")){
var div = $('<div id="change_column_dialog"></div>');
/**
* @var button_options Object that stores the options passed to jQueryUI
* dialog
*/
var button_options = {};
// in the following function we need to use $(this)
button_options[PMA_messages['strCancel']] = function() {$(this).parent().dialog('close').remove();}
var button_options_error = {};
button_options_error[PMA_messages['strOK']] = function() {$(this).parent().dialog('close').remove();}
var $form = $("#fieldsForm");
var $msgbox = PMA_ajaxShowMessage();
$.get( $form.attr('action') , $form.serialize()+"&ajax_request=true&submit_mult=change" , function(data) {
//in the case of an error, show the error message returned.
if (data.success != undefined && data.success == false) {
div
.append(data.error)
.dialog({
title: PMA_messages['strChangeTbl'],
height: 230,
width: 900,
open: PMA_verifyTypeOfAllColumns,
buttons : button_options_error
})// end dialog options
} else {
div
.append(data)
.dialog({
title: PMA_messages['strChangeTbl'],
height: 600,
width: 900,
open: PMA_verifyTypeOfAllColumns,
buttons : button_options
})
//Remove the top menu container from the dialog
.find("#topmenucontainer").hide()
; // end dialog options
$("#append_fields_form input[name=do_save_data]").addClass("ajax");
}
PMA_ajaxRemoveMessage($msgbox);
}) // end $.get()
} else {
PMA_ajaxShowMessage(PMA_messages['strNoRowSelected']);
}
});
/**
*Ajax action for submitting the column change form
**/
$("#append_fields_form input[name=do_save_data].ajax").live('click', function(event) {
event.preventDefault();
/**
* @var the_form object referring to the export form
*/
var $form = $("#append_fields_form");
PMA_prepareForAjaxRequest($form);
//User wants to submit the form
$.post($form.attr('action'), $form.serialize()+"&do_save_data=Save", function(data) {
if ($("#sqlqueryresults").length != 0) {
$("#sqlqueryresults").remove();
} else if ($(".error").length != 0) {
$(".error").remove();
}
if (data.success == true) {
PMA_ajaxShowMessage(data.message);
$("<div id='sqlqueryresults'></div>").insertAfter("#topmenucontainer");
$("#sqlqueryresults").html(data.sql_query);
$("#result_query .notice").remove();
$("#result_query").prepend((data.message));
if ($("#change_column_dialog").length > 0) {
$("#change_column_dialog").dialog("close").remove();
}
/*Reload the field form*/
$.post($("#fieldsForm").attr('action'), $("#fieldsForm").serialize()+"&ajax_request=true", function(form_data) {
$("#fieldsForm").remove();
var $temp_div = $("<div id='temp_div'><div>").append(form_data);
if ($("#sqlqueryresults").length != 0) {
$temp_div.find("#fieldsForm").insertAfter("#sqlqueryresults");
} else {
$temp_div.find("#fieldsForm").insertAfter(".error");
}
/*Call the function to display the more options in table*/
displayMoreTableOpts();
});
} else {
var $temp_div = $("<div id='temp_div'><div>").append(data);
var $error = $temp_div.find(".error code").addClass("error");
PMA_ajaxShowMessage($error);
}
}) // end $.post()
}) // end insert table button "do_save_data"
}) // end $(document).ready()

View File

@ -305,10 +305,6 @@ class PMA_Config
/**
* loads default values from default source
*
* @uses file_exists()
* @uses $this->default_source
* @uses $this->error_config_default_file
* @uses $this->settings
* @return boolean success
*/
function loadDefaults()
@ -418,16 +414,6 @@ class PMA_Config
* Loads user preferences and merges them with current config
* must be called after control connection has been estabilished
*
* @uses $GLOBALS['cfg']
* @uses $GLOBALS['collation_connection']
* @uses $GLOBALS['lang']
* @uses $_SESSION['cache']['server_$server']['config_mtime']
* @uses $_SESSION['cache']['server_$server']['userprefs']
* @uses $_SESSION['cache']['server_$server']['userprefs_mtime']
* @uses $_SESSION['PMA_Theme_Manager']
* @uses PMA_apply_userprefs()
* @uses PMA_array_merge_recursive()
* @uses PMA_load_userprefs()
* @return boolean
*/
function loadUserPreferences()
@ -530,10 +516,6 @@ class PMA_Config
* If user preferences are not yet initialized, option is applied to global config and
* added to a update queue, which is processed by {@link loadUserPreferences()}
*
* @uses $GLOBALS['cfg']
* @uses PMA_array_read()
* @uses PMA_array_write()
* @uses PMA_persist_option()
* @param string $cookie_name can be null
* @param string $cfg_path
* @param mixed $new_cfg_value
@ -672,7 +654,6 @@ class PMA_Config
/**
* sets configuration variable
*
* @uses $this->settings
* @param string $setting configuration option
* @param string $value new value for configuration option
*/
@ -890,14 +871,6 @@ class PMA_Config
/**
* checks for font size configuration, and sets font size as requested by user
*
* @uses $_GET
* @uses $_POST
* @uses $_COOKIE
* @uses preg_match()
* @uses function_exists()
* @uses PMA_Config::set()
* @uses PMA_Config::get()
* @uses PMA_Config::setCookie()
*/
function checkFontsize()
{
@ -1105,8 +1078,6 @@ class PMA_Config
/**
* returns options for font size selection
*
* @uses preg_replace()
* @uses ksort()
* @static
* @param string $current_size current selected font size with unit
* @return array selectable font sizes
@ -1167,9 +1138,6 @@ class PMA_Config
/**
* returns html selectbox for font sizes
*
* @uses $GLOBALS['PMA_Config']
* @uses PMA_Config::get()
* @uses PMA_Config::_getFontsizeOptions()
* @static
* @param string $current_size currently slected font size with unit
* @return string html selectbox
@ -1204,8 +1172,6 @@ class PMA_Config
/**
* return complete font size selection form
*
* @uses PMA_generate_common_hidden_inputs()
* @uses PMA_Config::_getFontsizeSelection()
* @static
* @param string $current_size currently slected font size with unit
* @return string html selectbox
@ -1225,10 +1191,6 @@ class PMA_Config
/**
* removes cookie
*
* @uses PMA_Config::isHttps()
* @uses PMA_Config::getCookiePath()
* @uses setcookie()
* @uses time()
* @param string $cookie name of cookie to remove
* @return boolean result of setcookie()
*/
@ -1242,12 +1204,6 @@ class PMA_Config
* sets cookie if value is different from current cokkie value,
* or removes if value is equal to default
*
* @uses PMA_Config::isHttps()
* @uses PMA_Config::getCookiePath()
* @uses $_COOKIE
* @uses PMA_Config::removeCookie()
* @uses setcookie()
* @uses time()
* @param string $cookie name of cookie to remove
* @param mixed $value new cookie value
* @param string $default default value

View File

@ -93,12 +93,6 @@ class PMA_Error extends PMA_Message
/**
* Constructor
*
* @uses debug_backtrace()
* @uses PMA_Error::setNumber()
* @uses PMA_Error::setMessage()
* @uses PMA_Error::setFile()
* @uses PMA_Error::setLine()
* @uses PMA_Error::setBacktrace()
* @param integer $errno
* @param string $errstr
* @param string $errfile
@ -122,7 +116,6 @@ class PMA_Error extends PMA_Message
/**
* sets PMA_Error::$_backtrace
*
* @uses PMA_Error::$_backtrace to set it
* @param array $backtrace
*/
public function setBacktrace($backtrace)
@ -133,7 +126,6 @@ class PMA_Error extends PMA_Message
/**
* sets PMA_Error::$_line
*
* @uses PMA_Error::$_line to set it
* @param integer $line
*/
public function setLine($line)
@ -144,8 +136,6 @@ class PMA_Error extends PMA_Message
/**
* sets PMA_Error::$_file
*
* @uses PMA_Error::$_file to set it
* @uses PMA_Error::relPath()
* @param string $file
*/
public function setFile($file)
@ -157,13 +147,6 @@ class PMA_Error extends PMA_Message
/**
* returns unique PMA_Error::$_hash, if not exists it will be created
*
* @uses PMA_Error::$_hash as return value and to set it if required
* @uses PMA_Error::getNumber()
* @uses PMA_Error::getMessage()
* @uses PMA_Error::getFile()
* @uses PMA_Error::getLine()
* @uses PMA_Error::getBacktrace()
* @uses md5()
* @param string $file
* @return string PMA_Error::$_hash
*/
@ -185,7 +168,6 @@ class PMA_Error extends PMA_Message
/**
* returns PMA_Error::$_backtrace
*
* @uses PMA_Error::$_backtrace as return value
* @return array PMA_Error::$_backtrace
*/
public function getBacktrace()
@ -196,7 +178,6 @@ class PMA_Error extends PMA_Message
/**
* returns PMA_Error::$_file
*
* @uses PMA_Error::$_file as return value
* @return string PMA_Error::$_file
*/
public function getFile()
@ -207,7 +188,6 @@ class PMA_Error extends PMA_Message
/**
* returns PMA_Error::$_line
*
* @uses PMA_Error::$_line as return value
* @return integer PMA_Error::$_line
*/
public function getLine()
@ -218,8 +198,6 @@ class PMA_Error extends PMA_Message
/**
* returns type of error
*
* @uses PMA_Error::$errortype
* @uses PMA_Error::getNumber()
* @return string type of error
*/
public function getType()
@ -230,8 +208,6 @@ class PMA_Error extends PMA_Message
/**
* returns level of error
*
* @uses PMA_Error::$$errorlevel
* @uses PMA_Error::getNumber()
* @return string level of error
*/
public function getLevel()
@ -242,9 +218,6 @@ class PMA_Error extends PMA_Message
/**
* returns title prepared for HTML Title-Tag
*
* @uses PMA_Error::getTitle()
* @uses htmlspecialchars()
* @uses substr()
* @return string HTML escaped and truncated title
*/
public function getHtmlTitle()
@ -255,8 +228,6 @@ class PMA_Error extends PMA_Message
/**
* returns title for error
*
* @uses PMA_Error::getType()
* @uses PMA_Error::getMessage()
* @return string
*/
public function getTitle()
@ -267,10 +238,6 @@ class PMA_Error extends PMA_Message
/**
* Display HTML backtrace
*
* @uses PMA_Error::getBacktrace()
* @uses PMA_Error::relPath()
* @uses PMA_Error::displayArg()
* @uses count()
*/
public function displayBacktrace()
{
@ -300,9 +267,6 @@ class PMA_Error extends PMA_Message
* Display a single function argument
* if $function is one of include/require the $arg is converted te relative path
*
* @uses PMA_Error::relPath()
* @uses in_array()
* @uses gettype()
* @param string $arg
* @param string $function
*/
@ -327,11 +291,6 @@ class PMA_Error extends PMA_Message
/**
* Displays the error in HTML
*
* @uses PMA_Error::getLevel()
* @uses PMA_Error::getType()
* @uses PMA_Error::getMessage()
* @uses PMA_Error::displayBacktrace()
* @uses PMA_Error::isDisplayed()
*/
public function display()
{
@ -356,10 +315,6 @@ class PMA_Error extends PMA_Message
/**
* whether this error is a user error
*
* @uses E_USER_WARNING
* @uses E_USER_ERROR
* @uses E_USER_NOTICE
* @uses PMA_Error::getNumber()
* @return boolean
*/
public function isUserError()
@ -374,16 +329,6 @@ class PMA_Error extends PMA_Message
* and make users feel save to submit error reports
*
* @static
* @uses PHP_OS()
* @uses __FILE__()
* @uses realpath()
* @uses substr()
* @uses explode()
* @uses dirname()
* @uses implode()
* @uses count()
* @uses array_pop()
* @uses str_replace()
* @param string $dest path to be shorten
* @return string shortened path
*/

View File

@ -28,7 +28,6 @@ class PMA_Error_Handler
/**
* Constructor - set PHP error handler
*
* @uses set_error_handler()
*/
public function __construct()
{
@ -40,10 +39,6 @@ class PMA_Error_Handler
*
* stores errors in session
*
* @uses $_SESSION['errors']
* @uses array_merge()
* @uses PMA_Error_Handler::$_errors
* @uses PMA_Error::isDisplayed()
*/
public function __destruct()
{
@ -69,8 +64,6 @@ class PMA_Error_Handler
/**
* returns array with all errors
*
* @uses PMA_Error_Handler::$_errors as return value
* @uses PMA_Error_Handler::_checkSavedErrors()
* @return array PMA_Error_Handler::$_errors
*/
protected function getErrors()
@ -90,24 +83,6 @@ class PMA_Error_Handler
* Do not use the context parameter as we want to avoid storing the
* complete $GLOBALS inside $_SESSION['errors']
*
* @uses E_USER_NOTICE
* @uses E_USER_WARNING
* @uses E_STRICT
* @uses E_NOTICE
* @uses E_WARNING
* @uses E_CORE_WARNING
* @uses E_COMPILE_WARNING
* @uses E_USER_ERROR
* @uses E_ERROR
* @uses E_PARSE
* @uses E_CORE_ERROR
* @uses E_COMPILE_ERROR
* @uses E_RECOVERABLE_ERROR
* @uses PMA_Error
* @uses PMA_Error_Handler::$_errors
* @uses PMA_Error_Handler::_dispFatalError()
* @uses PMA_Error::getHash()
* @uses PMA_Error::getNumber()
* @param integer $errno
* @param string $errstr
* @param string $errfile
@ -151,8 +126,6 @@ class PMA_Error_Handler
* log error to configured log facility
*
* @todo finish!
* @uses PMA_Error::getMessage()
* @uses error_log()
* @param PMA_Error $error
*/
protected function _logError($error)
@ -163,7 +136,6 @@ class PMA_Error_Handler
/**
* trigger a custom error
*
* @uses trigger_error()
* @param string $errorInfo
* @param integer $errorNumber
* @param string $file
@ -178,10 +150,6 @@ class PMA_Error_Handler
/**
* display fatal error and exit
*
* @uses headers_sent()
* @uses PMA_Error::display()
* @uses PMA_Error_Handler::_dispPageStart()
* @uses PMA_Error_Handler::_dispPageEnd()
* @param PMA_Error $error
*/
protected function _dispFatalError($error)
@ -197,10 +165,6 @@ class PMA_Error_Handler
/**
* display the whole error page with all errors
*
* @uses headers_sent()
* @uses PMA_Error_Handler::dispAllErrors()
* @uses PMA_Error_Handler::_dispPageStart()
* @uses PMA_Error_Handler::_dispPageEnd()
*/
public function dispErrorPage()
{
@ -214,10 +178,6 @@ class PMA_Error_Handler
/**
* display user errors not displayed
*
* @uses PMA_Error_Handler::getErrors()
* @uses PMA_Error::isDisplayed()
* @uses PMA_Error::isUserError()
* @uses PMA_Error::display()
*/
public function dispUserErrors()
{
@ -231,7 +191,6 @@ class PMA_Error_Handler
/**
* display HTML header
*
* @uses PMA_Error::getTitle()
* @param PMA_error $error
*/
protected function _dispPageStart($error = null)
@ -257,8 +216,6 @@ class PMA_Error_Handler
/**
* display all errors regardless already displayed or user errors
*
* @uses PMA_Error_Handler::getErrors()
* @uses PMA_Error::display()
*/
public function dispAllErrors()
{
@ -270,11 +227,6 @@ class PMA_Error_Handler
/**
* display errors not displayed
*
* @uses $cfg['Error_Handler']['display']
* @uses PMA_Error_Handler::getErrors()
* @uses PMA_Error_Handler::dispUserErrors()
* @uses PMA_Error::isDisplayed()
* @uses PMA_Error::display()
*/
public function dispErrors()
{
@ -296,9 +248,6 @@ class PMA_Error_Handler
/**
* look in session for saved errors
*
* @uses $_SESSION['errors']
* @uses PMA_Error_Handler::$_errors
* @uses array_merge()
*/
protected function _checkSavedErrors()
{
@ -321,8 +270,6 @@ class PMA_Error_Handler
/**
* return count of errors
*
* @uses PMA_Error_Handler::getErrors()
* @uses count()
* @return integer number of errors occoured
*/
public function countErrors()
@ -333,9 +280,6 @@ class PMA_Error_Handler
/**
* return count of user errors
*
* @uses PMA_Error_Handler::countErrors()
* @uses PMA_Error_Handler::getErrors()
* @uses PMA_Error::isUserError()
* @return integer number of user errors occoured
*/
public function countUserErrors()
@ -355,7 +299,6 @@ class PMA_Error_Handler
/**
* whether use errors occured or not
*
* @uses PMA_Error_Handler::countUserErrors()
* @return boolean
*/
public function hasUserErrors()
@ -366,7 +309,6 @@ class PMA_Error_Handler
/**
* whether errors occured or not
*
* @uses PMA_Error_Handler::countErrors()
* @return boolean
*/
public function hasErrors()
@ -377,9 +319,6 @@ class PMA_Error_Handler
/**
* number of errors to be displayed
*
* @uses $cfg['Error_Handler']['display']
* @uses PMA_Error_Handler::countErrors()
* @uses PMA_Error_Handler::countUserErrors()
* @return integer number of errors to be displayed
*/
public function countDisplayErrors()
@ -394,7 +333,6 @@ class PMA_Error_Handler
/**
* whether there are errors to display or not
*
* @uses PMA_Error_Handler::countDisplayErrors()
* @return boolean
*/
public function hasDisplayErrors()

View File

@ -79,7 +79,6 @@ class PMA_File
* constructor
*
* @access public
* @uses PMA_File::setName()
* @param string $name file name
*/
function __construct($name = false)
@ -94,7 +93,6 @@ class PMA_File
*
* @see PMA_File::cleanUp()
* @access public
* @uses PMA_File::cleanUp()
*/
function __destruct()
{
@ -105,8 +103,6 @@ class PMA_File
* deletes file if it is temporary, usally from a moved upload file
*
* @access public
* @uses PMA_File::delet()
* @uses PMA_File::isTemp()
* @return boolean success
*/
function cleanUp()
@ -122,8 +118,6 @@ class PMA_File
* deletes the file
*
* @access public
* @uses PMA_File::getName()
* @uses unlink()
* @return boolean success
*/
function delete()
@ -136,7 +130,6 @@ class PMA_File
* file objects with temp flags are deleted with object destruction
*
* @access public
* @uses PMA_File::$_is_temp to set and read it
* @param boolean sets the temp flag
* @return boolean PMA_File::$_is_temp
*/
@ -153,7 +146,6 @@ class PMA_File
* accessor
*
* @access public
* @uses PMA_File::$_name
* @param string $name file name
*/
function setName($name)
@ -163,17 +155,6 @@ class PMA_File
/**
* @access public
* @uses PMA_File::getName()
* @uses PMA_File::isUploaded()
* @uses PMA_File::checkUploadedFile()
* @uses PMA_File::isReadable()
* @uses PMA_File::$_content
* @uses function_exists()
* @uses file_get_contents()
* @uses filesize()
* @uses fread()
* @uses fopen()
* @uses bin2hex()
* @return string binary file content
*/
function getContent($as_binary = true, $offset = 0, $length = null)
@ -209,8 +190,6 @@ class PMA_File
/**
* @access public
* @uses PMA_File::getName()
* @uses is_uploaded_file()
*/
function isUploaded()
{
@ -221,7 +200,6 @@ class PMA_File
* accessor
*
* @access public
* @uses PMA_File::$name as return value
* @return string PMA_File::$_name
*/
function getName()
@ -232,9 +210,6 @@ class PMA_File
/**
* @todo replace error message with localized string
* @access public
* @uses PMA_File::isUploaded()
* @uses PMA_File::setName()
* @uses PMA_File::$_error_message
* @param string name of file uploaded
* @return boolean success
*/
@ -253,12 +228,6 @@ class PMA_File
/**
* @access public
* @uses PMA_File::fetchUploadedFromTblChangeRequestMultiple()
* @uses PMA_File::setUploadedFile()
* @uses PMA_File::setRecentBLOBReference()
* @uses curl_setopt_array()
* @uses PMA_File::$_error_message
* @uses $_FILES
* @param string $key the md5 hash of the column name
* @param string $rownumber
* @return boolean success
@ -375,9 +344,6 @@ class PMA_File
* sets the name if the file to the one selected in the tbl_change form
*
* @access public
* @uses $_REQUEST
* @uses PMA_File::setLocalSelectedFile()
* @uses is_string()
* @param string $key the md5 hash of the column name
* @param string $rownumber
* @return boolean success
@ -437,7 +403,6 @@ class PMA_File
/**
* @access public
* @uses PMA_File->$_error_message as return value
* @return string error message
*/
function getError()
@ -447,7 +412,6 @@ class PMA_File
/**
* @access public
* @uses PMA_File->$_error_message to check it
* @return boolean whether an error occured or not
*/
function isError()
@ -460,8 +424,6 @@ class PMA_File
* and uses the submitted/selected file
*
* @access public
* @uses PMA_File::setUploadedFromTblChangeRequest()
* @uses PMA_File::setSelectedFromTblChangeRequest()
* @param string $key the md5 hash of the column name
* @param string $rownumber
* @return boolean success
@ -485,10 +447,6 @@ class PMA_File
/**
*
* @access public
* @uses PMA_File::setName()
* @uses PMA_securePath()
* @uses PMA_userDir()
* @uses $GLOBALS['cfg']['UploadDir']
* @param string $name
* @return boolean success
*/
@ -508,10 +466,6 @@ class PMA_File
/**
* @access public
* @uses PMA_File::getName()
* @uses is_readable()
* @uses ob_start()
* @uses ob_end_clean()
* @return boolean whether the file is readable or not
*/
function isReadable()
@ -532,20 +486,6 @@ class PMA_File
* @todo replace error message with localized string
* @todo move check of $cfg['TempDir'] into PMA_Config?
* @access public
* @uses $cfg['TempDir']
* @uses PMA_File::isReadable()
* @uses PMA_File::getName()
* @uses PMA_File::setName()
* @uses PMA_File::isTemp()
* @uses PMA_File::$_error_message
* @uses is_dir()
* @uses mkdir()
* @uses chmod()
* @uses is_writable()
* @uses basename()
* @uses move_uploaded_file()
* @uses ob_start()
* @uses ob_end_clean()
* @return boolean whether uploaded fiel is fine or not
*/
function checkUploadedFile()
@ -588,14 +528,6 @@ class PMA_File
*
* @todo move file read part into readChunk() or getChunk()
* @todo add support for compression plugins
* @uses PMA_File::$_compression to set it
* @uses PMA_File::getName()
* @uses fopen()
* @uses fread()
* @uses strlen()
* @uses fclose()
* @uses chr()
* @uses substr()
* @access protected
* @return string MIME type of compression, none for none
*/
@ -729,8 +661,6 @@ class PMA_File
}
/**
* @uses PMA_File::$_compression as return value
* @uses PMA_File::detectCompression()
* @return string MIME type of compression, none for none
* @access public
*/

View File

@ -43,14 +43,14 @@ class PMA_Index
protected $_columns = array();
/**
* The index method used (BTREE, FULLTEXT, HASH, RTREE).
* The index method used (BTREE, SPATIAL, FULLTEXT, HASH, RTREE).
*
* @var string
*/
protected $_type = '';
/**
* The index choice (PRIMARY, UNIQUE, INDEX, FULLTEXT)
* The index choice (PRIMARY, UNIQUE, INDEX, SPATIAL, FULLTEXT)
*
* @var string
*/
@ -86,7 +86,6 @@ class PMA_Index
/**
* Constructor
*
* @uses $this->set()
* @param array $params
*/
public function __construct($params = array())
@ -112,8 +111,6 @@ class PMA_Index
/**
* returns an array with all indexes from the given table
*
* @uses PMA_Index::_loadIndexes()
* @uses PMA_Index::$_registry
* @param string $table
* @param string $schema
* @return array
@ -132,8 +129,6 @@ class PMA_Index
/**
* return primary if set, false otherwise
*
* @uses PMA_Index::_loadIndexes()
* @uses PMA_Index::$_registry
* @param string $table
* @param string $schema
* @return mixed primary index or false if no one exists
@ -152,11 +147,6 @@ class PMA_Index
/**
* Load index data for table
*
* @uses PMA_Index::$_registry
* @uses PMA_DBI_fetch_result()
* @uses PMA_backquote()
* @uses PMA_Index
* @uses PMA_Index->addColumn()
* @param string $table
* @param string $schema
* @return boolean
@ -186,8 +176,6 @@ class PMA_Index
/**
* Add column to index
*
* @uses $this->_columns
* @uses PMA_Index_Column
* @param array $params column params
*/
public function addColumn($params)
@ -227,7 +215,6 @@ class PMA_Index
/**
* Returns true if $column indexed in this index
*
* @uses $this->_columns
* @param string $column
* @return boolean
*/
@ -269,6 +256,8 @@ class PMA_Index
$this->_choice = 'PRIMARY';
} elseif ('FULLTEXT' == $this->_type) {
$this->_choice = 'FULLTEXT';
} elseif ('SPATIAL' == $this->_type) {
$this->_choice = 'SPATIAL';
} elseif ('0' == $this->_non_unique) {
$this->_choice = 'UNIQUE';
} else {
@ -323,6 +312,7 @@ class PMA_Index
'PRIMARY',
'INDEX',
'UNIQUE',
'SPATIAL',
'FULLTEXT',
);
}
@ -543,12 +533,6 @@ class PMA_Index
/**
* Function to check over array of indexes and look for common problems
*
* @uses is_string()
* @uses is_array()
* @uses count()
* @uses array_pop()
* @uses reset()
* @uses current()
* @access public
* @param string name of table
* @return string Output HTML

View File

@ -27,9 +27,6 @@ abstract class PMA_List extends ArrayObject
/**
* returns item only if there is only one in the list
*
* @uses count()
* @uses reset()
* @uses PMA_List::getEmpty() to return it
* @return single item
*/
public function getSingleItem()
@ -44,7 +41,6 @@ abstract class PMA_List extends ArrayObject
/**
* defines what is an empty item (0, '', false or null)
*
* @uses PMA_List::$item_empty as return value
* @return mixed an empty item
*/
public function getEmpty()
@ -56,9 +52,6 @@ abstract class PMA_List extends ArrayObject
* checks if the given db names exists in the current list, if there is
* missing at least one item it returns false otherwise true
*
* @uses PMA_List::$items to check for existence of specific item
* @uses func_get_args()
* @uses in_array() to check if given arguments exists in PMA_List::$items
* @param string $db_name,.. one or more mysql result resources
* @return boolean true if all items exists, otheriwse false
*/
@ -77,9 +70,6 @@ abstract class PMA_List extends ArrayObject
/**
* returns HTML <option>-tags to be used inside <select></select>
*
* @uses PMA_List::$items to build up the option items
* @uses PMA_List::getDefault() to mark this as selected if requested
* @uses htmlspecialchars() to escape items
* @param mixed $selected the selected db or true for selecting current db
* @param boolean $include_information_schema
* @return string HTML option tags
@ -108,7 +98,6 @@ abstract class PMA_List extends ArrayObject
/**
* returns default item
*
* @uses PMA_List::getEmpty() as fallback
* @return string default item
*/
public function getDefault()

View File

@ -56,10 +56,6 @@ require_once './libraries/List.class.php';
/**
* Constructor
*
* @uses PMA_List_Database::$_db_link
* @uses PMA_List_Database::$_db_link_user
* @uses PMA_List_Database::$_db_link_control
* @uses PMA_List_Database::build()
* @param mixed $db_link_user user database link resource|object
* @param mixed $db_link_control control database link resource|object
*/
@ -77,9 +73,6 @@ require_once './libraries/List.class.php';
* checks if the configuration wants to hide some databases
*
* @todo temporaly use this docblock to test how to doc $GLOBALS
* @uses PMA_List_Database::$items
* @uses preg_match()
* @uses $cfg['Server']['hide_db']
*/
protected function _checkHideDatabase()
{
@ -98,16 +91,6 @@ require_once './libraries/List.class.php';
* retrieves database list from server
*
* @todo we could also search mysql tables if all fail?
* @uses PMA_List_Database::$_show_databases_disabled for not retrying if SHOW DATABASES is disabled
* @uses PMA_List_Database::$_db_link
* @uses PMA_List_Database::$_db_link_control in case of SHOW DATABASES is disabled for userlink
* @uses PMA_DBI_fetch_result()
* @uses PMA_DBI_getError()
* @uses natsort()
* @uses sort()
* @uses $cfg['NaturalOrder']
* @uses $GLOBALS['error_showdatabases']
* @uses $GLOBALS['errno']
* @param string $like_db_name usally a db_name containing wildcards
*/
protected function _retrieve($like_db_name = null)
@ -160,11 +143,6 @@ require_once './libraries/List.class.php';
/**
* builds up the list
*
* @uses PMA_List_Database::$items to initialize it
* @uses PMA_List_Database::_checkOnlyDatabase()
* @uses PMA_List_Database::_retrieve()
* @uses PMA_List_Database::_checkHideDatabase()
* @uses exchangeArray()
*/
public function build()
{
@ -179,17 +157,6 @@ require_once './libraries/List.class.php';
/**
* checks the only_db configuration
*
* @uses PMA_List_Database::$_show_databases_disabled
* @uses PMA_List_Database::$items
* @uses PMA_List_Database::_retrieve()
* @uses PMA_unescape_mysql_wildcards()
* @uses preg_match()
* @uses array_diff()
* @uses array_merge()
* @uses is_array()
* @uses strlen()
* @uses is_string()
* @uses $cfg['Server']['only_db']
* @return boolean false if there is no only_db, otherwise true
*/
protected function _checkOnlyDatabase()
@ -240,9 +207,6 @@ require_once './libraries/List.class.php';
/**
* returns default item
*
* @uses PMA_List::getEmpty()
* @uses $GLOBALS['db']
* @uses strlen()
* @return string default item
*/
public function getDefault()
@ -257,18 +221,6 @@ require_once './libraries/List.class.php';
/**
* returns array with dbs grouped with extended infos
*
* @uses $GLOBALS['PMA_List_Database']
* @uses $GLOBALS['cfgRelation']['commwork']
* @uses $cfg['ShowTooltip']
* @uses $cfg['LeftFrameDBTree']
* @uses $cfg['LeftFrameDBSeparator']
* @uses $cfg['ShowTooltipAliasDB']
* @uses PMA_getTableCount()
* @uses PMA_getDbComment()
* @uses is_array()
* @uses implode()
* @uses strstr()
* @uses explode()
* @param integer $offset
* @param integer $count
* @return array db list
@ -347,7 +299,6 @@ require_once './libraries/List.class.php';
/**
* returns a part of the items
*
* @uses array_slice()
* @param integer $offset
* @param integer $count
* @return array some items
@ -472,7 +423,7 @@ require_once './libraries/List.class.php';
SELECT DISTINCT `Db` FROM `mysql`.`db`
WHERE `Select_priv` = 'Y'
AND `User`
IN ('" . PMA_sqlAddslashes($GLOBALS['cfg']['Server']['user']) . "', '')";
IN ('" . PMA_sqlAddSlashes($GLOBALS['cfg']['Server']['user']) . "', '')";
$tmp_mydbs = PMA_DBI_fetch_result($local_query, null, null,
$GLOBALS['controllink']);
if ($tmp_mydbs) {
@ -520,7 +471,7 @@ require_once './libraries/List.class.php';
} // end if
// 2. get allowed dbs from the "mysql.tables_priv" table
$local_query = 'SELECT DISTINCT Db FROM mysql.tables_priv WHERE Table_priv LIKE \'%Select%\' AND User = \'' . PMA_sqlAddslashes($GLOBALS['cfg']['Server']['user']) . '\'';
$local_query = 'SELECT DISTINCT Db FROM mysql.tables_priv WHERE Table_priv LIKE \'%Select%\' AND User = \'' . PMA_sqlAddSlashes($GLOBALS['cfg']['Server']['user']) . '\'';
$rs = PMA_DBI_try_query($local_query, $GLOBALS['controllink']);
if ($rs && @PMA_DBI_num_rows($rs)) {
while ($row = PMA_DBI_fetch_assoc($rs)) {

View File

@ -137,13 +137,6 @@ class PMA_Message
/**
* Constructor
*
* @uses PMA_Message::setNumber()
* @uses PMA_Message::setString()
* @uses PMA_Message::setParams()
* @uses PMA_Message::NOTICE
* @uses PMA_Message::SANITIZE_NONE
* @uses PMA_Message::SANITIZE_STRING
* @uses PMA_Message::SANITIZE_PARAMS
* @param string $string
* @param integer $number
* @param array $params
@ -160,7 +153,6 @@ class PMA_Message
/**
* magic method: return string representation for this object
*
* @uses PMA_Message::getMessage()
* @return string
*/
public function __toString()
@ -174,8 +166,6 @@ class PMA_Message
* shorthand for getting a simple success message
*
* @static
* @uses PMA_Message as returned object
* @uses PMA_Message::SUCCESS
* @param string $string a localized string e.g. __('Your SQL query has been executed successfully')
* @return PMA_Message
*/
@ -194,8 +184,6 @@ class PMA_Message
* shorthand for getting a simple error message
*
* @static
* @uses PMA_Message as returned object
* @uses PMA_Message::ERROR
* @param string $string a localized string e.g. __('Error')
* @return PMA_Message
*/
@ -214,8 +202,6 @@ class PMA_Message
* shorthand for getting a simple notice message
*
* @static
* @uses PMA_Message as returned object
* @uses PMA_Message::NOTICE
* @param string $string a localized string e.g. __('The additional features for working with linked tables have been deactivated. To find out why click %shere%s.')
* @return PMA_Message
*/
@ -230,8 +216,6 @@ class PMA_Message
* shorthand for getting a customized message
*
* @static
* @uses PMA_Message as returned object
* @uses PMA_Message::setMessage()
* @param string $message
* @param integer $type
* @return PMA_Message
@ -249,9 +233,6 @@ class PMA_Message
* shorthand for getting a customized message
*
* @static
* @uses PMA_Message as returned object
* @uses PMA_Message::success()
* @uses PMA_Message::addParam()
* @param integer $rows Number of rows
* @return PMA_Message
*/
@ -268,9 +249,6 @@ class PMA_Message
* shorthand for getting a customized message
*
* @static
* @uses PMA_Message as returned object
* @uses PMA_Message::success()
* @uses PMA_Message::addParam()
* @param integer $rows Number of rows
* @return PMA_Message
*/
@ -287,9 +265,6 @@ class PMA_Message
* shorthand for getting a customized message
*
* @static
* @uses PMA_Message as returned object
* @uses PMA_Message::success()
* @uses PMA_Message::addParam()
* @param integer $rows Number of rows
* @return PMA_Message
*/
@ -306,8 +281,6 @@ class PMA_Message
* shorthand for getting a customized error message
*
* @static
* @uses PMA_Message::raw()
* @uses PMA_Message::ERROR
* @param string $message
* @return PMA_Message
*/
@ -322,8 +295,6 @@ class PMA_Message
* shorthand for getting a customized notice message
*
* @static
* @uses PMA_Message::raw()
* @uses PMA_Message::NOTICE
* @param string $message
* @return PMA_Message
*/
@ -338,8 +309,6 @@ class PMA_Message
* shorthand for getting a customized success message
*
* @static
* @uses PMA_Message::raw()
* @uses PMA_Message::SUCCESS
* @param string $message
* @return PMA_Message
*/
@ -352,9 +321,6 @@ class PMA_Message
* returns whether this message is a success message or not
* and optionaly makes this message a success message
*
* @uses PMA_Message::SUCCESS
* @uses PMA_Message::setNumber()
* @uses PMA_Message::getNumber()
* @param boolean $set
* @return boolean whether this is a success message or not
*/
@ -371,9 +337,6 @@ class PMA_Message
* returns whether this message is a notice message or not
* and optionally makes this message a notice message
*
* @uses PMA_Message::NOTICE
* @uses PMA_Message::setNumber()
* @uses PMA_Message::getNumber()
* @param boolean $set
* @return boolean whether this is a notice message or not
*/
@ -390,9 +353,6 @@ class PMA_Message
* returns whether this message is an error message or not
* and optionally makes this message an error message
*
* @uses PMA_Message::ERROR
* @uses PMA_Message::setNumber()
* @uses PMA_Message::getNumber()
* @param boolean $set
* @return boolean whether this is an error message or not
*/
@ -408,8 +368,6 @@ class PMA_Message
/**
* set raw message (overrides string)
*
* @uses PMA_Message::$_message to set it
* @uses PMA_Message::sanitize()
* @param string $message
* @param boolean $sanitize whether to sanitize $message or not
*/
@ -424,8 +382,6 @@ class PMA_Message
/**
* set string (does not take effect if raw message is set)
*
* @uses PMA_Message::$_string to set it
* @uses PMA_Message::sanitize()
* @param string $_string
* @param boolean $sanitize whether to sanitize $string or not
*/
@ -440,7 +396,6 @@ class PMA_Message
/**
* set message type number
*
* @uses PMA_Message::$_number to set it
* @param integer $number
*/
public function setNumber($number)
@ -458,9 +413,6 @@ class PMA_Message
* $message->addParam('<img src="img" />', false);
* </code>
*
* @uses htmlspecialchars()
* @uses PMA_Message::$_params to fill
* @uses PMA_Message::notice()
* @param mixed $param
* @param boolean $raw
*/
@ -478,8 +430,6 @@ class PMA_Message
/**
* add another string to be concatenated on displaying
*
* @uses PMA_Message::$_added_messages to fill
* @uses PMA_Message::notice()
* @param string $string to be added
* @param string $separator to use between this and previous string/message
*/
@ -492,7 +442,6 @@ class PMA_Message
/**
* add a bunch of messages at once
*
* @uses PMA_Message::addMessage()
* @param array $messages to be added
* @param string $separator to use between this and previous string/message
*/
@ -506,8 +455,6 @@ class PMA_Message
/**
* add another raw message to be concatenated on displaying
*
* @uses PMA_Message::$_added_messages to fill
* @uses PMA_Message::rawNotice()
* @param mixed $message to be added
* @param string $separator to use between this and previous string/message
*/
@ -527,8 +474,6 @@ class PMA_Message
/**
* set all params at once, usually used in conjunction with string
*
* @uses PMA_Message::sanitize()
* @uses PMA_Message::$_params to set
* @param array $params
* @param boolean $sanitize
*/
@ -543,7 +488,6 @@ class PMA_Message
/**
* return all parameters
*
* @uses PMA_Message::$_params as return value
* @return array
*/
public function getParams()
@ -554,7 +498,6 @@ class PMA_Message
/**
* return all added messages
*
* @uses PMA_Message::$_added_messages as return value
* @return array
*/
public function getAddedMessages()
@ -566,9 +509,6 @@ class PMA_Message
* Sanitizes $message
*
* @static
* @uses is_array()
* @uses htmlspecialchars()
* @uses PMA_Message::sanitize() recursive
* @param mixed $message the message(s)
* @return mixed the sanitized message(s)
* @access public
@ -591,7 +531,6 @@ class PMA_Message
* for formatting
*
* @static
* @uses PMA_sanitize
* @param string $message the message
* @return string the decoded message
* @access public
@ -604,11 +543,6 @@ class PMA_Message
/**
* wrapper for sprintf()
*
* @uses sprintf()
* @uses func_get_args()
* @uses is_array()
* @uses array_unshift()
* @uses call_user_func_array()
* @return string formatted
*/
static public function format()
@ -625,11 +559,6 @@ class PMA_Message
/**
* returns unique PMA_Message::$_hash, if not exists it will be created
*
* @uses PMA_Message::$_hash as return value and to set it if required
* @uses PMA_Message::getNumber()
* @uses PMA_Message::$_string
* @uses PMA_Message::$_message
* @uses md5()
* @return string PMA_Message::$_hash
*/
public function getHash()
@ -648,13 +577,6 @@ class PMA_Message
/**
* returns compiled message
*
* @uses PMA_Message::$_message as return value
* @uses PMA_Message::getString()
* @uses PMA_Message::getParams()
* @uses PMA_Message::format()
* @uses PMA_Message::decodeBB()
* @uses PMA_Message::getAddedMessages()
* @uses strlen()
* @return string complete message
*/
public function getMessage()
@ -688,7 +610,6 @@ class PMA_Message
/**
* returns PMA_Message::$_string
*
* @uses PMA_Message::$_string as return value
* @return string PMA_Message::$_string
*/
public function getString()
@ -699,7 +620,6 @@ class PMA_Message
/**
* returns PMA_Message::$_number
*
* @uses PMA_Message::$_number as return value
* @return integer PMA_Message::$_number
*/
public function getNumber()
@ -710,8 +630,6 @@ class PMA_Message
/**
* returns level of message
*
* @uses PMA_Message::$level
* @uses PMA_Message::getNumber()
* @return string level of message
*/
public function getLevel()
@ -722,8 +640,6 @@ class PMA_Message
/**
* Displays the message in HTML
*
* @uses PMA_Message::getDisplay()
* @uses PMA_Message::isDisplayed()
*/
public function display()
{
@ -734,8 +650,6 @@ class PMA_Message
/**
* returns HTML code for displaying this message
*
* @uses PMA_Message::getLevel()
* @uses PMA_Message::getMessage()
*
* @return string whole message box
*/
@ -748,7 +662,6 @@ class PMA_Message
/**
* sets and returns whether the message was displayed or not
*
* @uses PMA_Message::$_is_displayed to set it and/or return it
* @param boolean $is_displayed
* @return boolean PMA_Message::$_is_displayed
*/

View File

@ -82,10 +82,6 @@ class PMA
/**
* Accessor to PMA::$databases
*
* @uses PMA::$databases
* @uses PMA::$userlink
* @uses PMA::$controllink
* @uses PMA_List_Database
* @return PMA_List_Databases
*/
public function getDatabaseList()

View File

@ -17,7 +17,6 @@ class PMA_Partition
* returns array of partition names for a specific db/table
*
* @access public
* @uses PMA_DBI_fetch_result()
* @return array of partition names
*/
static public function getPartitionNames($db, $table)
@ -36,7 +35,6 @@ class PMA_Partition
* @staticvar boolean $have_partitioning
* @staticvar boolean $already_checked
* @access public
* @uses PMA_DBI_fetch_result()
* @return boolean
*/
static public function havePartitioning()

View File

@ -46,11 +46,12 @@ class PMA_RecentTable
$this->pma_table = PMA_backquote($GLOBALS['cfg']['Server']['pmadb']) .".".
PMA_backquote($GLOBALS['cfg']['Server']['recent']);
}
if (! isset($_SESSION['tmp_user_values']['recent_tables'])) {
$_SESSION['tmp_user_values']['recent_tables'] =
$server_id = $GLOBALS['server'];
if (! isset($_SESSION['tmp_user_values']['recent_tables'][$server_id])) {
$_SESSION['tmp_user_values']['recent_tables'][$server_id] =
isset($this->pma_table) ? $this->getFromDb() : array();
}
$this->tables =& $_SESSION['tmp_user_values']['recent_tables'];
$this->tables =& $_SESSION['tmp_user_values']['recent_tables'][$server_id];
}
/**
@ -69,10 +70,6 @@ class PMA_RecentTable
/**
* Returns recently used tables from phpMyAdmin database.
*
* @uses $pma_table
* @uses PMA_query_as_controluser()
* @uses PMA_DBI_fetch_array()
* @uses json_decode()
*
* @return array
*/
@ -94,9 +91,6 @@ class PMA_RecentTable
/**
* Save recent tables into phpMyAdmin database.
*
* @uses PMA_DBI_try_query()
* @uses json_decode()
* @uses PMA_Message
*
* @return true|PMA_Message
*/
@ -105,7 +99,7 @@ class PMA_RecentTable
$username = $GLOBALS['cfg']['Server']['user'];
$sql_query =
" REPLACE INTO " . $this->pma_table . " (`username`, `tables`)" .
" VALUES ('" . $username . "', '" . PMA_sqlAddslashes(json_encode($this->tables)) . "')";
" VALUES ('" . $username . "', '" . PMA_sqlAddSlashes(json_encode($this->tables)) . "')";
$success = PMA_DBI_try_query($sql_query, $GLOBALS['controllink']);
@ -163,9 +157,9 @@ class PMA_RecentTable
*/
public function getHtmlSelect()
{
$html = '<input type="hidden" id="LeftDefaultTabTable" value="' .
$html = '<input type="hidden" name="goto" id="LeftDefaultTabTable" value="' .
$GLOBALS['cfg']['LeftDefaultTabTable'] . '" />';
$html .= '<select id="recentTable">';
$html .= '<select name="table" id="recentTable">';
$html .= $this->getHtmlSelectOption();
$html .= '</select>';

View File

@ -51,27 +51,23 @@ class PMA_StorageEngine
* @static
* @staticvar array $storage_engines storage engines
* @access public
* @uses PMA_DBI_fetch_result()
* @return array of storage engines
*/
static public function getStorageEngines()
{
static $storage_engines = null;
if (null !== $storage_engines) {
return $storage_engines;
if (null == $storage_engines) {
$storage_engines = PMA_DBI_fetch_result('SHOW STORAGE ENGINES', 'Engine');
}
return PMA_DBI_fetch_result('SHOW STORAGE ENGINES', 'Engine');
return $storage_engines;
}
/**
* returns HTML code for storage engine select box
*
* @static
* @uses PMA_StorageEngine::getStorageEngines()
* @uses strtolower()
* @uses htmlspecialchars()
* @param string $name The name of the select form element
* @param string $id The ID of the form field
* @param string $selected The selected engine
@ -88,7 +84,8 @@ class PMA_StorageEngine
foreach (PMA_StorageEngine::getStorageEngines() as $key => $details) {
if (!$offerUnavailableEngines
&& ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED')) {
&& ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
|| $details['Engine'] == 'PERFORMANCE_SCHEMA')) {
continue;
}
@ -109,9 +106,6 @@ class PMA_StorageEngine
*
* Loads the corresponding engine plugin, if available.
*
* @uses str_replace()
* @uses file_exists()
* @uses PMA_StorageEngine
* @param string $engine The engine ID
* @return object The engine plugin
*/
@ -133,7 +127,6 @@ class PMA_StorageEngine
* return true if given engine name is supported/valid, otherwise false
*
* @static
* @uses PMA_StorageEngine::getStorageEngines()
* @param string $engine name of engine
* @return boolean whether $engine is valid or not
*/
@ -149,13 +142,6 @@ class PMA_StorageEngine
/**
* returns as HTML table of the engine's server variables
*
* @uses PMA_ENGINE_DETAILS_TYPE_SIZE
* @uses PMA_ENGINE_DETAILS_TYPE_NUMERIC
* @uses PMA_StorageEngine::getVariablesStatus()
* @uses PMA_showHint()
* @uses PMA_formatByteDown()
* @uses PMA_formatNumber()
* @uses htmlspecialchars()
* @return string The table that was generated based on the retrieved information
*/
function getHtmlVariables()
@ -218,12 +204,6 @@ class PMA_StorageEngine
/**
* returns array with detailed info about engine specific server variables
*
* @uses PMA_ENGINE_DETAILS_TYPE_PLAINTEXT
* @uses PMA_StorageEngine::getVariables()
* @uses PMA_StorageEngine::getVariablesLikePattern()
* @uses PMA_DBI_query()
* @uses PMA_DBI_fetch_assoc()
* @uses PMA_DBI_free_result()
* @return array with detailed info about specific engine server variables
*/
function getVariablesStatus()
@ -268,15 +248,6 @@ class PMA_StorageEngine
/**
* Constructor
*
* @uses PMA_StorageEngine::getStorageEngines()
* @uses PMA_ENGINE_SUPPORT_DEFAULT
* @uses PMA_ENGINE_SUPPORT_YES
* @uses PMA_ENGINE_SUPPORT_DISABLED
* @uses PMA_ENGINE_SUPPORT_NO
* @uses $this->engine
* @uses $this->title
* @uses $this->comment
* @uses $this->support
* @param string $engine The engine ID
*/
function __construct($engine)
@ -312,7 +283,6 @@ class PMA_StorageEngine
* public String getTitle()
*
* Reveals the engine's title
* @uses $this->title
* @return string The title
*/
function getTitle()
@ -324,7 +294,6 @@ class PMA_StorageEngine
* public String getComment()
*
* Fetches the server's comment about this engine
* @uses $this->comment
* @return string The comment
*/
function getComment()
@ -335,13 +304,6 @@ class PMA_StorageEngine
/**
* public String getSupportInformationMessage()
*
* @uses PMA_ENGINE_SUPPORT_DEFAULT
* @uses PMA_ENGINE_SUPPORT_YES
* @uses PMA_ENGINE_SUPPORT_DISABLED
* @uses PMA_ENGINE_SUPPORT_NO
* @uses $this->support
* @uses $this->title
* @uses sprintf
* @return string The localized message.
*/
function getSupportInformationMessage()

View File

@ -72,7 +72,10 @@ class PMA_Table
}
/**
* returns table name
*
* @see PMA_Table::getName()
* @return string table name
*/
function __toString()
{
@ -92,7 +95,6 @@ class PMA_Table
/**
* sets table name
*
* @uses $this->name to set it
* @param string $table_name new table name
*/
function setName($table_name)
@ -103,8 +105,7 @@ class PMA_Table
/**
* returns table name
*
* @uses $this->name as return value
* @param boolean whether to quote name with backticks ``
* @param boolean $backquoted whether to quote name with backticks ``
* @return string table name
*/
function getName($backquoted = false)
@ -118,7 +119,6 @@ class PMA_Table
/**
* sets database name for this table
*
* @uses $this->db_name to set it
* @param string $db_name
*/
function setDbName($db_name)
@ -129,8 +129,7 @@ class PMA_Table
/**
* returns database name for this table
*
* @uses $this->db_name as return value
* @param boolean whether to quote name with backticks ``
* @param boolean $backquoted whether to quote name with backticks ``
* @return string database name for this table
*/
function getDbName($backquoted = false)
@ -144,7 +143,8 @@ class PMA_Table
/**
* returns full name for table, including database name
*
* @param boolean whether to quote name with backticks ``
* @param boolean $backquoted whether to quote name with backticks ``
* @return string
*/
function getFullName($backquoted = false)
{
@ -157,19 +157,14 @@ class PMA_Table
return PMA_Table::_isView($db, $table);
}
if (isset($this) && strpos($this->get('TABLE TYPE'), 'VIEW')) {
return true;
}
return false;
}
/**
* sets given $value for given $param
*
* @uses $this->settings to add or change value
* @param string param name
* @param mixed param value
* @param string $param name
* @param mixed $value value
*/
function set($param, $value)
{
@ -179,8 +174,7 @@ class PMA_Table
/**
* returns value for given setting/param
*
* @uses $this->settings to return value
* @param string name for value to return
* @param string $param name for value to return
* @return mixed value for $param
*/
function get($param)
@ -195,6 +189,8 @@ class PMA_Table
/**
* loads structure data
* (this function is work in progress? not yet used)
*
* @return boolean
*/
function loadStructure()
{
@ -221,6 +217,7 @@ class PMA_Table
$this->set($$each_create_option[0], $each_create_option[1]);
}
}
return true;
}
/**
@ -228,12 +225,9 @@ class PMA_Table
*
* @deprecated
* @todo see what we could do with the possible existence of $table_is_view
* @param string the database name
* @param string the table name
*
* @param string $db the database name
* @param string $table the table name
* @return boolean whether this is a view
*
* @access public
*/
static protected function _isView($db, $table)
{
@ -252,22 +246,17 @@ class PMA_Table
*
* If the ENGINE of the table is MERGE or MRG_MYISAM (alias), this is a merge table.
*
* @param string the database name
* @param string the table name
* @param string $db the database name
* @param string $table the table name
* @return boolean true if it is a merge table
* @access public
*/
static public function isMerge($db = null, $table = null)
{
$engine = null;
// if called static, with parameters
if (! empty($db) && ! empty($table)) {
$engine = PMA_Table::sGetStatusInfo($db, $table, 'ENGINE', null, true);
}
// if called as an object
// does not work yet, because $this->settings[] is not filled correctly
else if (! empty($this)) {
$engine = $this->get('ENGINE');
}
return (! empty($engine) && ((strtoupper($engine) == 'MERGE') || (strtoupper($engine) == 'MRG_MYISAM')));
}
@ -288,7 +277,7 @@ class PMA_Table
* @param string $table
* @param string $info
* @param boolean $force_read
* @param boolean if true, disables error message
* @param boolean $disable_error if true, disables error message
* @return mixed
*/
static public function sGetStatusInfo($db, $table, $info = null, $force_read = false, $disable_error = false)
@ -319,21 +308,19 @@ class PMA_Table
}
/**
* generates column/field specification for ALTER or CREATE TABLE syntax
* generates column specification for ALTER or CREATE TABLE syntax
*
* @todo move into class PMA_Column
* @todo on the interface, some js to clear the default value when the default
* current_timestamp is checked
* @static
* @todo on the interface, some js to clear the default value when the default current_timestamp is checked
* @param string $name name
* @param string $type type ('INT', 'VARCHAR', 'BIT', ...)
* @param string $length length ('2', '5,2', '', ...)
* @param string $attribute
* @param string $collation
* @param string $null with 'NULL' or 'NOT NULL'
* @param bool|string $null with 'NULL' or 'NOT NULL'
* @param string $default_type whether default is CURRENT_TIMESTAMP,
* NULL, NONE, USER_DEFINED
* @param boolean $default_value default value for USER_DEFINED default type
* @param string $default_value default value for USER_DEFINED default type
* @param string $extra 'AUTO_INCREMENT'
* @param string $comment field comment
* @param array &$field_primary list of fields for PRIMARY KEY
@ -343,10 +330,10 @@ class PMA_Table
static function generateFieldSpec($name, $type, $length = '', $attribute = '',
$collation = '', $null = false, $default_type = 'USER_DEFINED',
$default_value = '', $extra = '', $comment = '',
&$field_primary, $index, $default_orig = false)
&$field_primary, $index)
{
$is_timestamp = strpos(' ' . strtoupper($type), 'TIMESTAMP') == 1;
$is_timestamp = strpos(strtoupper($type), 'TIMESTAMP') !== false;
/**
* @todo include db-name
@ -384,7 +371,7 @@ class PMA_Table
} elseif ($type == 'BIT') {
$query .= ' DEFAULT b\'' . preg_replace('/[^01]/', '0', $default_value) . '\'';
} else {
$query .= ' DEFAULT \'' . PMA_sqlAddslashes($default_value) . '\'';
$query .= ' DEFAULT \'' . PMA_sqlAddSlashes($default_value) . '\'';
}
break;
case 'NULL' :
@ -427,7 +414,7 @@ class PMA_Table
} // end if (auto_increment)
}
if (!empty($comment)) {
$query .= " COMMENT '" . PMA_sqlAddslashes($comment) . "'";
$query .= " COMMENT '" . PMA_sqlAddSlashes($comment) . "'";
}
return $query;
} // end function
@ -438,14 +425,13 @@ class PMA_Table
* Revision 13 July 2001: Patch for limiting dump size from
* vinay@sanisoft.com & girish@sanisoft.com
*
* @param string the current database name
* @param string the current table name
* @param boolean whether to force an exact count
* @param string $db the current database name
* @param string $table the current table name
* @param bool $force_exact whether to force an exact count
* @param bool $is_view
*
* @return mixed the number of records if "retain" param is true,
* otherwise true
*
* @access public
*/
static public function countRecords($db, $table, $force_exact = false, $is_view = null)
{
@ -510,7 +496,25 @@ class PMA_Table
} // end of the 'PMA_Table::countRecords()' function
/**
* Generates column specification for ALTER syntax
*
* @see PMA_Table::generateFieldSpec()
* @param string $oldcol old column name
* @param string $newcol new column name
* @param string $type type ('INT', 'VARCHAR', 'BIT', ...)
* @param string $length length ('2', '5,2', '', ...)
* @param string $attribute
* @param string $collation
* @param bool|string $null with 'NULL' or 'NOT NULL'
* @param string $default_type whether default is CURRENT_TIMESTAMP,
* NULL, NONE, USER_DEFINED
* @param string $default_value default value for USER_DEFINED default type
* @param string $extra 'AUTO_INCREMENT'
* @param string $comment field comment
* @param array &$field_primary list of fields for PRIMARY KEY
* @param string $index
* @param mixed $default_orig
* @return string field specification
*/
static public function generateAlter($oldcol, $newcol, $type, $length,
$attribute, $collation, $null, $default_type, $default_value,
@ -525,19 +529,15 @@ class PMA_Table
/**
* Inserts existing entries in a PMA_* table by reading a value from an old entry
*
* @param string The array index, which Relation feature to check
* ('relwork', 'commwork', ...)
* @param string The array index, which PMA-table to update
* ('bookmark', 'relation', ...)
* @param array Which fields will be SELECT'ed from the old entry
* @param array Which fields will be used for the WHERE query
* (array('FIELDNAME' => 'FIELDVALUE'))
* @param array Which fields will be used as new VALUES. These are the important
* keys which differ from the old entry.
* (array('FIELDNAME' => 'NEW FIELDVALUE'))
* @global string relation variable
*
* @global relation variable
* @param string $work The array index, which Relation feature to check ('relwork', 'commwork', ...)
* @param string $pma_table The array index, which PMA-table to update ('bookmark', 'relation', ...)
* @param array $get_fields Which fields will be SELECT'ed from the old entry
* @param array $where_fields Which fields will be used for the WHERE query (array('FIELDNAME' => 'FIELDVALUE'))
* @param array $new_fields Which fields will be used as new VALUES. These are the important
* keys which differ from the old entry.
* (array('FIELDNAME' => 'NEW FIELDVALUE'))
* @return int|true
*/
static public function duplicateInfo($work, $pma_table, $get_fields, $where_fields,
$new_fields)
@ -555,14 +555,14 @@ class PMA_Table
$where_parts = array();
foreach ($where_fields as $_where => $_value) {
$where_parts[] = PMA_backquote($_where) . ' = \''
. PMA_sqlAddslashes($_value) . '\'';
. PMA_sqlAddSlashes($_value) . '\'';
}
$new_parts = array();
$new_value_parts = array();
foreach ($new_fields as $_where => $_value) {
$new_parts[] = PMA_backquote($_where);
$new_value_parts[] = PMA_sqlAddslashes($_value);
$new_value_parts[] = PMA_sqlAddSlashes($_value);
}
$table_copy_query = '
@ -580,7 +580,7 @@ class PMA_Table
$value_parts = array();
foreach ($table_copy_row as $_key => $_val) {
if (isset($row_fields[$_key]) && $row_fields[$_key] == 'cc') {
$value_parts[] = PMA_sqlAddslashes($_val);
$value_parts[] = PMA_sqlAddSlashes($_val);
}
}
@ -609,6 +609,14 @@ class PMA_Table
/**
* Copies or renames table
*
* @param $source_db
* @param $source_table
* @param $target_db
* @param $target_table
* @param $what
* @param $move
* @param $mode
* @return bool
*/
static public function moveCopy($source_db, $source_table, $target_db, $target_table, $what, $move, $mode)
{
@ -811,10 +819,10 @@ class PMA_Table
// Move old entries from PMA-DBs to new table
if ($GLOBALS['cfgRelation']['commwork']) {
$remove_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['column_info'])
. ' SET table_name = \'' . PMA_sqlAddslashes($target_table) . '\', '
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
. ' SET table_name = \'' . PMA_sqlAddSlashes($target_table) . '\', '
. ' db_name = \'' . PMA_sqlAddSlashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($source_table) . '\'';
PMA_query_as_controluser($remove_query);
unset($remove_query);
}
@ -824,28 +832,28 @@ class PMA_Table
if ($GLOBALS['cfgRelation']['displaywork']) {
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['table_info'])
. ' SET db_name = \'' . PMA_sqlAddslashes($target_db) . '\', '
. ' table_name = \'' . PMA_sqlAddslashes($target_table) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
. ' SET db_name = \'' . PMA_sqlAddSlashes($target_db) . '\', '
. ' table_name = \'' . PMA_sqlAddSlashes($target_table) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($source_table) . '\'';
PMA_query_as_controluser($table_query);
unset($table_query);
}
if ($GLOBALS['cfgRelation']['relwork']) {
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['relation'])
. ' SET foreign_table = \'' . PMA_sqlAddslashes($target_table) . '\','
. ' foreign_db = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE foreign_db = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND foreign_table = \'' . PMA_sqlAddslashes($source_table) . '\'';
. ' SET foreign_table = \'' . PMA_sqlAddSlashes($target_table) . '\','
. ' foreign_db = \'' . PMA_sqlAddSlashes($target_db) . '\''
. ' WHERE foreign_db = \'' . PMA_sqlAddSlashes($source_db) . '\''
. ' AND foreign_table = \'' . PMA_sqlAddSlashes($source_table) . '\'';
PMA_query_as_controluser($table_query);
unset($table_query);
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['relation'])
. ' SET master_table = \'' . PMA_sqlAddslashes($target_table) . '\','
. ' master_db = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE master_db = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND master_table = \'' . PMA_sqlAddslashes($source_table) . '\'';
. ' SET master_table = \'' . PMA_sqlAddSlashes($target_table) . '\','
. ' master_db = \'' . PMA_sqlAddSlashes($target_db) . '\''
. ' WHERE master_db = \'' . PMA_sqlAddSlashes($source_db) . '\''
. ' AND master_table = \'' . PMA_sqlAddSlashes($source_table) . '\'';
PMA_query_as_controluser($table_query);
unset($table_query);
}
@ -859,24 +867,24 @@ class PMA_Table
if ($GLOBALS['cfgRelation']['pdfwork']) {
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['table_coords'])
. ' SET table_name = \'' . PMA_sqlAddslashes($target_table) . '\','
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
. ' SET table_name = \'' . PMA_sqlAddSlashes($target_table) . '\','
. ' db_name = \'' . PMA_sqlAddSlashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($source_table) . '\'';
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) . '\'';
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($target_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($target_table) . '\'';
$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']) . '\'';
. ' 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_controluser($table_query);
unset($table_query);
unset($tb_rs);
@ -886,10 +894,10 @@ class PMA_Table
if ($GLOBALS['cfgRelation']['designerwork']) {
$table_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['designer_coords'])
. ' SET table_name = \'' . PMA_sqlAddslashes($target_table) . '\','
. ' db_name = \'' . PMA_sqlAddslashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddslashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
. ' SET table_name = \'' . PMA_sqlAddSlashes($target_table) . '\','
. ' db_name = \'' . PMA_sqlAddSlashes($target_db) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($source_db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($source_table) . '\'';
PMA_query_as_controluser($table_query);
unset($table_query);
}
@ -906,8 +914,8 @@ class PMA_Table
column_name, ' . PMA_backquote('comment') . ($GLOBALS['cfgRelation']['mimework'] ? ', mimetype, transformation, transformation_options' : '') . '
FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['column_info']) . '
WHERE
db_name = \'' . PMA_sqlAddslashes($source_db) . '\' AND
table_name = \'' . PMA_sqlAddslashes($source_table) . '\'';
db_name = \'' . PMA_sqlAddSlashes($source_db) . '\' AND
table_name = \'' . PMA_sqlAddSlashes($source_table) . '\'';
$comments_copy_rs = PMA_query_as_controluser($comments_copy_query);
// Write every comment as new copied entry. [MIME]
@ -915,13 +923,13 @@ class PMA_Table
$new_comment_query = 'REPLACE INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['column_info'])
. ' (db_name, table_name, column_name, ' . PMA_backquote('comment') . ($GLOBALS['cfgRelation']['mimework'] ? ', mimetype, transformation, transformation_options' : '') . ') '
. ' VALUES('
. '\'' . PMA_sqlAddslashes($target_db) . '\','
. '\'' . PMA_sqlAddslashes($target_table) . '\','
. '\'' . PMA_sqlAddslashes($comments_copy_row['column_name']) . '\''
. ($GLOBALS['cfgRelation']['mimework'] ? ',\'' . PMA_sqlAddslashes($comments_copy_row['comment']) . '\','
. '\'' . PMA_sqlAddslashes($comments_copy_row['mimetype']) . '\','
. '\'' . PMA_sqlAddslashes($comments_copy_row['transformation']) . '\','
. '\'' . PMA_sqlAddslashes($comments_copy_row['transformation_options']) . '\'' : '')
. '\'' . PMA_sqlAddSlashes($target_db) . '\','
. '\'' . PMA_sqlAddSlashes($target_table) . '\','
. '\'' . PMA_sqlAddSlashes($comments_copy_row['column_name']) . '\''
. ($GLOBALS['cfgRelation']['mimework'] ? ',\'' . PMA_sqlAddSlashes($comments_copy_row['comment']) . '\','
. '\'' . PMA_sqlAddSlashes($comments_copy_row['mimetype']) . '\','
. '\'' . PMA_sqlAddSlashes($comments_copy_row['transformation']) . '\','
. '\'' . PMA_sqlAddSlashes($comments_copy_row['transformation_options']) . '\'' : '')
. ')';
PMA_query_as_controluser($new_comment_query);
} // end while
@ -1014,10 +1022,10 @@ class PMA_Table
/**
* renames table
*
* @param string new table name
* @param string new database name
* @param boolean is this for a VIEW rename?
* @return boolean success
* @param string $new_name new table name
* @param string $new_db new database name
* @param bool $is_view is this for a VIEW rename?
* @return bool success
*/
function rename($new_name, $new_db = null, $is_view = false)
{
@ -1071,10 +1079,10 @@ class PMA_Table
$remove_query = '
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. PMA_backquote($GLOBALS['cfgRelation']['column_info']) . '
SET `db_name` = \'' . PMA_sqlAddslashes($new_db) . '\',
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
SET `db_name` = \'' . PMA_sqlAddSlashes($new_db) . '\',
`table_name` = \'' . PMA_sqlAddSlashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddSlashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddSlashes($old_name) . '\'';
PMA_query_as_controluser($remove_query);
unset($remove_query);
}
@ -1083,10 +1091,10 @@ class PMA_Table
$table_query = '
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. PMA_backquote($GLOBALS['cfgRelation']['table_info']) . '
SET `db_name` = \'' . PMA_sqlAddslashes($new_db) . '\',
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
SET `db_name` = \'' . PMA_sqlAddSlashes($new_db) . '\',
`table_name` = \'' . PMA_sqlAddSlashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddSlashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddSlashes($old_name) . '\'';
PMA_query_as_controluser($table_query);
unset($table_query);
}
@ -1095,19 +1103,19 @@ class PMA_Table
$table_query = '
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. PMA_backquote($GLOBALS['cfgRelation']['relation']) . '
SET `foreign_db` = \'' . PMA_sqlAddslashes($new_db) . '\',
`foreign_table` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `foreign_db` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `foreign_table` = \'' . PMA_sqlAddslashes($old_name) . '\'';
SET `foreign_db` = \'' . PMA_sqlAddSlashes($new_db) . '\',
`foreign_table` = \'' . PMA_sqlAddSlashes($new_name) . '\'
WHERE `foreign_db` = \'' . PMA_sqlAddSlashes($old_db) . '\'
AND `foreign_table` = \'' . PMA_sqlAddSlashes($old_name) . '\'';
PMA_query_as_controluser($table_query);
$table_query = '
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. PMA_backquote($GLOBALS['cfgRelation']['relation']) . '
SET `master_db` = \'' . PMA_sqlAddslashes($new_db) . '\',
`master_table` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `master_db` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `master_table` = \'' . PMA_sqlAddslashes($old_name) . '\'';
SET `master_db` = \'' . PMA_sqlAddSlashes($new_db) . '\',
`master_table` = \'' . PMA_sqlAddSlashes($new_name) . '\'
WHERE `master_db` = \'' . PMA_sqlAddSlashes($old_db) . '\'
AND `master_table` = \'' . PMA_sqlAddSlashes($old_name) . '\'';
PMA_query_as_controluser($table_query);
unset($table_query);
}
@ -1116,10 +1124,10 @@ class PMA_Table
$table_query = '
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. PMA_backquote($GLOBALS['cfgRelation']['table_coords']) . '
SET `db_name` = \'' . PMA_sqlAddslashes($new_db) . '\',
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
SET `db_name` = \'' . PMA_sqlAddSlashes($new_db) . '\',
`table_name` = \'' . PMA_sqlAddSlashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddSlashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddSlashes($old_name) . '\'';
PMA_query_as_controluser($table_query);
unset($table_query);
}
@ -1128,10 +1136,10 @@ class PMA_Table
$table_query = '
UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
. PMA_backquote($GLOBALS['cfgRelation']['designer_coords']) . '
SET `db_name` = \'' . PMA_sqlAddslashes($new_db) . '\',
`table_name` = \'' . PMA_sqlAddslashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddslashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddslashes($old_name) . '\'';
SET `db_name` = \'' . PMA_sqlAddSlashes($new_db) . '\',
`table_name` = \'' . PMA_sqlAddSlashes($new_name) . '\'
WHERE `db_name` = \'' . PMA_sqlAddSlashes($old_db) . '\'
AND `table_name` = \'' . PMA_sqlAddSlashes($old_name) . '\'';
PMA_query_as_controluser($table_query);
unset($table_query);
}
@ -1147,14 +1155,14 @@ class PMA_Table
* returns an array with all columns with unqiue content, in fact these are
* all columns being single indexed in PRIMARY or UNIQUE
*
* f.e.
* e.g.
* - PRIMARY(id) // id
* - UNIQUE(name) // name
* - PRIMARY(fk_id1, fk_id2) // NONE
* - UNIQUE(x,y) // NONE
*
*
* @param boolean whether to quote name with backticks ``
* @param bool $backquoted whether to quote name with backticks ``
* @return array
*/
public function getUniqueColumns($backquoted = true)
@ -1178,9 +1186,10 @@ class PMA_Table
*
* returns an array with all columns make use of an index, in fact only
* first columns in an index
*
* e.g. index(col1, col2) would only return col1
*
* f.e. index(col1, col2) would only return col1
* @param boolean whether to quote name with backticks ``
* @param bool $backquoted whether to quote name with backticks ``
* @return array
*/
public function getIndexedColumns($backquoted = true)
@ -1201,7 +1210,7 @@ class PMA_Table
*
* returns an array with all columns
*
* @param boolean whether to quote name with backticks ``
* @param bool $backquoted whether to quote name with backticks ``
* @return array
*/
public function getColumns($backquoted = true)
@ -1220,9 +1229,6 @@ class PMA_Table
/**
* Return UI preferences for this table from phpMyAdmin database.
*
* @uses PMA_query_as_controluser()
* @uses PMA_DBI_fetch_array()
* @uses json_decode()
*
* @return array
*/
@ -1249,10 +1255,6 @@ class PMA_Table
/**
* Save this table's UI preferences into phpMyAdmin database.
*
* @uses PMA_DBI_try_query()
* @uses json_decode()
* @uses PMA_Message
*
* @return true|PMA_Message
*/
protected function saveUiPrefsToDb()
@ -1264,7 +1266,7 @@ class PMA_Table
$sql_query =
" REPLACE INTO " . $pma_table .
" VALUES ('" . $username . "', '" . $this->db_name . "', '" .
$this->name . "', '" . PMA_sqlAddslashes(json_encode($this->uiprefs)) . "')";
$this->name . "', '" . PMA_sqlAddSlashes(json_encode($this->uiprefs)) . "')";
$success = PMA_DBI_try_query($sql_query, $GLOBALS['controllink']);
@ -1282,19 +1284,19 @@ class PMA_Table
* If pmadb and table_uiprefs is set, it will load the UI preferences from
* phpMyAdmin database.
*
* @uses getUiPrefsFromDb()
*/
protected function loadUiPrefs()
{
$server_id = $GLOBALS['server'];
// set session variable if it's still undefined
if (! isset($_SESSION['tmp_user_values']['table_uiprefs'][$this->db_name][$this->name])) {
$_SESSION['tmp_user_values']['table_uiprefs'][$this->db_name][$this->name] =
if (! isset($_SESSION['tmp_user_values']['table_uiprefs'][$server_id][$this->db_name][$this->name])) {
$_SESSION['tmp_user_values']['table_uiprefs'][$server_id][$this->db_name][$this->name] =
// check whether we can get from pmadb
(strlen($GLOBALS['cfg']['Server']['pmadb'])
&& strlen($GLOBALS['cfg']['Server']['table_uiprefs'])) ?
$this->getUiPrefsFromDb() : array();
}
$this->uiprefs =& $_SESSION['tmp_user_values']['table_uiprefs'][$this->db_name][$this->name];
$this->uiprefs =& $_SESSION['tmp_user_values']['table_uiprefs'][$server_id][$this->db_name][$this->name];
}
/**
@ -1304,7 +1306,6 @@ class PMA_Table
* - PROP_SORTED_COLUMN
* - PROP_COLUMN_ORDER
*
* @uses loadUiPrefs()
*
* @param string $property
* @return mixed
@ -1337,7 +1338,7 @@ class PMA_Table
} else if ($property == self::PROP_COLUMN_ORDER) {
if (isset($this->uiprefs[$property])) {
// check if the table has not been modified
if (self::sGetStatusInfo($this->db_name, $this->name, 'CREATE_TIME') ==
if (self::sGetStatusInfo($this->db_name, $this->name, 'Create_time') ==
$this->uiprefs['CREATE_TIME']) {
return $this->uiprefs[$property];
} else {
@ -1373,7 +1374,7 @@ class PMA_Table
}
// we want to save the create time if the property is PROP_COLUMN_ORDER
if ($property == self::PROP_COLUMN_ORDER) {
$curr_create_time = self::sGetStatusInfo($this->db_name, $this->name, 'CREATE_TIME');
$curr_create_time = self::sGetStatusInfo($this->db_name, $this->name, 'Create_time');
if (isset($table_create_time) &&
$table_create_time == $curr_create_time) {
$this->uiprefs['CREATE_TIME'] = $curr_create_time;
@ -1398,6 +1399,7 @@ class PMA_Table
* Remove a property from UI preferences.
*
* @param string $property
* @return true|PMA_Message
*/
public function removeUiProp($property)
{
@ -1412,6 +1414,7 @@ class PMA_Table
return $this->saveUiprefsToDb();
}
}
return true;
}
}
?>

View File

@ -69,13 +69,6 @@ class PMA_Theme {
/**
* @access public
* @uses PMA_Theme::getPath()
* @uses PMA_Theme::$mtime_info
* @uses PMA_Theme::setVersion()
* @uses PMA_Theme::setName()
* @uses filemtime()
* @uses filesize()
* @uses file_exists()
* @return boolean whether loading them info was successful or not
*/
function loadInfo()
@ -114,10 +107,6 @@ class PMA_Theme {
*
* @static
* @access public
* @uses PMA_Theme
* @uses PMA_Theme::setPath()
* @uses PMA_Theme::loadInfo()
* @uses PMA_Theme::checkImgPath()
* @param string $folder path to theme
* @return object PMA_Theme
*/
@ -140,12 +129,6 @@ class PMA_Theme {
* checks image path for existance - if not found use img from original theme
*
* @access public
* @uses PMA_Theme::getPath()
* @uses PMA_Theme::setImgPath()
* @uses PMA_Theme::getName()
* @uses $GLOBALS['cfg']['ThemePath']
* @uses is_dir()
* @uses sprintf()
*/
function checkImgPath()
{
@ -167,7 +150,6 @@ class PMA_Theme {
* returns path to theme
*
* @access public
* @uses PMA_Theme::$path as return value
* @return string $path path to theme
*/
function getPath()
@ -179,7 +161,6 @@ class PMA_Theme {
* returns layout file
*
* @access public
* @uses PMA_Theme::getPath()
* @return string layout file
*/
function getLayoutFile()
@ -191,7 +172,6 @@ class PMA_Theme {
* set path to theme
*
* @access public
* @uses PMA_Theme::$path to set it
* @param string $path path to theme
*/
function setPath($path)
@ -203,7 +183,6 @@ class PMA_Theme {
* sets version
*
* @access public
* @uses PMA_Theme::$version
* @param string new version
*/
function setVersion($version)
@ -215,7 +194,6 @@ class PMA_Theme {
* returns version
*
* @access public
* @uses PMA_Theme::$version
* @return string version
*/
function getVersion()
@ -228,8 +206,6 @@ class PMA_Theme {
* returns true if theme version is equal or higher to $version
*
* @access public
* @uses version_compare()
* @uses PMA_Theme::getVersion()
* @param string $version version to compare to
* @return boolean
*/
@ -242,8 +218,6 @@ class PMA_Theme {
* sets name
*
* @access public
* @uses PMA_Theme::$name to set it
* @uses trim()
* @param string $name new name
*/
function setName($name)
@ -255,7 +229,6 @@ class PMA_Theme {
* returns name
*
* @access public
* @uses PMA_Theme::$name as return value
* @return string name
*/
function getName()
@ -267,7 +240,6 @@ class PMA_Theme {
* sets id
*
* @access public
* @uses PMA_Theme::$id to set it
* @param string $id new id
*/
function setId($id)
@ -279,7 +251,6 @@ class PMA_Theme {
* returns id
*
* @access public
* @uses PMA_Theme::$id as return value
* @return string id
*/
function getId()
@ -289,7 +260,6 @@ class PMA_Theme {
/**
* @access public
* @uses PMA_Theme::$img_path to set it
* @param string path to images for this theme
*/
function setImgPath($path)
@ -299,7 +269,6 @@ class PMA_Theme {
/**
* @access public
* @uses PMA_Theme::$img_path as retunr value
* @return string image path for this theme
*/
function getImgPath()
@ -311,11 +280,6 @@ class PMA_Theme {
* load css (send to stdout, normally the browser)
*
* @access public
* @uses PMA_Theme::getPath()
* @uses PMA_Theme::$types
* @uses PMA_SQP_buildCssData()
* @uses file_exists()
* @uses in_array()
* @param string $type left, right or print
*/
function loadCss(&$type)
@ -351,14 +315,6 @@ class PMA_Theme {
* prints out the preview for this theme
*
* @access public
* @uses PMA_Theme::getName()
* @uses PMA_Theme::getVersion()
* @uses PMA_Theme::getId()
* @uses PMA_Theme::getPath()
* @uses PMA_generate_common_url()
* @uses addslashes()
* @uses file_exists()
* @uses htmlspecialchars()
*/
function printPreview()
{

View File

@ -187,11 +187,6 @@ class PMA_Theme_Manager
/**
* save theme in cookie
*
* @uses $GLOBALS['PMA_Config']->setCookie();
* @uses PMA_Theme_Manager::getThemeCookieName()
* @uses PMA_Theme_Manager::$theme
* @uses PMA_Theme_Manager::$theme_default
* @uses PMA_Theme::getId()
*/
function setThemeCookie()
{
@ -331,8 +326,6 @@ class PMA_Theme_Manager
/**
* prints out preview for every theme
*
* @uses $this->themes
* @uses PMA_Theme::printPreview()
*/
function printPreviews()
{

Some files were not shown because too many files have changed in this diff Show More