Fix some phpdoc errors.

This commit is contained in:
Michal Čihař
2008-11-24 09:55:30 +00:00
parent 610cc27c57
commit 9561f56875
19 changed files with 182 additions and 140 deletions

View File

@@ -5,6 +5,10 @@
* @version 1.0 * @version 1.0
* @package BLOBStreaming * @package BLOBStreaming
*/ */
/**
* Core library.
*/
require_once './libraries/common.inc.php'; require_once './libraries/common.inc.php';
/** /**
@@ -49,7 +53,7 @@
$query .= " WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'"; $query .= " WHERE Blob_url='" . PMA_sqlAddslashes($bsReference) . "'";
$result = PMA_DBI_query($query); $result = PMA_DBI_query($query);
// if record exists // if record exists
if ($data = PMA_DBI_fetch_assoc($result)) if ($data = PMA_DBI_fetch_assoc($result))
{ {

View File

@@ -5,6 +5,10 @@
* @version 1.0 * @version 1.0
* @package BLOBStreaming * @package BLOBStreaming
*/ */
/**
* Core library.
*/
require_once './libraries/common.inc.php'; require_once './libraries/common.inc.php';
/* /*
@@ -13,7 +17,7 @@
$mediaType = isset($_REQUEST['media_type']) ? $_REQUEST['media_type'] : NULL; $mediaType = isset($_REQUEST['media_type']) ? $_REQUEST['media_type'] : NULL;
/* /*
* @var string indicates whether media type is of custom type * @var string indicates whether media type is of custom type
*/ */
$customType = isset($_REQUEST['custom_type']) ? $_REQUEST['custom_type'] : false; $customType = isset($_REQUEST['custom_type']) ? $_REQUEST['custom_type'] : false;

View File

@@ -4,6 +4,7 @@
* file upload functions * file upload functions
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin
*/ */
/** /**
@@ -155,7 +156,6 @@ class PMA_File
* @access public * @access public
* @uses PMA_File::$_name * @uses PMA_File::$_name
* @param string $name file name * @param string $name file name
* @access public
*/ */
function setName($name) function setName($name)
{ {
@@ -1231,7 +1231,7 @@ class PMA_File
/** /**
* sets reference to most recent BLOB repository reference * sets reference to most recent BLOB repository reference
* *
* @access static public * @access public
* @param string - BLOB repository reference * @param string - BLOB repository reference
*/ */
static function setRecentBLOBReference($ref) static function setRecentBLOBReference($ref)
@@ -1242,7 +1242,7 @@ class PMA_File
/** /**
* retrieves reference to most recent BLOB repository reference * retrieves reference to most recent BLOB repository reference
* *
* @access static public * @access public
* @return string - most recent BLOB repository reference * @return string - most recent BLOB repository reference
*/ */
static function getRecentBLOBReference() static function getRecentBLOBReference()

View File

@@ -4,11 +4,12 @@
* holds the datasbe index class * holds the datasbe index class
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin
*/ */
/** /**
* @since phpMyAdmin 3.0.0 * @since phpMyAdmin 3.0.0
* *
*/ */
class PMA_Index class PMA_Index
{ {
@@ -18,29 +19,29 @@ class PMA_Index
* @var array * @var array
*/ */
protected static $_registry = array(); protected static $_registry = array();
/** /**
* @var string The name of the schema * @var string The name of the schema
*/ */
protected $_schema = ''; protected $_schema = '';
/** /**
* @var string The name of the table * @var string The name of the table
*/ */
protected $_table = ''; protected $_table = '';
/** /**
* @var string The name of the index * @var string The name of the index
*/ */
protected $_name = ''; protected $_name = '';
/** /**
* Columns in index * Columns in index
* *
* @var array * @var array
*/ */
protected $_columns = array(); protected $_columns = array();
/** /**
* The index method used (BTREE, FULLTEXT, HASH, RTREE). * The index method used (BTREE, FULLTEXT, HASH, RTREE).
* *
@@ -54,34 +55,34 @@ class PMA_Index
* @var string * @var string
*/ */
protected $_choice = ''; protected $_choice = '';
/** /**
* Various remarks. * Various remarks.
* *
* @var string * @var string
*/ */
protected $_remarks = ''; protected $_remarks = '';
/** /**
* Any comment provided for the index with a COMMENT attribute when the * Any comment provided for the index with a COMMENT attribute when the
* index was created. * index was created.
* *
* @var string * @var string
*/ */
protected $_comment = ''; protected $_comment = '';
/** /**
* @var integer 0 if the index cannot contain duplicates, 1 if it can. * @var integer 0 if the index cannot contain duplicates, 1 if it can.
*/ */
protected $_non_unique = 0; protected $_non_unique = 0;
/** /**
* Indicates how the key is packed. NULL if it is not. * Indicates how the key is packed. NULL if it is not.
* *
* @var string * @var string
*/ */
protected $_packed = null; protected $_packed = null;
/** /**
* Constructor * Constructor
* *
@@ -92,7 +93,7 @@ class PMA_Index
{ {
$this->set($params); $this->set($params);
} }
static public function singleton($schema, $table, $index_name = '') static public function singleton($schema, $table, $index_name = '')
{ {
PMA_Index::_loadIndexes($table, $schema); PMA_Index::_loadIndexes($table, $schema);
@@ -107,7 +108,7 @@ class PMA_Index
return PMA_Index::$_registry[$schema][$table][$index_name]; return PMA_Index::$_registry[$schema][$table][$index_name];
} }
} }
/** /**
* returns an array with all indexes from the given table * returns an array with all indexes from the given table
* *
@@ -120,14 +121,14 @@ class PMA_Index
static public function getFromTable($table, $schema) static public function getFromTable($table, $schema)
{ {
PMA_Index::_loadIndexes($table, $schema); PMA_Index::_loadIndexes($table, $schema);
if (isset(PMA_Index::$_registry[$schema][$table])) { if (isset(PMA_Index::$_registry[$schema][$table])) {
return PMA_Index::$_registry[$schema][$table]; return PMA_Index::$_registry[$schema][$table];
} else { } else {
return array(); return array();
} }
} }
/** /**
* return primary if set, false otherwise * return primary if set, false otherwise
* *
@@ -140,14 +141,14 @@ class PMA_Index
static public function getPrimary($table, $schema) static public function getPrimary($table, $schema)
{ {
PMA_Index::_loadIndexes($table, $schema); PMA_Index::_loadIndexes($table, $schema);
if (isset(PMA_Index::$_registry[$schema][$table]['PRIMARY'])) { if (isset(PMA_Index::$_registry[$schema][$table]['PRIMARY'])) {
return PMA_Index::$_registry[$schema][$table]['PRIMARY']; return PMA_Index::$_registry[$schema][$table]['PRIMARY'];
} else { } else {
return false; return false;
} }
} }
/** /**
* Load index data for table * Load index data for table
* *
@@ -165,7 +166,7 @@ class PMA_Index
if (isset(PMA_Index::$_registry[$schema][$table])) { if (isset(PMA_Index::$_registry[$schema][$table])) {
return true; return true;
} }
$_raw_indexes = PMA_DBI_fetch_result('SHOW INDEX FROM ' . PMA_backquote($schema) . '.' . PMA_backquote($table)); $_raw_indexes = PMA_DBI_fetch_result('SHOW INDEX FROM ' . PMA_backquote($schema) . '.' . PMA_backquote($table));
foreach ($_raw_indexes as $_each_index) { foreach ($_raw_indexes as $_each_index) {
$_each_index['Schema'] = $schema; $_each_index['Schema'] = $schema;
@@ -175,13 +176,13 @@ class PMA_Index
} else { } else {
$key = PMA_Index::$_registry[$schema][$table][$_each_index['Key_name']]; $key = PMA_Index::$_registry[$schema][$table][$_each_index['Key_name']];
} }
$key->addColumn($_each_index); $key->addColumn($_each_index);
} }
return true; return true;
} }
/** /**
* Add column to index * Add column to index
* *
@@ -195,11 +196,11 @@ class PMA_Index
$this->_columns[$params['Column_name']] = new PMA_Index_Column($params); $this->_columns[$params['Column_name']] = new PMA_Index_Column($params);
} }
} }
public function addColumns($columns) public function addColumns($columns)
{ {
$_columns = array(); $_columns = array();
if (isset($columns['names'])) { if (isset($columns['names'])) {
// coming from form // coming from form
// $columns[names][] // $columns[names][]
@@ -217,12 +218,12 @@ class PMA_Index
// ... // ...
$_columns = $columns; $_columns = $columns;
} }
foreach ($_columns as $column) { foreach ($_columns as $column) {
$this->addColumn($column); $this->addColumn($column);
} }
} }
/** /**
* Returns true if $column indexed in this index * Returns true if $column indexed in this index
* *
@@ -234,7 +235,7 @@ class PMA_Index
{ {
return isset($this->_columns[$column]); return isset($this->_columns[$column]);
} }
public function set($params) public function set($params)
{ {
if (isset($params['columns'])) { if (isset($params['columns'])) {
@@ -274,22 +275,22 @@ class PMA_Index
$this->_choice = 'INDEX'; $this->_choice = 'INDEX';
} }
} }
public function getColumnCount() public function getColumnCount()
{ {
return count($this->_columns); return count($this->_columns);
} }
public function getComment() public function getComment()
{ {
return $this->_comment; return $this->_comment;
} }
public function getRemarks() public function getRemarks()
{ {
return $this->_remarks; return $this->_remarks;
} }
public function getComments() public function getComments()
{ {
$comments = $this->getRemarks(); $comments = $this->getRemarks();
@@ -297,19 +298,19 @@ class PMA_Index
$comments .= "\n"; $comments .= "\n";
} }
$comments .= $this->getComment(); $comments .= $this->getComment();
return $comments; return $comments;
} }
public function getType() public function getType()
{ {
return $this->_type; return $this->_type;
} }
/** /**
* Return a list of all index choices * Return a list of all index choices
* *
* @return array index choices * @return array index choices
*/ */
static public function getIndexChoices() static public function getIndexChoices()
{ {
@@ -318,13 +319,13 @@ class PMA_Index
'INDEX', 'INDEX',
'UNIQUE', 'UNIQUE',
'FULLTEXT', 'FULLTEXT',
); );
} }
public function generateIndexSelector() public function generateIndexSelector()
{ {
$html_options = ''; $html_options = '';
foreach (PMA_Index::getIndexChoices() as $each_index_choice) { foreach (PMA_Index::getIndexChoices() as $each_index_choice) {
if ($each_index_choice === 'PRIMARY' if ($each_index_choice === 'PRIMARY'
&& $this->_choice !== 'PRIMARY' && $this->_choice !== 'PRIMARY'
@@ -336,15 +337,15 @@ class PMA_Index
. (($this->_choice == $each_index_choice) ? ' selected="selected"' : '') . (($this->_choice == $each_index_choice) ? ' selected="selected"' : '')
. '>'. $each_index_choice . '</option>' . "\n"; . '>'. $each_index_choice . '</option>' . "\n";
} }
return $html_options; return $html_options;
} }
public function getPacked() public function getPacked()
{ {
return $this->_packed; return $this->_packed;
} }
public function isPacked($as_text = false) public function isPacked($as_text = false)
{ {
if ($as_text) { if ($as_text) {
@@ -358,19 +359,19 @@ class PMA_Index
'1' => true, '1' => true,
); );
} }
if (null === $this->_packed) { if (null === $this->_packed) {
return $r[0]; return $r[0];
} }
return $this->_packed; return $this->_packed;
} }
public function getNonUnique() public function getNonUnique()
{ {
return $this->_non_unique; return $this->_non_unique;
} }
public function isUnique($as_text = false) public function isUnique($as_text = false)
{ {
if ($as_text) { if ($as_text) {
@@ -384,25 +385,25 @@ class PMA_Index
'1' => false, '1' => false,
); );
} }
return $r[$this->_non_unique]; return $r[$this->_non_unique];
} }
public function getName() public function getName()
{ {
return $this->_name; return $this->_name;
} }
public function setName($name) public function setName($name)
{ {
$this->_name = (string) $name; $this->_name = (string) $name;
} }
public function getColumns() public function getColumns()
{ {
return $this->_columns; return $this->_columns;
} }
/** /**
* Show index data * Show index data
* *
@@ -421,10 +422,10 @@ class PMA_Index
if (count($indexes) < 1) { if (count($indexes) < 1) {
return PMA_Message::warning('strNoIndex')->getDisplay(); return PMA_Message::warning('strNoIndex')->getDisplay();
} }
$r = ''; $r = '';
$r .= '<h2>' . $GLOBALS['strIndexes'] . ': '; $r .= '<h2>' . $GLOBALS['strIndexes'] . ': ';
$r .= PMA_showMySQLDocu('optimization', 'optimizing-database-structure'); $r .= PMA_showMySQLDocu('optimization', 'optimizing-database-structure');
$r .= '</h2>'; $r .= '</h2>';
$r .= '<table>'; $r .= '<table>';
@@ -445,13 +446,13 @@ class PMA_Index
$r .= '</tr>'; $r .= '</tr>';
$r .= '</thead>'; $r .= '</thead>';
$r .= '<tbody>'; $r .= '<tbody>';
$odd_row = true; $odd_row = true;
foreach ($indexes as $index) { foreach ($indexes as $index) {
$row_span = ' rowspan="' . $index->getColumnCount() . '" '; $row_span = ' rowspan="' . $index->getColumnCount() . '" ';
$r .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">'; $r .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
if (! $print_mode) { if (! $print_mode) {
$this_params = $GLOBALS['url_params']; $this_params = $GLOBALS['url_params'];
$this_params['index'] = $index->getName(); $this_params['index'] = $index->getName();
@@ -459,7 +460,7 @@ class PMA_Index
. ' <a href="tbl_indexes.php' . PMA_generate_common_url($this_params) . ' <a href="tbl_indexes.php' . PMA_generate_common_url($this_params)
. '">' . PMA_getIcon('b_edit.png', $GLOBALS['strEdit']) . '</a>' . '">' . PMA_getIcon('b_edit.png', $GLOBALS['strEdit']) . '</a>'
. '</td>' . "\n"; . '</td>' . "\n";
$this_params = $GLOBALS['url_params']; $this_params = $GLOBALS['url_params'];
if ($index->getName() == 'PRIMARY') { if ($index->getName() == 'PRIMARY') {
$this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY'; $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY';
@@ -470,19 +471,19 @@ class PMA_Index
$this_params['zero_rows'] = sprintf($GLOBALS['strIndexHasBeenDropped'], $index->getName()); $this_params['zero_rows'] = sprintf($GLOBALS['strIndexHasBeenDropped'], $index->getName());
$js_msg = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP INDEX ' . $index->getName()); $js_msg = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP INDEX ' . $index->getName());
} }
$r .= '<td ' . $row_span . '>' $r .= '<td ' . $row_span . '>'
. ' <a href="sql.php' . PMA_generate_common_url($this_params) . ' <a href="sql.php' . PMA_generate_common_url($this_params)
. '" onclick="return confirmLink(this, \'' . $js_msg . '\')">' . '" onclick="return confirmLink(this, \'' . $js_msg . '\')">'
. PMA_getIcon('b_drop.png', $GLOBALS['strDrop']) . '</a>' . PMA_getIcon('b_drop.png', $GLOBALS['strDrop']) . '</a>'
. '</td>' . "\n"; . '</td>' . "\n";
} }
$r .= '<th ' . $row_span . '>' . htmlspecialchars($index->getName()) . '</th>'; $r .= '<th ' . $row_span . '>' . htmlspecialchars($index->getName()) . '</th>';
$r .= '<td ' . $row_span . '>' . htmlspecialchars($index->getType()) . '</td>'; $r .= '<td ' . $row_span . '>' . htmlspecialchars($index->getType()) . '</td>';
$r .= '<td ' . $row_span . '>' . $index->isUnique(true) . '</td>'; $r .= '<td ' . $row_span . '>' . $index->isUnique(true) . '</td>';
$r .= '<td ' . $row_span . '>' . $index->isPacked(true) . '</td>'; $r .= '<td ' . $row_span . '>' . $index->isPacked(true) . '</td>';
foreach ($index->getColumns() as $column) { foreach ($index->getColumns() as $column) {
if ($column->getSeqInIndex() > 1) { if ($column->getSeqInIndex() > 1) {
$r .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">'; $r .= '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
@@ -497,24 +498,24 @@ class PMA_Index
$r .= '<td>' . htmlspecialchars($column->getNull()) . '</td>'; $r .= '<td>' . htmlspecialchars($column->getNull()) . '</td>';
if ($column->getSeqInIndex() == 1) { if ($column->getSeqInIndex() == 1) {
$r .= '<td ' . $row_span . '>' $r .= '<td ' . $row_span . '>'
. htmlspecialchars($index->getComments()) . '</td>'; . htmlspecialchars($index->getComments()) . '</td>';
} }
$r .= '</tr>'; $r .= '</tr>';
} // end foreach $index['Sequences'] } // end foreach $index['Sequences']
$odd_row = ! $odd_row; $odd_row = ! $odd_row;
} // end while } // end while
$r .= '</tbody>'; $r .= '</tbody>';
$r .= '</table>'; $r .= '</table>';
if (! $print_mode) { if (! $print_mode) {
$r .= PMA_Index::findDuplicates($table, $schema); $r .= PMA_Index::findDuplicates($table, $schema);
} }
return $r; return $r;
} }
public function getCompareData() public function getCompareData()
{ {
$data = array( $data = array(
@@ -522,14 +523,14 @@ class PMA_Index
'Packed' => $this->_packed, 'Packed' => $this->_packed,
'Index_type' => $this->_type, 'Index_type' => $this->_type,
); );
foreach ($this->_columns as $column) { foreach ($this->_columns as $column) {
$data['columns'][] = $column->getCompareData(); $data['columns'][] = $column->getCompareData();
} }
return $data; return $data;
} }
/** /**
* Function to check over array of indexes and look for common problems * Function to check over array of indexes and look for common problems
* *
@@ -547,15 +548,15 @@ class PMA_Index
static public function findDuplicates($table, $schema) static public function findDuplicates($table, $schema)
{ {
$indexes = PMA_Index::getFromTable($table, $schema); $indexes = PMA_Index::getFromTable($table, $schema);
$output = ''; $output = '';
// count($indexes) < 2: // count($indexes) < 2:
// there is no need to check if there less than two indexes // there is no need to check if there less than two indexes
if (count($indexes) < 2) { if (count($indexes) < 2) {
return $output; return $output;
} }
// remove last index from stack and ... // remove last index from stack and ...
while ($while_index = array_pop($indexes)) { while ($while_index = array_pop($indexes)) {
// ... compare with every remaining index in stack // ... compare with every remaining index in stack
@@ -563,15 +564,15 @@ class PMA_Index
if ($each_index->getCompareData() !== $while_index->getCompareData()) { if ($each_index->getCompareData() !== $while_index->getCompareData()) {
continue; continue;
} }
// did not find any difference // did not find any difference
// so it makes no sense to have this two equal indexes // so it makes no sense to have this two equal indexes
$message = PMA_Message::warning('strIndexesSeemEqual'); $message = PMA_Message::warning('strIndexesSeemEqual');
$message->addParam($each_index->getName()); $message->addParam($each_index->getName());
$message->addParam($while_index->getName()); $message->addParam($while_index->getName());
$output .= $message->getDisplay(); $output .= $message->getDisplay();
// there is no need to check any further indexes if we have already // there is no need to check any further indexes if we have already
// found that this one has a duplicate // found that this one has a duplicate
continue 2; continue 2;
@@ -587,49 +588,49 @@ class PMA_Index_Column
* @var string The column name * @var string The column name
*/ */
protected $_name = ''; protected $_name = '';
/** /**
* @var integer The column sequence number in the index, starting with 1. * @var integer The column sequence number in the index, starting with 1.
*/ */
protected $_seq_in_index = 1; protected $_seq_in_index = 1;
/** /**
* @var string How the column is sorted in the index. “A” (Ascending) or NULL (Not sorted) * @var string How the column is sorted in the index. “A” (Ascending) or NULL (Not sorted)
*/ */
protected $_collation = null; protected $_collation = null;
/** /**
* The number of indexed characters if the column is only partly indexed, * The number of indexed characters if the column is only partly indexed,
* NULL if the entire column is indexed. * NULL if the entire column is indexed.
* *
* @var integer * @var integer
*/ */
protected $_sub_part = null; protected $_sub_part = null;
/** /**
* Contains YES if the column may contain NULL. * Contains YES if the column may contain NULL.
* If not, the column contains NO. * If not, the column contains NO.
* *
* @var string * @var string
*/ */
protected $_null = ''; protected $_null = '';
/** /**
* An estimate of the number of unique values in the index. This is updated * An estimate of the number of unique values in the index. This is updated
* by running ANALYZE TABLE or myisamchk -a. Cardinality is counted based on * by running ANALYZE TABLE or myisamchk -a. Cardinality is counted based on
* statistics stored as integers, so the value is not necessarily exact even * statistics stored as integers, so the value is not necessarily exact even
* for small tables. The higher the cardinality, the greater the chance that * for small tables. The higher the cardinality, the greater the chance that
* MySQL uses the index when doing joins. * MySQL uses the index when doing joins.
* *
* @var integer * @var integer
*/ */
protected $_cardinality = 0; protected $_cardinality = 0;
public function __construct($params = array()) public function __construct($params = array())
{ {
$this->set($params); $this->set($params);
} }
public function set($params) public function set($params)
{ {
if (isset($params['Column_name'])) { if (isset($params['Column_name'])) {
@@ -651,32 +652,32 @@ class PMA_Index_Column
$this->_null = $params['Null']; $this->_null = $params['Null'];
} }
} }
public function getName() public function getName()
{ {
return $this->_name; return $this->_name;
} }
public function getCollation() public function getCollation()
{ {
return $this->_collation; return $this->_collation;
} }
public function getCardinality() public function getCardinality()
{ {
return $this->_cardinality; return $this->_cardinality;
} }
public function getNull() public function getNull()
{ {
return $this->_null; return $this->_null;
} }
public function getSeqInIndex() public function getSeqInIndex()
{ {
return $this->_seq_in_index; return $this->_seq_in_index;
} }
public function getSubPart() public function getSubPart()
{ {
return $this->_sub_part; return $this->_sub_part;

View File

@@ -29,6 +29,7 @@
* - authentication work * - authentication work
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin
*/ */
/** /**

View File

@@ -1404,9 +1404,9 @@ $cfg['Export']['sql_drop_table'] = false;
/** /**
* *
* *
* @global boolean $cfg['Export']['sql_if_not_exists']
* true by default for correct behavior when dealing with exporting * true by default for correct behavior when dealing with exporting
* of VIEWs and the stand-in table * of VIEWs and the stand-in table
* @global boolean $cfg['Export']['sql_if_not_exists']
*/ */
$cfg['Export']['sql_if_not_exists'] = true; $cfg['Export']['sql_if_not_exists'] = true;
@@ -2361,7 +2361,7 @@ $cfg['DBG'] = array();
/** /**
* Output executed queries and their execution times * Output executed queries and their execution times
* *
* @global boolean $cfg['DBG']['enable'] * @global boolean $cfg['DBG']['sql']
*/ */
$cfg['DBG']['sql'] = false; $cfg['DBG']['sql'] = false;
@@ -2369,7 +2369,7 @@ $cfg['DBG']['sql'] = false;
* Make the DBG stuff available * Make the DBG stuff available
* To use the following, please install the DBG extension from http://dd.cron.ru/dbg/ * To use the following, please install the DBG extension from http://dd.cron.ru/dbg/
* *
* @global boolean $cfg['DBG']['enable'] * @global boolean $cfg['DBG']['php']
*/ */
$cfg['DBG']['php'] = false; $cfg['DBG']['php'] = false;

View File

@@ -10,7 +10,9 @@ if (! defined('PHPMYADMIN')) {
exit; exit;
} }
// MySQL client API /**
* MySQL client API
*/
if (!defined('PMA_MYSQL_CLIENT_API')) { if (!defined('PMA_MYSQL_CLIENT_API')) {
$client_api = explode('.', mysqli_get_client_info()); $client_api = explode('.', mysqli_get_client_info());
define('PMA_MYSQL_CLIENT_API', (int)sprintf('%d%02d%02d', $client_api[0], $client_api[1], intval($client_api[2]))); define('PMA_MYSQL_CLIENT_API', (int)sprintf('%d%02d%02d', $client_api[0], $client_api[1], intval($client_api[2])));

View File

@@ -10,7 +10,9 @@ if (! defined('PHPMYADMIN')) {
exit; exit;
} }
// this gets executed twice so avoid a notice /**
* This gets executed twice so avoid a notice
*/
if (! defined('CG_FORMAT_NHIBERNATE_CS')) { if (! defined('CG_FORMAT_NHIBERNATE_CS')) {
define("CG_FORMAT_NHIBERNATE_CS", "NHibernate C# DO"); define("CG_FORMAT_NHIBERNATE_CS", "NHibernate C# DO");
define("CG_FORMAT_NHIBERNATE_XML", "NHibernate XML"); define("CG_FORMAT_NHIBERNATE_XML", "NHibernate XML");

View File

@@ -4,6 +4,7 @@
* phpMyAdmin Language Loading File * phpMyAdmin Language Loading File
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin
*/ */
if (! defined('PHPMYADMIN')) { if (! defined('PHPMYADMIN')) {
exit; exit;
@@ -124,7 +125,7 @@ function PMA_langSet(&$lang)
* *
* @return bool true on success, otherwise false * @return bool true on success, otherwise false
* *
* @global $available_languages * @global array $available_languages
* *
* @access private * @access private
*/ */

View File

@@ -4,6 +4,7 @@
* the navigation frame - displays server, db and table selection tree * the navigation frame - displays server, db and table selection tree
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin
* @uses $GLOBALS['pma']->databases * @uses $GLOBALS['pma']->databases
* @uses $GLOBALS['server'] * @uses $GLOBALS['server']
* @uses $GLOBALS['db'] * @uses $GLOBALS['db']
@@ -47,11 +48,11 @@
require_once './libraries/common.inc.php'; require_once './libraries/common.inc.php';
/** /**
* finish and cleanup navigation.php script execution * finish and cleanup navigation.php script execution, only to be used in navigation.php
* *
* @uses $GLOBALS['controllink'] to close it * @uses $GLOBALS['controllink'] to close it
* @uses $GLOBALS['userlink'] to close it * @uses $GLOBALS['userlink'] to close it
* @access private only to be used in navigation.php * @access private
*/ */
function PMA_exitNavigationFrame() function PMA_exitNavigationFrame()
{ {
@@ -141,27 +142,27 @@ require_once './libraries/header_http.inc.php';
var image_plus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_plus.png'; var image_plus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_plus.png';
// INIT PMA_setFrameSize // INIT PMA_setFrameSize
var onloadCnt = 0; var onloadCnt = 0;
var onLoadHandler = window.onload; var onLoadHandler = window.onload;
var resizeHandler = window.onresize; var resizeHandler = window.onresize;
window.document.onresize = resizeHandler; window.document.onresize = resizeHandler;
window.onload = function() { window.onload = function() {
if (onloadCnt == 0) { if (onloadCnt == 0) {
if (typeof(onLoadHandler) == "function") { if (typeof(onLoadHandler) == "function") {
onLoadHandler(); onLoadHandler();
} }
if (typeof(PMA_setFrameSize) != 'undefined' && typeof(PMA_setFrameSize) == 'function') { if (typeof(PMA_setFrameSize) != 'undefined' && typeof(PMA_setFrameSize) == 'function') {
PMA_setFrameSize(); PMA_setFrameSize();
} }
onloadCnt++; onloadCnt++;
} }
}; };
window.onresize = function() { window.onresize = function() {
if (typeof(resizeHandler) == "function") { if (typeof(resizeHandler) == "function") {
resizeHandler(); resizeHandler();
} }
if (typeof(PMA_saveFrameSize) != 'undefined' && typeof(PMA_saveFrameSize) == 'function') { if (typeof(PMA_saveFrameSize) != 'undefined' && typeof(PMA_saveFrameSize) == 'function') {
PMA_saveFrameSize(); PMA_saveFrameSize();
} }
}; };
// ]]> // ]]>
@@ -260,7 +261,7 @@ $element_counter = 0;
if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
$table_list = PMA_getTableList($GLOBALS['db']); $table_list = PMA_getTableList($GLOBALS['db']);
$table_count = count($table_list); $table_count = count($table_list);
// show selected databasename as link to DefaultTabDatabase-page // show selected databasename as link to DefaultTabDatabase-page
// with table count in () // with table count in ()
$common_url_query = PMA_generate_common_url($GLOBALS['db']); $common_url_query = PMA_generate_common_url($GLOBALS['db']);
@@ -311,7 +312,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
'db' => $GLOBALS['db'] 'db' => $GLOBALS['db']
); );
PMA_listNavigator($table_count, $tpos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxTableList']); PMA_listNavigator($table_count, $tpos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxTableList']);
} }
PMA_displayTableList($table_list, true, '', $GLOBALS['db']); PMA_displayTableList($table_list, true, '', $GLOBALS['db']);
// lower table list paginator // lower table list paginator
if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) { if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) {
@@ -346,12 +347,12 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
* @uses PMA_generate_common_url() * @uses PMA_generate_common_url()
* @uses PMA_getTableList() * @uses PMA_getTableList()
* @uses PMA_displayTableList() * @uses PMA_displayTableList()
* @global $element_counter * @global integer $element_counter
* @global $img_minus * @global string $img_minus
* @global $img_plus * @global string $img_plus
* @global $href_left * @global string $href_left
* @global $db_start * @global string $db_start
* @global $common_url_query * @global string $common_url_query
* @param array $ext_dblist extended db list * @param array $ext_dblist extended db list
* @param integer $offset * @param integer $offset
* @param integer $count * @param integer $count

View File

@@ -4,6 +4,7 @@
* Contributed by Maxime Delorme and merged by lem9 * Contributed by Maxime Delorme and merged by lem9
* *
* @version $Id$ * @version $Id$
* @package phpMyAdmin
*/ */
/** /**

View File

@@ -8,6 +8,9 @@
* @version $Id$ * @version $Id$
*/ */
/**
* Core libraries.
*/
require './lib/common.inc.php'; require './lib/common.inc.php';
require_once './setup/lib/Form.class.php'; require_once './setup/lib/Form.class.php';
require_once './setup/lib/FormDisplay.class.php'; require_once './setup/lib/FormDisplay.class.php';
@@ -57,7 +60,7 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
exit; exit;
} elseif (PMA_ifSetOr($_POST['submit_download'], '')) { } elseif (PMA_ifSetOr($_POST['submit_download'], '')) {
// //
// Output generated config file // Output generated config file
// //
header('Content-Type: text/plain'); header('Content-Type: text/plain');
header('Content-Disposition: attachment; filename="config.inc.php"'); header('Content-Disposition: attachment; filename="config.inc.php"');
@@ -97,4 +100,4 @@ if (PMA_ifSetOr($_POST['submit_clear'], '')) {
header('Location: index.php?page=config'); header('Location: index.php?page=config');
exit; exit;
} }
?> ?>

View File

@@ -12,6 +12,9 @@ if (!defined('PHPMYADMIN')) {
exit; exit;
} }
/**
* Core libraries.
*/
require_once './setup/lib/FormDisplay.class.php'; require_once './setup/lib/FormDisplay.class.php';
require_once './setup/lib/index.lib.php'; require_once './setup/lib/index.lib.php';
@@ -42,4 +45,4 @@ check_config_rw($config_readable, $config_writable, $config_exists);
<?php <?php
display_fieldset_bottom_simple(); display_fieldset_bottom_simple();
display_form_bottom(); display_form_bottom();
?> ?>

View File

@@ -12,6 +12,9 @@ if (!defined('PHPMYADMIN')) {
exit; exit;
} }
/**
* Core libraries.
*/
require_once './setup/lib/Form.class.php'; require_once './setup/lib/Form.class.php';
require_once './setup/lib/FormDisplay.class.php'; require_once './setup/lib/FormDisplay.class.php';
require_once './setup/lib/form_processing.lib.php'; require_once './setup/lib/form_processing.lib.php';
@@ -44,4 +47,4 @@ foreach ($formset['forms'] as $form_name) {
$form_display->registerForm($form_name); $form_display->registerForm($form_name);
} }
process_formset($form_display); process_formset($form_display);
?> ?>

View File

@@ -12,6 +12,9 @@ if (!defined('PHPMYADMIN')) {
exit; exit;
} }
/**
* Core libraries.
*/
require_once './libraries/display_select_lang.lib.php'; require_once './libraries/display_select_lang.lib.php';
require_once './setup/lib/FormDisplay.class.php'; require_once './setup/lib/FormDisplay.class.php';
require_once './setup/lib/index.lib.php'; require_once './setup/lib/index.lib.php';
@@ -240,4 +243,4 @@ display_form_bottom();
<a href="http://phpmyadmin.net"><?php echo $GLOBALS['strSetupHomepageLink'] ?></a> <a href="http://phpmyadmin.net"><?php echo $GLOBALS['strSetupHomepageLink'] ?></a>
<a href="http://sourceforge.net/donate/index.php?group_id=23067"><?php echo $GLOBALS['strSetupDonateLink'] ?></a> <a href="http://sourceforge.net/donate/index.php?group_id=23067"><?php echo $GLOBALS['strSetupDonateLink'] ?></a>
<a href="?version_check=1<?php echo "{$separator}token=" . $_SESSION[' PMA_token '] ?>"><?php echo $GLOBALS['strSetupVersionCheckLink'] ?></a> <a href="?version_check=1<?php echo "{$separator}token=" . $_SESSION[' PMA_token '] ?>"><?php echo $GLOBALS['strSetupVersionCheckLink'] ?></a>
</div> </div>

View File

@@ -12,6 +12,9 @@ if (!defined('PHPMYADMIN')) {
exit; exit;
} }
/**
* Core libraries.
*/
require_once './setup/lib/Form.class.php'; require_once './setup/lib/Form.class.php';
require_once './setup/lib/FormDisplay.class.php'; require_once './setup/lib/FormDisplay.class.php';
require_once './setup/lib/form_processing.lib.php'; require_once './setup/lib/form_processing.lib.php';
@@ -44,4 +47,4 @@ $form_display->registerForm('Server_login_options', $id);
$form_display->registerForm('Server_config', $id); $form_display->registerForm('Server_config', $id);
$form_display->registerForm('Server_pmadb', $id); $form_display->registerForm('Server_pmadb', $id);
process_formset($form_display); process_formset($form_display);
?> ?>

View File

@@ -9,6 +9,9 @@
* @version $Id$ * @version $Id$
*/ */
/**
* Core libraries.
*/
require './lib/common.inc.php'; require './lib/common.inc.php';
$page = filter_input(INPUT_GET, 'page'); $page = filter_input(INPUT_GET, 'page');

View File

@@ -14,6 +14,9 @@
* @version $Id$ * @version $Id$
*/ */
/**
* Core libraries.
*/
require_once './setup/lib/FormDisplay.tpl.php'; require_once './setup/lib/FormDisplay.tpl.php';
require_once './setup/lib/validate.lib.php'; require_once './setup/lib/validate.lib.php';
require_once './libraries/js_escape.lib.php'; require_once './libraries/js_escape.lib.php';
@@ -579,4 +582,4 @@ class FormDisplay
return str_replace(array('Servers/1/', '/'), array('Servers/', '_'), $path); return str_replace(array('Servers/1/', '/'), array('Servers/', '_'), $path);
} }
} }
?> ?>

View File

@@ -11,6 +11,10 @@
// TODO: remove // TODO: remove
error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL | E_STRICT);
/**
* Do not include full common.
* @ignore
*/
define('PMA_MINIMUM_COMMON', TRUE); define('PMA_MINIMUM_COMMON', TRUE);
define('PMA_SETUP', TRUE); define('PMA_SETUP', TRUE);
chdir('..'); chdir('..');
@@ -204,7 +208,7 @@ function PMA_lang_desc($canonical_path)
} }
/** /**
* Wraps link in <a> tags and replaces argument separator in internal links * Wraps link in &lt;a&gt; tags and replaces argument separator in internal links
* to the one returned by PMA_get_arg_separator() * to the one returned by PMA_get_arg_separator()
* *
* @param string $link * @param string $link
@@ -225,4 +229,4 @@ function PMA_lang_link_replace($link, $text)
return '<a href="' . $link . '">' . $text . '</a>'; return '<a href="' . $link . '">' . $text . '</a>';
} }
?> ?>