Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin

This commit is contained in:
Marc Delisle
2010-04-29 12:34:32 -04:00
9 changed files with 43 additions and 24 deletions

View File

@@ -132,7 +132,6 @@ $cfg['SaveDir'] = '';
/**
* When using DB-based query history, how many entries should be kept?
*
* @global integer $cfg['QueryHistoryMax']
* default = 25
*/
//$cfg['QueryHistoryMax'] = 100;

View File

@@ -141,7 +141,7 @@ $realwidth = $form_column_width . 'ex';
* Enter description here...
*
* @param array $columns
* @param numeric $column_number
* @param integer $column_number
* @param string $selected
*/
function showColumnSelectCell($columns, $column_number, $selected = '')

View File

@@ -5,7 +5,9 @@
* @package phpMyAdmin
*/
// Run common work
/**
* Run common work
*/
require_once './libraries/common.inc.php';
require_once './libraries/Table.class.php';
@@ -95,7 +97,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);
@@ -122,7 +124,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) {
</tr>
<?php
if ($style == 'even') {
$style = 'odd';
$style = 'odd';
} else {
$style = 'even';
}
@@ -177,7 +179,7 @@ if (isset($my_tables)) {
</tr>
<?php
if ($style == 'even') {
$style = 'odd';
$style = 'odd';
} else {
$style = 'even';
}

View File

@@ -12,10 +12,15 @@ if (! defined('PHPMYADMIN')) {
$ID_KEY = 'APC_UPLOAD_PROGRESS';
/**
* Returns upload status.
*
* This is implementation for APC extension.
*/
function PMA_getUploadStatus($id) {
global $SESSION_KEY;
global $ID_KEY;
if (trim($id) == "") {
return;
}
@@ -30,7 +35,7 @@ function PMA_getUploadStatus($id) {
);
}
$ret = $_SESSION[$SESSION_KEY][$id];
if (! PMA_import_apcCheck() || $ret['finished']) {
return $ret;
}
@@ -40,7 +45,7 @@ function PMA_getUploadStatus($id) {
$ret['finished'] = (bool)$status['done'];
$ret['total'] = $status['total'];
$ret['complete'] = $status['current'];
if ($ret['total'] > 0) {
$ret['percent'] = $ret['complete'] / $ret['total'] * 100;
}
@@ -51,7 +56,7 @@ function PMA_getUploadStatus($id) {
$_SESSION[$SESSION_KEY][$id] = $ret;
}
return $ret;
}

View File

@@ -12,10 +12,15 @@ if (! defined('PHPMYADMIN')) {
$ID_KEY = 'noplugin';
/**
* Returns upload status.
*
* This is implementation when no webserver support exists, so it returns just zeroes.
*/
function PMA_getUploadStatus($id) {
global $SESSION_KEY;
global $ID_KEY;
if (trim($id) == "") {
return;
}

View File

@@ -11,14 +11,19 @@ if (! defined('PHPMYADMIN')) {
$ID_KEY = "UPLOAD_IDENTIFIER";
/**
* Returns upload status.
*
* This is implementation for uploadprogress extension.
*/
function PMA_getUploadStatus($id) {
global $SESSION_KEY;
global $ID_KEY;
if (trim($id) == "") {
return;
}
if (! array_key_exists($id, $_SESSION[$SESSION_KEY])) {
$_SESSION[$SESSION_KEY][$id] = array(
'id' => $id,
@@ -30,11 +35,11 @@ function PMA_getUploadStatus($id) {
);
}
$ret = $_SESSION[$SESSION_KEY][$id];
if (! PMA_import_uploadprogressCheck() || $ret['finished']) {
return $ret;
}
$status = uploadprogress_get_info($id);
if ($status) {
@@ -45,7 +50,7 @@ function PMA_getUploadStatus($id) {
}
$ret['total'] = $status['bytes_total'];
$ret['complete'] = $status['bytes_uploaded'];
if ($ret['total'] > 0) {
$ret['percent'] = $ret['complete'] / $ret['total'] * 100;
}
@@ -59,9 +64,9 @@ function PMA_getUploadStatus($id) {
'plugin' => $ID_KEY
);
}
$_SESSION[$SESSION_KEY][$id] = $ret;
return $ret;
}
?>

View File

@@ -9,6 +9,9 @@
* @package phpMyAdmin
*/
/**
* Logs user information to webserver logs.
*/
function PMA_log_user($user, $status = 'ok'){
if (function_exists('apache_note')) {
apache_note('userID', $user);

View File

@@ -139,7 +139,7 @@ function PMA_langSet(&$lang)
*
* @return bool true on success, otherwise false
*
* @global array $available_languages
* @uses $GLOBALS['available_languages'] to check $lang
*
* @access private
*/

View File

@@ -99,11 +99,11 @@ class PMA_PDF extends TCPDF {
/**
* Sets the scaling factor, defines minimum coordinates and margins
*
* @param double $ The scaling factor
* @param double $ The minimum X coordinate
* @param double $ The minimum Y coordinate
* @param double $ The left margin
* @param double $ The top margin
* @param double scale The scaling factor
* @param double x_min The minimum X coordinate
* @param double y_min The minimum Y coordinate
* @param double l_marg The left margin
* @param double t_marg The top margin
* @access public
*/
function PMA_PDF_setScale($scale = 1, $x_min = 0, $y_min = 0, $l_marg = -1, $t_marg = -1)