Merge branch 'QA_3_6' into STABLE
This commit is contained in:
commit
8ac5be8a97
27
.travis.yml
27
.travis.yml
@ -9,7 +9,7 @@ php:
|
||||
- "7.0"
|
||||
- "5.6"
|
||||
- "5.5"
|
||||
- "hhvm"
|
||||
- hhvm
|
||||
|
||||
sudo: false
|
||||
|
||||
@ -21,21 +21,24 @@ env:
|
||||
- TESTSUITE_PASSWORD=root
|
||||
- TESTSUITE_URL=http://127.0.0.1:8000
|
||||
|
||||
install:
|
||||
- pip install --user codecov
|
||||
- ./test/install-runkit
|
||||
- ./test/install-browserstack
|
||||
- composer install --dev --no-interaction
|
||||
|
||||
before_script:
|
||||
- if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then phpenv config-add test/php-noprofile.ini ; fi
|
||||
- export PATH=~/.composer/vendor/bin/:$PATH
|
||||
- mysql -uroot -e "CREATE DATABASE test"
|
||||
- mysql -uroot < sql/create_tables.sql
|
||||
- mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
|
||||
- composer install --dev --no-interaction
|
||||
- if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi
|
||||
- if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi
|
||||
- if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & fi
|
||||
- if [ -n "$SELENIUM" ] ; then ~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi
|
||||
- ./test/start-local-server
|
||||
|
||||
script:
|
||||
- ant clean
|
||||
- ant locales
|
||||
- if [ -z "$SELENIUM" ] ; then ant lint ; fi
|
||||
- ant lint
|
||||
- set -e;
|
||||
if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then
|
||||
ant phpunit-hhvm ;
|
||||
@ -49,8 +52,18 @@ script:
|
||||
|
||||
after_script:
|
||||
- if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi
|
||||
- if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
|
||||
- codecov
|
||||
- if [ -f php.log ] ; then cat php.log ; fi
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 5.6
|
||||
env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.6
|
||||
env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache/
|
||||
|
||||
65
ChangeLog
65
ChangeLog
@ -1,6 +1,71 @@
|
||||
phpMyAdmin - ChangeLog
|
||||
======================
|
||||
|
||||
4.6.0.0 (2016-03-22)
|
||||
+ issue #11456 Disabled storage engines
|
||||
+ issue #11479 Allow setting routine wise privileges
|
||||
- issue Hide Insert tab for non-updatable views
|
||||
+ issue #11490 UI for defining partitioning in create table window
|
||||
+ issue #11438 Support JSON data type
|
||||
+ issue Editing partitions in table Structure
|
||||
- issue Tracking does not make sense for information_schema
|
||||
- issue #11550 Regression in Find and replace
|
||||
+ issue #11619 TokuDB Tables Show Size as "unknown"
|
||||
+ issue #11654 Use a slider for Internal relations
|
||||
+ issue #11641 Ability to disable the navigationhiding Feature
|
||||
- issue #11647 Restrict configuration NavigationTreeDbSeparator to strings
|
||||
- issue #11667 Disable the tooltip in the navigation panel's filter box
|
||||
+ issue Copy results to clipboard
|
||||
+ issue #11504 Reactivate cut&paste possibility in print view
|
||||
- issue #11702 Extraneous message after edit + grid-edit
|
||||
- issue #11668 Table header is empty with browsing an empty table
|
||||
+ issue #11701 Allow changing parameter order of routines
|
||||
- issue #11708 Remove no password warning
|
||||
+ issue #11711 Clarify the meaning of "Stand-in structure for view" in SQL export
|
||||
- issue HTML line break shown after a MySQL connection error message
|
||||
- issue #11728 CSV import skip row count after
|
||||
- issue Fixed displaying of SQL query on table operations
|
||||
- issue #6321 Display binary strings as text if they are valid UTF-8
|
||||
+ issue #11743 Display routine specific privileges
|
||||
+ issue #11538 Copy multiple tables to database
|
||||
+ issue Support Cloudflare Flexible SSL
|
||||
- issue Handle empty TABLE_COMMENT
|
||||
+ issue #11833 Drop support for old Internet Explorer versions
|
||||
+ issue #11796 Use modals for displaying forms in db structure page
|
||||
+ issue #11789 Show MySQL error messages in user language
|
||||
+ issue Add 'ssl_verify' configuration directive for self-signed certificates with mysqlnd and PHP >= 5.6
|
||||
+ issue #11874 Show more used PHP extensions
|
||||
- issue #11874 Report when version check and error reporting are disabled
|
||||
- issue #11849 Fix PDF schema export
|
||||
- issue #11412 Remove ForceSSL configuration directive
|
||||
- issue Remove support for Mozilla Prism
|
||||
- issue #11412 Remove PmaAbsoluteUri configuration directive
|
||||
- issue #11914 Fix autoloading of phpseclib
|
||||
- issue #11880 Fixed rendering of missing extension error
|
||||
- issue #11923 Errors on Structure tab when user only has select access on certain columns
|
||||
- issue #11972 Missing documentation for $cfg['Servers'][$i]['favorite'] and $cfg['NumFavoriteTables']
|
||||
- issue #11907 Avoid displaying UPDATE query twice
|
||||
- issue #11850 Fixed CSV import
|
||||
- issue Fix SQL syntax highlighting in database search page
|
||||
- issue #12056 Fix error when we can not generate random string
|
||||
- issue #12055 Fixed PHP syntax error in templates
|
||||
- issue #12054 Fixed processing of queries with escaped quotes
|
||||
- issue #12041 Fixed exporting tables with fields DEFAULT and COMMENT
|
||||
- issue #12073 Hide edit and delete buttons when the results are not related to a table
|
||||
- issue #12083 Fixed parsing of field definition
|
||||
- issue #12081 Fixed rendering of table stats
|
||||
- issue #11705 Fixed problems with PHP on Windows on table structure
|
||||
- issue #12085 Like search strings being escaped incorrectly
|
||||
- issue #12092 Rename exported databases/tables doesn't seem to work
|
||||
- issue #12099 Undefined index: controllink
|
||||
- issue #12094 PHP Fatal error: Call to undefined function __()
|
||||
- issue #12098 Fix login after logout with http authentication
|
||||
- issue #12074 Fixed possible invalid SQL export
|
||||
- issue #12026 Fixed parsing of UNION SELECT with brackets
|
||||
- issue #12109 Fixed parsing of CREATE TABLE [AS] SELECT
|
||||
- issue #12105 Multi-server drap-and-drop import always fails
|
||||
- issue #12116 Fulltext indexes are not copied when using copy database function
|
||||
|
||||
4.5.5.1 (2016-02-29)
|
||||
- issue #11971 CREATE UNIQUE INDEX index type is not recognized by parser.
|
||||
- issue #11982 Row count wrong when grouping joined tables.
|
||||
|
||||
@ -3,12 +3,7 @@
|
||||
<!-- http://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php -->
|
||||
<description>phpMyAdmin custom coding standard</description>
|
||||
|
||||
<rule ref="PEAR">
|
||||
<exclude name="PEAR.Commenting.FileComment" />
|
||||
<exclude name="PEAR.Commenting.ClassComment" />
|
||||
<exclude name="PEAR.Commenting.FunctionComment" />
|
||||
<exclude name="Generic.Commenting.DocComment" />
|
||||
</rule>
|
||||
<rule ref="PSR1" />
|
||||
<rule ref="Generic.Metrics.NestingLevel" />
|
||||
<!-- There MUST NOT be trailing whitespace at the end of lines. -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
|
||||
|
||||
4
README
4
README
@ -1,9 +1,9 @@
|
||||
phpMyAdmin - Readme
|
||||
===================
|
||||
|
||||
Version 4.5.5.1
|
||||
Version 4.6.0
|
||||
|
||||
A set of PHP-scripts to manage MySQL over the web.
|
||||
A web interface for MySQL and MariaDB.
|
||||
|
||||
https://www.phpmyadmin.net/
|
||||
|
||||
|
||||
11
README.rst
11
README.rst
@ -1,7 +1,7 @@
|
||||
phpMyAdmin
|
||||
==========
|
||||
|
||||
A set of PHP-scripts to manage MySQL over the web.
|
||||
A web interface for MySQL and MariaDB.
|
||||
|
||||
https://www.phpmyadmin.net/
|
||||
|
||||
@ -22,8 +22,13 @@ Code status
|
||||
.. image:: https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/badges/quality-score.png?s=93dfde29ffa5771d9c254b7ffb11c4e673315035
|
||||
:target: https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/
|
||||
|
||||
.. image:: https://img.shields.io/sourceforge/dm/phpmyadmin.svg
|
||||
:target: https://www.phpmyadmin.net/downloads/
|
||||
.. image:: https://buildtimetrend.herokuapp.com/badge/phpmyadmin/phpmyadmin
|
||||
:alt: Buildtime Trend badge
|
||||
:target: https://buildtimetrend.herokuapp.com/dashboard/phpmyadmin/phpmyadmin
|
||||
|
||||
.. image:: https://todofy.org/b/phpmyadmin/phpmyadmin
|
||||
:alt: todofy badge
|
||||
:target: https://todofy.org/r/phpmyadmin/phpmyadmin
|
||||
|
||||
Download
|
||||
--------
|
||||
|
||||
@ -24,9 +24,9 @@ foreach ($request_params as $one_request_param) {
|
||||
}
|
||||
}
|
||||
|
||||
PMA_Util::checkParameters(array('db', 'table', 'field'));
|
||||
PMA\libraries\Util::checkParameters(array('db', 'table', 'field'));
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->disableMenuAndConsole();
|
||||
|
||||
@ -151,11 +151,12 @@
|
||||
</target>
|
||||
|
||||
<target name="lint" description="Perform syntax check of sourcecode files">
|
||||
<apply executable="php" failonerror="true" output="${basedir}/build/logs/lint.log" logError="true">
|
||||
<apply executable="php" failonerror="true">
|
||||
<arg value="-l" />
|
||||
|
||||
<fileset dir="${basedir}">
|
||||
<include name="libraries/**/*.php" />
|
||||
<include name="templates/**/*.phtml" />
|
||||
<include name="setup/**/*.php" />
|
||||
<include name="test/**/*.php" />
|
||||
<include name="*.php" />
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
*/
|
||||
require 'libraries/common.inc.php';
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->disable();
|
||||
|
||||
$filename = CHANGELOG_FILE;
|
||||
|
||||
@ -26,7 +26,7 @@ if (isset($_REQUEST['fix_pmadb'])) {
|
||||
PMA_fixPMATables($cfgRelation['db']);
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addHTML(
|
||||
PMA_getRelationsParamDiagnostic($cfgRelation)
|
||||
);
|
||||
|
||||
@ -15,16 +15,19 @@
|
||||
"support": {
|
||||
"forum": "https://www.phpmyadmin.net/support/",
|
||||
"issues": "https://github.com/phpmyadmin/phpmyadmin/issues",
|
||||
"wiki": "http://wiki.phpmyadmin.net/",
|
||||
"wiki": "https://wiki.phpmyadmin.net/",
|
||||
"docs": "https://docs.phpmyadmin.net/",
|
||||
"source": "https://github.com/phpmyadmin/phpmyadmin"
|
||||
},
|
||||
"non-feature-branches": ["RELEASE_.*"],
|
||||
"require": {
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"satooshi/php-coveralls": ">=0.6",
|
||||
"phpunit/phpunit": ">=3.7",
|
||||
"phpunit/phpunit-selenium": ">=1.2",
|
||||
"satooshi/php-coveralls": "~0.6",
|
||||
"phpunit/phpunit": "~4.1",
|
||||
"codacy/coverage": "dev-master",
|
||||
"phpunit/phpunit-selenium": "~1.2",
|
||||
"squizlabs/php_codesniffer": "2.*"
|
||||
},
|
||||
"repositories": [
|
||||
|
||||
@ -55,7 +55,7 @@ if (isset($_POST['add_column'])) {
|
||||
$selected_col[] = $_POST['column-select'];
|
||||
$tmp_msg = PMA_syncUniqueColumns($selected_col, false, $selected_tbl);
|
||||
}
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('jquery/jquery.uitablefilter.js');
|
||||
@ -78,7 +78,7 @@ if (isset($_REQUEST['edit_central_columns_page'])) {
|
||||
if (isset($_POST['multi_edit_central_column_save'])) {
|
||||
$message = PMA_updateMultipleColumn();
|
||||
if (!is_bool($message)) {
|
||||
$response->isSuccess(false);
|
||||
$response->setRequestStatus(false);
|
||||
$response->addJSON('message', $message);
|
||||
}
|
||||
}
|
||||
@ -145,7 +145,7 @@ $response->addHTML('</table>');
|
||||
$tablefooter = PMA_getCentralColumnsTableFooter($pmaThemeImage, $text_dir);
|
||||
$response->addHTML($tablefooter);
|
||||
$response->addHTML('</form></div>');
|
||||
$message = PMA_Message::success(
|
||||
$message = PMA\libraries\Message::success(
|
||||
sprintf(__('Showing rows %1$s - %2$s.'), ($pos + 1), ($pos + count($result)))
|
||||
);
|
||||
if (isset($tmp_msg) && $tmp_msg !== true) {
|
||||
|
||||
149
db_create.php
149
db_create.php
@ -1,149 +0,0 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Database creating page
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets some core libraries
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
require_once 'libraries/mysql_charsets.inc.php';
|
||||
if (! PMA_DRIZZLE) {
|
||||
include_once 'libraries/replication.inc.php';
|
||||
}
|
||||
require 'libraries/build_html_for_db.lib.php';
|
||||
|
||||
if (! isset($_POST['new_db'])) {
|
||||
PMA_Util::checkParameters(array('new_db'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
$err_url = 'index.php' . PMA_URL_getCommon();
|
||||
|
||||
/**
|
||||
* Builds and executes the db creation sql query
|
||||
*/
|
||||
$sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($_POST['new_db']);
|
||||
if (! empty($_POST['db_collation'])) {
|
||||
list($db_charset) = explode('_', $_POST['db_collation']);
|
||||
if (in_array($db_charset, $mysql_charsets)
|
||||
&& in_array($_POST['db_collation'], $mysql_collations[$db_charset])
|
||||
) {
|
||||
$sql_query .= ' DEFAULT'
|
||||
. PMA_generateCharsetQueryPart($_POST['db_collation']);
|
||||
}
|
||||
$db_collation_for_ajax = $_POST['db_collation'];
|
||||
unset($db_charset);
|
||||
}
|
||||
$sql_query .= ';';
|
||||
|
||||
$result = $GLOBALS['dbi']->tryQuery($sql_query);
|
||||
|
||||
if (! $result) {
|
||||
$message = PMA_Message::rawError($GLOBALS['dbi']->getError());
|
||||
// avoid displaying the not-created db name in header or navi panel
|
||||
$GLOBALS['db'] = '';
|
||||
$GLOBALS['table'] = '';
|
||||
|
||||
/**
|
||||
* If in an Ajax request, just display the message with {@link PMA_Response}
|
||||
*/
|
||||
if ($GLOBALS['is_ajax_request'] == true) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess(false);
|
||||
$response->addJSON('message', $message);
|
||||
} else {
|
||||
include_once 'index.php';
|
||||
}
|
||||
} else {
|
||||
$message = PMA_Message::success(__('Database %1$s has been created.'));
|
||||
$message->addParam($_POST['new_db']);
|
||||
$GLOBALS['db'] = $_POST['new_db'];
|
||||
|
||||
/**
|
||||
* If in an Ajax request, build the output and send it
|
||||
*/
|
||||
if ($GLOBALS['is_ajax_request'] == true) {
|
||||
//Construct the html for the new database, so that it can be appended to
|
||||
// the list of databases on server_databases.php
|
||||
|
||||
/**
|
||||
* Build the array to be passed to {@link PMA_URL_getCommon}
|
||||
* to generate the links
|
||||
*
|
||||
* @global array $GLOBALS['db_url_params']
|
||||
* @name $db_url_params
|
||||
*/
|
||||
$db_url_params['db'] = $_POST['new_db'];
|
||||
|
||||
$is_superuser = $GLOBALS['dbi']->isSuperuser();
|
||||
$column_order = PMA_getColumnOrder();
|
||||
$url_query = PMA_URL_getCommon(array('db' => $_POST['new_db']));
|
||||
|
||||
/**
|
||||
* String that will contain the output HTML
|
||||
* @name $new_db_string
|
||||
*/
|
||||
$new_db_string = '<tr>';
|
||||
|
||||
if (empty($db_collation_for_ajax)) {
|
||||
$db_collation_for_ajax = PMA_getServerCollation();
|
||||
}
|
||||
|
||||
// $dbstats comes from the create table dialog
|
||||
if (! empty($dbstats)) {
|
||||
$current = array(
|
||||
'SCHEMA_NAME' => $_POST['new_db'],
|
||||
'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax,
|
||||
'SCHEMA_TABLES' => '0',
|
||||
'SCHEMA_TABLE_ROWS' => '0',
|
||||
'SCHEMA_DATA_LENGTH' => '0',
|
||||
'SCHEMA_MAX_DATA_LENGTH' => '0',
|
||||
'SCHEMA_INDEX_LENGTH' => '0',
|
||||
'SCHEMA_LENGTH' => '0',
|
||||
'SCHEMA_DATA_FREE' => '0'
|
||||
);
|
||||
} else {
|
||||
$current = array(
|
||||
'SCHEMA_NAME' => $_POST['new_db'],
|
||||
'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax
|
||||
);
|
||||
}
|
||||
|
||||
list($column_order, $generated_html) = PMA_buildHtmlForDb(
|
||||
$current, $is_superuser, $url_query,
|
||||
$column_order, $replication_types, $GLOBALS['replication_info']
|
||||
);
|
||||
$new_db_string .= $generated_html;
|
||||
|
||||
$new_db_string .= '</tr>';
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->addJSON('message', $message);
|
||||
$response->addJSON('new_db_string', $new_db_string);
|
||||
$response->addJSON(
|
||||
'sql_query',
|
||||
PMA_Util::getMessage(
|
||||
null, $sql_query, 'success'
|
||||
)
|
||||
);
|
||||
$response->addJSON(
|
||||
'url_query',
|
||||
PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
)
|
||||
. $url_query . '&db='
|
||||
. urlencode($current['SCHEMA_NAME'])
|
||||
);
|
||||
} else {
|
||||
include_once '' . PMA_Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -23,10 +23,10 @@ if (! isset($selected_tbl)) {
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA_Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$header->enablePrintView();
|
||||
|
||||
@ -36,12 +36,11 @@ $header->enablePrintView();
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
require_once 'libraries/Index.class.php';
|
||||
|
||||
/**
|
||||
* Check parameters
|
||||
*/
|
||||
PMA_Util::checkParameters(array('db'));
|
||||
PMA\libraries\Util::checkParameters(array('db'));
|
||||
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
@ -55,8 +54,8 @@ if ($cfgRelation['commwork']) {
|
||||
* Displays DB comment
|
||||
*/
|
||||
if ($comment) {
|
||||
echo '<p>' . __('Database comment')
|
||||
. '<br /><i>' . htmlspecialchars($comment) . '</i></p>';
|
||||
echo '<p>' , __('Database comment')
|
||||
, '<br /><i>' , htmlspecialchars($comment) , '</i></p>';
|
||||
} // end if
|
||||
}
|
||||
|
||||
@ -70,9 +69,9 @@ $count = 0;
|
||||
foreach ($tables as $table) {
|
||||
$comments = PMA_getComments($db, $table);
|
||||
|
||||
echo '<div>' . "\n";
|
||||
echo '<div>' , "\n";
|
||||
|
||||
echo '<h2>' . htmlspecialchars($table) . '</h2>' . "\n";
|
||||
echo '<h2>' , htmlspecialchars($table) , '</h2>' , "\n";
|
||||
|
||||
/**
|
||||
* Gets table information
|
||||
@ -86,7 +85,7 @@ foreach ($tables as $table) {
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
$indexes = $GLOBALS['dbi']->getTableIndexes($db, $table);
|
||||
list($primary, $pk_array, $indexes_info, $indexes_data)
|
||||
= PMA_Util::processIndexData($indexes);
|
||||
= PMA\libraries\Util::processIndexData($indexes);
|
||||
|
||||
/**
|
||||
* Gets columns properties
|
||||
@ -102,8 +101,8 @@ foreach ($tables as $table) {
|
||||
* Displays the comments of the table if MySQL >= 3.23
|
||||
*/
|
||||
if (!empty($show_comment)) {
|
||||
echo __('Table comments:') . ' ';
|
||||
echo htmlspecialchars($show_comment) . '<br /><br />';
|
||||
echo __('Table comments:') , ' ';
|
||||
echo htmlspecialchars($show_comment) , '<br /><br />';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -111,16 +110,16 @@ foreach ($tables as $table) {
|
||||
*/
|
||||
|
||||
echo '<table width="100%" class="print">';
|
||||
echo '<tr><th width="50">' . __('Column') . '</th>';
|
||||
echo '<th width="80">' . __('Type') . '</th>';
|
||||
echo '<th width="40">' . __('Null') . '</th>';
|
||||
echo '<th width="70">' . __('Default') . '</th>';
|
||||
echo '<tr><th width="50">' , __('Column') , '</th>';
|
||||
echo '<th width="80">' , __('Type') , '</th>';
|
||||
echo '<th width="40">' , __('Null') , '</th>';
|
||||
echo '<th width="70">' , __('Default') , '</th>';
|
||||
if ($have_rel) {
|
||||
echo ' <th>' . __('Links to') . '</th>' . "\n";
|
||||
echo ' <th>' , __('Links to') , '</th>' , "\n";
|
||||
}
|
||||
echo ' <th>' . __('Comments') . '</th>' . "\n";
|
||||
echo ' <th>' , __('Comments') , '</th>' , "\n";
|
||||
if ($cfgRelation['mimework']) {
|
||||
echo ' <th>MIME</th>' . "\n";
|
||||
echo ' <th>MIME</th>' , "\n";
|
||||
}
|
||||
echo '</tr>';
|
||||
$odd_row = true;
|
||||
@ -130,7 +129,7 @@ foreach ($tables as $table) {
|
||||
$row['Null'] = 'NO';
|
||||
}
|
||||
$extracted_columnspec
|
||||
= PMA_Util::extractColumnSpec($row['Type']);
|
||||
= PMA\libraries\Util::extractColumnSpec($row['Type']);
|
||||
|
||||
// reformat mysql query output
|
||||
// set or enum types: slashes single quotes inside options
|
||||
@ -153,14 +152,14 @@ foreach ($tables as $table) {
|
||||
echo htmlspecialchars($column_name);
|
||||
|
||||
if (isset($pk_array[$row['Field']])) {
|
||||
echo ' <em>(' . __('Primary') . ')</em>';
|
||||
echo ' <em>(' , __('Primary') , ')</em>';
|
||||
}
|
||||
echo '</td>';
|
||||
echo '<td'
|
||||
. PMA_Util::getClassForType(
|
||||
, PMA\libraries\Util::getClassForType(
|
||||
$extracted_columnspec['type']
|
||||
)
|
||||
. ' lang="en" dir="ltr">' . $type . '</td>';
|
||||
, ' lang="en" dir="ltr">' , $type , '</td>';
|
||||
|
||||
echo '<td>';
|
||||
echo (($row['Null'] == 'NO') ? __('No') : __('Yes'));
|
||||
@ -180,13 +179,13 @@ foreach ($tables as $table) {
|
||||
. $foreigner['foreign_field']
|
||||
);
|
||||
}
|
||||
echo '</td>' . "\n";
|
||||
echo '</td>' , "\n";
|
||||
}
|
||||
echo ' <td>';
|
||||
if (isset($comments[$column_name])) {
|
||||
echo htmlspecialchars($comments[$column_name]);
|
||||
}
|
||||
echo '</td>' . "\n";
|
||||
echo '</td>' , "\n";
|
||||
if ($cfgRelation['mimework']) {
|
||||
$mime_map = PMA_getMIME($db, $table, true);
|
||||
|
||||
@ -196,15 +195,15 @@ foreach ($tables as $table) {
|
||||
str_replace('_', '/', $mime_map[$column_name]['mimetype'])
|
||||
);
|
||||
}
|
||||
echo '</td>' . "\n";
|
||||
echo '</td>' , "\n";
|
||||
}
|
||||
echo '</tr>';
|
||||
} // end foreach
|
||||
$count++;
|
||||
echo '</table>';
|
||||
// display indexes information
|
||||
if (count(PMA_Index::getFromTable($table, $db)) > 0) {
|
||||
echo PMA_Index::getHtmlForIndexes($table, $db, true);
|
||||
if (count(PMA\libraries\Index::getFromTable($table, $db)) > 0) {
|
||||
echo PMA\libraries\Index::getHtmlForIndexes($table, $db, true);
|
||||
}
|
||||
echo '</div>';
|
||||
} //ends main while
|
||||
@ -212,4 +211,4 @@ foreach ($tables as $table) {
|
||||
/**
|
||||
* Displays the footer
|
||||
*/
|
||||
echo PMA_Util::getButton();
|
||||
echo PMA\libraries\Util::getButton();
|
||||
|
||||
@ -10,7 +10,7 @@ require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/pmd_common.php';
|
||||
require_once 'libraries/db_designer.lib.php';
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
|
||||
if (isset($_REQUEST['dialog'])) {
|
||||
|
||||
@ -37,7 +37,7 @@ if (isset($_REQUEST['operation'])) {
|
||||
|
||||
if ($_REQUEST['operation'] == 'deletePage') {
|
||||
$success = PMA_deletePage($_REQUEST['selected_page']);
|
||||
$response->isSuccess($success);
|
||||
$response->setRequestStatus($success);
|
||||
} elseif ($_REQUEST['operation'] == 'savePage') {
|
||||
if ($_REQUEST['save_page'] == 'same') {
|
||||
$page = $_REQUEST['selected_page'];
|
||||
@ -46,12 +46,12 @@ if (isset($_REQUEST['operation'])) {
|
||||
$response->addJSON('id', $page);
|
||||
}
|
||||
$success = PMA_saveTablePositions($page);
|
||||
$response->isSuccess($success);
|
||||
$response->setRequestStatus($success);
|
||||
} elseif ($_REQUEST['operation'] == 'setDisplayField') {
|
||||
PMA_saveDisplayField(
|
||||
$_REQUEST['db'], $_REQUEST['table'], $_REQUEST['field']
|
||||
);
|
||||
$response->isSuccess(true);
|
||||
$response->setRequestStatus(true);
|
||||
} elseif ($_REQUEST['operation'] == 'addNewRelation') {
|
||||
list($success, $message) = PMA_addNewRelation(
|
||||
$_REQUEST['db'],
|
||||
@ -62,7 +62,7 @@ if (isset($_REQUEST['operation'])) {
|
||||
$_REQUEST['on_delete'],
|
||||
$_REQUEST['on_update']
|
||||
);
|
||||
$response->isSuccess($success);
|
||||
$response->setRequestStatus($success);
|
||||
$response->addJSON('message', $message);
|
||||
} elseif ($_REQUEST['operation'] == 'removeRelation') {
|
||||
list($success, $message) = PMA_removeRelation(
|
||||
@ -71,11 +71,11 @@ if (isset($_REQUEST['operation'])) {
|
||||
$_REQUEST['T2'],
|
||||
$_REQUEST['F2']
|
||||
);
|
||||
$response->isSuccess($success);
|
||||
$response->setRequestStatus($success);
|
||||
$response->addJSON('message', $message);
|
||||
} elseif ($_REQUEST['operation'] == 'save_setting_value') {
|
||||
$success = PMA_saveDesignerSetting($_REQUEST['index'], $_REQUEST['value']);
|
||||
$response->isSuccess($success);
|
||||
$response->setRequestStatus($success);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -113,7 +113,7 @@ if (isset($_GET['db'])) {
|
||||
$params['db'] = $_GET['db'];
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->setBodyId('pmd_body');
|
||||
@ -125,7 +125,6 @@ $scripts->addFile('pmd/designer_objects.js');
|
||||
$scripts->addFile('pmd/designer_page.js');
|
||||
$scripts->addFile('pmd/history.js');
|
||||
$scripts->addFile('pmd/move.js');
|
||||
$scripts->addFile('pmd/iecanvas.js', true);
|
||||
$scripts->addFile('pmd/init.js');
|
||||
|
||||
list(
|
||||
@ -138,7 +137,7 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA_Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
// Embed some data into HTML, later it will be read
|
||||
// by pmd/init.js and converted to JS variables.
|
||||
@ -148,7 +147,11 @@ $response->addHTML(
|
||||
)
|
||||
);
|
||||
$response->addHTML(
|
||||
PMA_getDesignerPageMenu(isset($_REQUEST['query']), $selected_page, $classes_side_menu)
|
||||
PMA_getDesignerPageMenu(
|
||||
isset($_REQUEST['query']),
|
||||
$selected_page,
|
||||
$classes_side_menu
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
* Include required files
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/Util.class.php';
|
||||
|
||||
/**
|
||||
* Include all other files
|
||||
|
||||
@ -5,22 +5,25 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\config\PageSettings;
|
||||
use PMA\libraries\Response;
|
||||
|
||||
/**
|
||||
* Gets some core libraries
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/config/page_settings.class.php';
|
||||
require_once 'libraries/config/user_preferences.forms.php';
|
||||
require_once 'libraries/config/page_settings.forms.php';
|
||||
require_once 'libraries/export.lib.php';
|
||||
|
||||
PMA_PageSettings::showGroup('Export');
|
||||
PageSettings::showGroup('Export');
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('export.js');
|
||||
|
||||
// $sub_part is used in PMA_Util::getDbInfo() to see if we are coming from
|
||||
// $sub_part is used in PMA\libraries\Util::getDbInfo() to see if we are coming from
|
||||
// db_export.php, in which case we don't obey $cfg['MaxTableList']
|
||||
$sub_part = '_export';
|
||||
require_once 'libraries/db_common.inc.php';
|
||||
@ -36,7 +39,7 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA_Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
/**
|
||||
* Displays the form
|
||||
@ -45,7 +48,7 @@ $export_page_title = __('View dump (schema) of database');
|
||||
|
||||
// exit if no tables in db found
|
||||
if ($num_tables < 1) {
|
||||
PMA_Message::error(__('No tables found in database.'))->display();
|
||||
PMA\libraries\Message::error(__('No tables found in database.'))->display();
|
||||
exit;
|
||||
} // end if
|
||||
|
||||
@ -88,7 +91,7 @@ foreach (array('table_select', 'table_structure', 'table_data') as $one_key) {
|
||||
}
|
||||
|
||||
foreach ($tables as $each_table) {
|
||||
if (isset($_GET['table_select'])) {
|
||||
if (isset($_GET['table_select']) && is_array($_GET['table_select'])) {
|
||||
$is_checked = PMA_getCheckedClause(
|
||||
$each_table['Name'], $_GET['table_select']
|
||||
);
|
||||
@ -99,7 +102,7 @@ foreach ($tables as $each_table) {
|
||||
} else {
|
||||
$is_checked = ' checked="checked"';
|
||||
}
|
||||
if (isset($_GET['table_structure'])) {
|
||||
if (isset($_GET['table_structure']) && is_array($_GET['table_structure'])) {
|
||||
$structure_checked = PMA_getCheckedClause(
|
||||
$each_table['Name'], $_GET['table_structure']
|
||||
);
|
||||
@ -131,5 +134,23 @@ foreach ($tables as $each_table) {
|
||||
$multi_values .= "\n";
|
||||
$multi_values .= '</tbody></table></div>';
|
||||
|
||||
$export_type = 'database';
|
||||
require_once 'libraries/display_export.inc.php';
|
||||
require_once 'libraries/display_export.lib.php';
|
||||
if (! isset($sql_query)) {
|
||||
$sql_query = '';
|
||||
}
|
||||
if (! isset($num_tables)) {
|
||||
$num_tables = 0;
|
||||
}
|
||||
if (! isset($unlim_num_rows)) {
|
||||
$unlim_num_rows = 0;
|
||||
}
|
||||
if (! isset($multi_values)) {
|
||||
$multi_values = '';
|
||||
}
|
||||
$response = Response::getInstance();
|
||||
$response->addHTML(
|
||||
PMA_getExportDisplay(
|
||||
'database', $db, $table, $sql_query, $num_tables,
|
||||
$unlim_num_rows, $multi_values
|
||||
)
|
||||
);
|
||||
|
||||
@ -6,12 +6,15 @@
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
use PMA\libraries\config\PageSettings;
|
||||
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/config/page_settings.class.php';
|
||||
require_once 'libraries/config/user_preferences.forms.php';
|
||||
require_once 'libraries/config/page_settings.forms.php';
|
||||
|
||||
PMA_PageSettings::showGroup('Import');
|
||||
PageSettings::showGroup('Import');
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('import.js');
|
||||
@ -31,10 +34,10 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA_Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
require 'libraries/display_import.lib.php';
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addHTML(
|
||||
PMA_getImportDisplay(
|
||||
'database', $db, $table, $max_upload_size
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\plugins\export\ExportSql;
|
||||
|
||||
/**
|
||||
* requirements
|
||||
@ -26,7 +27,7 @@ require_once 'libraries/check_user_privileges.lib.php';
|
||||
require_once 'libraries/operations.lib.php';
|
||||
|
||||
// add a javascript file for jQuery functions to handle Ajax actions
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('db_operations.js');
|
||||
@ -36,9 +37,7 @@ $sql_query = '';
|
||||
/**
|
||||
* Rename/move or copy database
|
||||
*/
|
||||
/** @var PMA_String $pmaString */
|
||||
$pmaString = $GLOBALS['PMA_String'];
|
||||
if (/*overload*/mb_strlen($GLOBALS['db'])
|
||||
if (mb_strlen($GLOBALS['db'])
|
||||
&& (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_copy']))
|
||||
) {
|
||||
if (! empty($_REQUEST['db_rename'])) {
|
||||
@ -48,9 +47,9 @@ if (/*overload*/mb_strlen($GLOBALS['db'])
|
||||
}
|
||||
|
||||
if (! isset($_REQUEST['newname'])
|
||||
|| ! /*overload*/mb_strlen($_REQUEST['newname'])
|
||||
|| ! mb_strlen($_REQUEST['newname'])
|
||||
) {
|
||||
$message = PMA_Message::error(__('The database name is empty!'));
|
||||
$message = PMA\libraries\Message::error(__('The database name is empty!'));
|
||||
} else {
|
||||
$_error = false;
|
||||
if ($move || ! empty($_REQUEST['create_database_before_copying'])) {
|
||||
@ -105,7 +104,7 @@ if (/*overload*/mb_strlen($GLOBALS['db'])
|
||||
}
|
||||
unset($sqlConstratints);
|
||||
|
||||
if (! PMA_DRIZZLE && PMA_MYSQL_INT_VERSION >= 50100) {
|
||||
if (PMA_MYSQL_INT_VERSION >= 50100) {
|
||||
// here DELIMITER is not used because it's not part of the
|
||||
// language; each statement is sent one by one
|
||||
|
||||
@ -133,11 +132,11 @@ if (/*overload*/mb_strlen($GLOBALS['db'])
|
||||
|
||||
// if someday the RENAME DATABASE reappears, do not DROP
|
||||
$local_query = 'DROP DATABASE '
|
||||
. PMA_Util::backquote($GLOBALS['db']) . ';';
|
||||
. PMA\libraries\Util::backquote($GLOBALS['db']) . ';';
|
||||
$sql_query .= "\n" . $local_query;
|
||||
$GLOBALS['dbi']->query($local_query);
|
||||
|
||||
$message = PMA_Message::success(
|
||||
$message = PMA\libraries\Message::success(
|
||||
__('Database %1$s has been renamed to %2$s.')
|
||||
);
|
||||
$message->addParam($GLOBALS['db']);
|
||||
@ -149,13 +148,13 @@ if (/*overload*/mb_strlen($GLOBALS['db'])
|
||||
PMA_AdjustPrivileges_copyDB($GLOBALS['db'], $_REQUEST['newname']);
|
||||
}
|
||||
|
||||
$message = PMA_Message::success(
|
||||
$message = PMA\libraries\Message::success(
|
||||
__('Database %1$s has been copied to %2$s.')
|
||||
);
|
||||
$message->addParam($GLOBALS['db']);
|
||||
$message->addParam($_REQUEST['newname']);
|
||||
} else {
|
||||
$message = PMA_Message::error();
|
||||
$message = PMA\libraries\Message::error();
|
||||
}
|
||||
$reload = true;
|
||||
|
||||
@ -176,16 +175,16 @@ if (/*overload*/mb_strlen($GLOBALS['db'])
|
||||
|
||||
/**
|
||||
* Database has been successfully renamed/moved. If in an Ajax request,
|
||||
* generate the output with {@link PMA_Response} and exit
|
||||
* generate the output with {@link PMA\libraries\Response} and exit
|
||||
*/
|
||||
if ($GLOBALS['is_ajax_request'] == true) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess($message->isSuccess());
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->setRequestStatus($message->isSuccess());
|
||||
$response->addJSON('message', $message);
|
||||
$response->addJSON('newname', $_REQUEST['newname']);
|
||||
$response->addJSON(
|
||||
'sql_query',
|
||||
PMA_Util::getMessage(null, $sql_query)
|
||||
PMA\libraries\Util::getMessage(null, $sql_query)
|
||||
);
|
||||
$response->addJSON('db', $GLOBALS['db']);
|
||||
exit;
|
||||
@ -222,12 +221,12 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA_Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
echo "\n";
|
||||
|
||||
if (isset($message)) {
|
||||
echo PMA_Util::getMessage($message, $sql_query);
|
||||
echo PMA\libraries\Util::getMessage($message, $sql_query);
|
||||
unset($message);
|
||||
}
|
||||
|
||||
@ -261,7 +260,7 @@ if (!$is_information_schema) {
|
||||
// Don't allow to easily drop mysql database, RFE #1327514.
|
||||
if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase'])
|
||||
&& ! $db_is_system_schema
|
||||
&& (PMA_DRIZZLE || $GLOBALS['db'] != 'mysql')
|
||||
&& $GLOBALS['db'] != 'mysql'
|
||||
) {
|
||||
$response->addHTML(PMA_getHtmlForDropDatabaseLink($GLOBALS['db']));
|
||||
}
|
||||
@ -278,15 +277,15 @@ if (!$is_information_schema) {
|
||||
if (! $cfgRelation['allworks']
|
||||
&& $cfg['PmaNoRelation_DisableWarning'] == false
|
||||
) {
|
||||
$message = PMA_Message::notice(
|
||||
$message = PMA\libraries\Message::notice(
|
||||
__(
|
||||
'The phpMyAdmin configuration storage has been deactivated. ' .
|
||||
'%sFind out why%s.'
|
||||
)
|
||||
);
|
||||
$message->addParam(
|
||||
'<a href="' . $cfg['PmaAbsoluteUri']
|
||||
. 'chk_rel.php' . $url_query . '">',
|
||||
'<a href="'
|
||||
. './chk_rel.php' . $url_query . '">',
|
||||
false
|
||||
);
|
||||
$message->addParam('</a>', false);
|
||||
@ -303,13 +302,14 @@ $response->addHTML('</div>');
|
||||
if ($cfgRelation['pdfwork'] && $num_tables > 0) {
|
||||
// We only show this if we find something in the new pdf_pages table
|
||||
$test_query = '
|
||||
SELECT *
|
||||
FROM ' . PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. '.' . PMA_Util::backquote($cfgRelation['pdf_pages']) . '
|
||||
WHERE db_name = \'' . PMA_Util::sqlAddSlashes($GLOBALS['db']) . '\'';
|
||||
SELECT *
|
||||
FROM ' . PMA\libraries\Util::backquote($GLOBALS['cfgRelation']['db'])
|
||||
. '.' . PMA\libraries\Util::backquote($cfgRelation['pdf_pages']) . '
|
||||
WHERE db_name = \'' . PMA\libraries\Util::sqlAddSlashes($GLOBALS['db'])
|
||||
. '\'';
|
||||
$test_rs = PMA_queryAsControlUser(
|
||||
$test_query,
|
||||
false,
|
||||
PMA_DatabaseInterface::QUERY_STORE
|
||||
PMA\libraries\DatabaseInterface::QUERY_STORE
|
||||
);
|
||||
} // end if
|
||||
|
||||
27
db_qbe.php
27
db_qbe.php
@ -5,16 +5,16 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\SavedSearches;
|
||||
|
||||
/**
|
||||
* requirements
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/DBQbe.class.php';
|
||||
require_once 'libraries/bookmark.lib.php';
|
||||
require_once 'libraries/sql.lib.php';
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
|
||||
// Gets the relation settings
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
@ -23,13 +23,12 @@ $savedSearchList = array();
|
||||
$savedSearch = null;
|
||||
$currentSearchId = null;
|
||||
if ($cfgRelation['savedsearcheswork']) {
|
||||
include 'libraries/SavedSearches.class.php';
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('db_qbe.js');
|
||||
|
||||
//Get saved search list.
|
||||
$savedSearch = new PMA_SavedSearches($GLOBALS);
|
||||
$savedSearch = new SavedSearches($GLOBALS);
|
||||
$savedSearch->setUsername($GLOBALS['cfg']['Server']['user'])
|
||||
->setDbname($_REQUEST['db']);
|
||||
|
||||
@ -50,14 +49,14 @@ if ($cfgRelation['savedsearcheswork']) {
|
||||
} elseif ('delete' === $_REQUEST['action']) {
|
||||
$deleteResult = $savedSearch->delete();
|
||||
//After deletion, reset search.
|
||||
$savedSearch = new PMA_SavedSearches($GLOBALS);
|
||||
$savedSearch = new SavedSearches($GLOBALS);
|
||||
$savedSearch->setUsername($GLOBALS['cfg']['Server']['user'])
|
||||
->setDbname($_REQUEST['db']);
|
||||
$_REQUEST = array();
|
||||
} elseif ('load' === $_REQUEST['action']) {
|
||||
if (empty($_REQUEST['searchId'])) {
|
||||
//when not loading a search, reset the object.
|
||||
$savedSearch = new PMA_SavedSearches($GLOBALS);
|
||||
$savedSearch = new SavedSearches($GLOBALS);
|
||||
$savedSearch->setUsername($GLOBALS['cfg']['Server']['user'])
|
||||
->setDbname($_REQUEST['db']);
|
||||
$_REQUEST = array();
|
||||
@ -81,12 +80,8 @@ if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) {
|
||||
$message_to_display = true;
|
||||
} else {
|
||||
$goto = 'db_sql.php';
|
||||
|
||||
// Parse and analyze the query
|
||||
include_once 'libraries/parse_analyze.inc.php';
|
||||
|
||||
PMA_executeQueryAndSendQueryResponse(
|
||||
$analyzed_sql_results, // analyzed_sql_results
|
||||
null, // analyzed_sql_results
|
||||
false, // is_gotofile
|
||||
$_REQUEST['db'], // db
|
||||
null, // table
|
||||
@ -123,16 +118,18 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA_Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
if ($message_to_display) {
|
||||
PMA_Message::error(__('You have to choose at least one column to display!'))
|
||||
PMA\libraries\Message::error(
|
||||
__('You have to choose at least one column to display!')
|
||||
)
|
||||
->display();
|
||||
}
|
||||
unset($message_to_display);
|
||||
|
||||
// create new qbe search instance
|
||||
$db_qbe = new PMA_DbQbe($GLOBALS['db'], $savedSearchList, $savedSearch);
|
||||
$db_qbe = new PMA\libraries\DbQbe($GLOBALS['db'], $savedSearchList, $savedSearch);
|
||||
|
||||
$url = 'db_designer.php' . PMA_URL_getCommon(
|
||||
array_merge(
|
||||
@ -141,7 +138,7 @@ $url = 'db_designer.php' . PMA_URL_getCommon(
|
||||
)
|
||||
);
|
||||
$response->addHTML(
|
||||
PMA_Message::notice(
|
||||
PMA\libraries\Message::notice(
|
||||
sprintf(
|
||||
__('Switch to %svisual builder%s'),
|
||||
'<a href="' . $url . '">',
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
* Include required files
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/Util.class.php';
|
||||
require_once 'libraries/mysql_charsets.inc.php';
|
||||
|
||||
/**
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
* Gets some core libraries
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/DbSearch.class.php';
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
use PMA\libraries\DbSearch;
|
||||
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('db_search.js');
|
||||
@ -26,7 +27,7 @@ require 'libraries/db_common.inc.php';
|
||||
|
||||
// If config variable $GLOBALS['cfg']['UseDbSearch'] is on false : exit.
|
||||
if (! $GLOBALS['cfg']['UseDbSearch']) {
|
||||
PMA_Util::mysqlDie(
|
||||
PMA\libraries\Util::mysqlDie(
|
||||
__('Access denied!'), '', false, $err_url
|
||||
);
|
||||
} // end if
|
||||
@ -34,7 +35,7 @@ $url_query .= '&goto=db_search.php';
|
||||
$url_params['goto'] = 'db_search.php';
|
||||
|
||||
// Create a database search instance
|
||||
$db_search = new PMA_DbSearch($GLOBALS['db']);
|
||||
$db_search = new DbSearch($GLOBALS['db']);
|
||||
|
||||
// Display top links if we are not in an Ajax request
|
||||
if ($GLOBALS['is_ajax_request'] != true) {
|
||||
@ -48,7 +49,7 @@ if ($GLOBALS['is_ajax_request'] != true) {
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA_Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
}
|
||||
|
||||
// Main search form has been submitted, get results
|
||||
|
||||
@ -5,22 +5,23 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\config\PageSettings;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/config/page_settings.class.php';
|
||||
require_once 'libraries/config/user_preferences.forms.php';
|
||||
require_once 'libraries/config/page_settings.forms.php';
|
||||
|
||||
PMA_PageSettings::showGroup('Sql_queries');
|
||||
PageSettings::showGroup('Sql_queries');
|
||||
|
||||
/**
|
||||
* Runs common work
|
||||
*/
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('functions.js');
|
||||
$scripts->addFile('makegrid.js');
|
||||
$scripts->addFile('jquery/jquery.uitablefilter.js');
|
||||
$scripts->addFile('sql.js');
|
||||
|
||||
@ -22,5 +22,5 @@ if ($GLOBALS['cfg']['EnableAutocompleteForTablesAndColumns']) {
|
||||
} else {
|
||||
$sql_autocomplete = true;
|
||||
}
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addJSON("tables", json_encode($sql_autocomplete));
|
||||
|
||||
@ -16,5 +16,5 @@ $query = !empty($_POST['sql']) ? $_POST['sql'] : '';
|
||||
|
||||
$query = SqlParser\Utils\Formatter::format($query);
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addJSON("sql", $query);
|
||||
|
||||
@ -8,7 +8,9 @@
|
||||
|
||||
namespace PMA;
|
||||
|
||||
use PMA_Response;
|
||||
use PMA\libraries\controllers\database\DatabaseStructureController;
|
||||
use PMA\libraries\Response;
|
||||
use PMA\libraries\Util;
|
||||
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/db_common.inc.php';
|
||||
@ -23,19 +25,16 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = \PMA_Util::getDbInfo($GLOBALS['db'], isset($sub_part) ? $sub_part : '');
|
||||
) = Util::getDbInfo($GLOBALS['db'], isset($sub_part) ? $sub_part : '');
|
||||
|
||||
require_once 'libraries/di/Container.class.php';
|
||||
require_once 'libraries/controllers/DatabaseStructureController.class.php';
|
||||
require_once 'libraries/Response.class.php';
|
||||
|
||||
$container = DI\Container::getDefaultContainer();
|
||||
$container->factory('PMA\Controllers\DatabaseStructureController');
|
||||
$container = libraries\di\Container::getDefaultContainer();
|
||||
$container->factory('PMA\libraries\controllers\database\DatabaseStructureController');
|
||||
$container->alias(
|
||||
'DatabaseStructureController', 'PMA\Controllers\DatabaseStructureController'
|
||||
'DatabaseStructureController',
|
||||
'PMA\libraries\controllers\database\DatabaseStructureController'
|
||||
);
|
||||
$container->set('PMA_Response', PMA_Response::getInstance());
|
||||
$container->alias('response', 'PMA_Response');
|
||||
$container->set('PMA\libraries\Response', Response::getInstance());
|
||||
$container->alias('response', 'PMA\libraries\Response');
|
||||
|
||||
global $db, $pos, $db_is_system_schema, $total_num_tables, $tables, $num_tables;
|
||||
/* Define dependencies for the concerned controller */
|
||||
@ -49,6 +48,9 @@ $dependency_definitions = array(
|
||||
'tables' => $tables,
|
||||
);
|
||||
|
||||
/** @var Controllers\DatabaseStructureController $controller */
|
||||
$controller = $container->get('DatabaseStructureController', $dependency_definitions);
|
||||
/** @var DatabaseStructureController $controller */
|
||||
$controller = $container->get(
|
||||
'DatabaseStructureController',
|
||||
$dependency_definitions
|
||||
);
|
||||
$controller->indexAction();
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\Tracker;
|
||||
|
||||
/**
|
||||
* Run common work
|
||||
@ -15,7 +16,7 @@ require_once './libraries/tracking.lib.php';
|
||||
require_once 'libraries/display_create_table.lib.php';
|
||||
|
||||
//Get some js files needed for Ajax requests
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
$scripts->addFile('jquery/jquery.tablesorter.js');
|
||||
@ -40,21 +41,21 @@ list(
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = PMA_Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
|
||||
|
||||
// Work to do?
|
||||
// (here, do not use $_REQUEST['db] as it can be crafted)
|
||||
if (isset($_REQUEST['delete_tracking']) && isset($_REQUEST['table'])) {
|
||||
|
||||
PMA_Tracker::deleteTracking($GLOBALS['db'], $_REQUEST['table']);
|
||||
PMA_Message::success(
|
||||
Tracker::deleteTracking($GLOBALS['db'], $_REQUEST['table']);
|
||||
PMA\libraries\Message::success(
|
||||
__('Tracking data deleted successfully.')
|
||||
)->display();
|
||||
|
||||
} elseif (isset($_REQUEST['submit_create_version'])) {
|
||||
|
||||
PMA_createTrackingForMultipleTables($_REQUEST['selected']);
|
||||
PMA_Message::success(
|
||||
PMA\libraries\Message::success(
|
||||
sprintf(
|
||||
__(
|
||||
'Version %1$s was created for selected tables,'
|
||||
@ -70,9 +71,9 @@ if (isset($_REQUEST['delete_tracking']) && isset($_REQUEST['table'])) {
|
||||
if ($_REQUEST['submit_mult'] == 'delete_tracking') {
|
||||
|
||||
foreach ($_REQUEST['selected_tbl'] as $table) {
|
||||
PMA_Tracker::deleteTracking($GLOBALS['db'], $table);
|
||||
Tracker::deleteTracking($GLOBALS['db'], $table);
|
||||
}
|
||||
PMA_Message::success(
|
||||
PMA\libraries\Message::success(
|
||||
__('Tracking data deleted successfully.')
|
||||
)->display();
|
||||
|
||||
@ -87,18 +88,18 @@ if (isset($_REQUEST['delete_tracking']) && isset($_REQUEST['table'])) {
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
PMA_Message::notice(
|
||||
PMA\libraries\Message::notice(
|
||||
__('No tables selected.')
|
||||
)->display();
|
||||
}
|
||||
}
|
||||
|
||||
// Get tracked data about the database
|
||||
$data = PMA_Tracker::getTrackedData($_REQUEST['db'], '', '1');
|
||||
$data = Tracker::getTrackedData($_REQUEST['db'], '', '1');
|
||||
|
||||
// No tables present and no log exist
|
||||
if ($num_tables == 0 && count($data['ddlog']) == 0) {
|
||||
echo '<p>' . __('No tables found in database.') . '</p>' . "\n";
|
||||
echo '<p>' , __('No tables found in database.') , '</p>' , "\n";
|
||||
|
||||
if (empty($db_is_system_schema)) {
|
||||
echo PMA_getHtmlForCreateTable($db);
|
||||
@ -111,16 +112,19 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
// Prepare statement to get HEAD version
|
||||
$all_tables_query = ' SELECT table_name, MAX(version) as version FROM ' .
|
||||
PMA_Util::backquote($cfgRelation['db']) . '.' .
|
||||
PMA_Util::backquote($cfgRelation['tracking']) .
|
||||
' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($_REQUEST['db']) . '\' ' .
|
||||
' GROUP BY table_name' .
|
||||
' ORDER BY table_name ASC';
|
||||
PMA\libraries\Util::backquote($cfgRelation['db']) . '.' .
|
||||
PMA\libraries\Util::backquote($cfgRelation['tracking']) .
|
||||
' WHERE db_name = \'' . PMA\libraries\Util::sqlAddSlashes($_REQUEST['db']) .
|
||||
'\' ' .
|
||||
' GROUP BY table_name' .
|
||||
' ORDER BY table_name ASC';
|
||||
|
||||
$all_tables_result = PMA_queryAsControlUser($all_tables_query);
|
||||
|
||||
// If a HEAD version exists
|
||||
if (is_object($all_tables_result) && $GLOBALS['dbi']->numRows($all_tables_result) > 0) {
|
||||
if (is_object($all_tables_result)
|
||||
&& $GLOBALS['dbi']->numRows($all_tables_result) > 0
|
||||
) {
|
||||
PMA_displayTrackedTables(
|
||||
$GLOBALS['db'], $all_tables_result, $url_query, $pmaThemeImage,
|
||||
$text_dir, $cfgRelation
|
||||
@ -142,5 +146,5 @@ if (count($data['ddlog']) > 0) {
|
||||
$log .= '# ' . $entry['date'] . ' ' . $entry['username'] . "\n"
|
||||
. $entry['statement'] . "\n";
|
||||
}
|
||||
echo PMA_Util::getMessage(__('Database Log'), $log);
|
||||
echo PMA\libraries\Util::getMessage(__('Database Log'), $log);
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ copyright = u'2012 - 2014, The phpMyAdmin devel team'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '4.5.5.1'
|
||||
version = '4.6.0'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
|
||||
|
||||
261
doc/config.rst
261
doc/config.rst
@ -41,6 +41,11 @@ Basic settings
|
||||
:type: string
|
||||
:default: ``''``
|
||||
|
||||
.. deprecated:: 4.6.0
|
||||
|
||||
This setting is no longer available since phpMyAdmin 4.6.0. Please
|
||||
adjust your webserver instead.
|
||||
|
||||
Sets here the complete :term:`URL` (with full path) to your phpMyAdmin
|
||||
installation's directory. E.g.
|
||||
``http://www.example.net/path_to_your_phpMyAdmin_directory/``. Note also
|
||||
@ -290,6 +295,20 @@ Server connection settings
|
||||
|
||||
List of allowable ciphers for SSL connections to the MySQL server.
|
||||
|
||||
.. config:option:: $cfg['Servers'][$i]['ssl_verify']
|
||||
|
||||
:type: boolean
|
||||
:default: true
|
||||
|
||||
If your PHP install uses the MySQL Native Driver (mysqlnd), your
|
||||
MySQL server is 5.6 or later, and your SSL certificate is self-signed,
|
||||
there is a chance your SSL connection will fail due to validation.
|
||||
Setting this to ``false`` will disable the validation check.
|
||||
|
||||
.. note::
|
||||
|
||||
This flag only works with PHP 5.6.16 or later
|
||||
|
||||
.. config:option:: $cfg['Servers'][$i]['connect_type']
|
||||
|
||||
:type: string
|
||||
@ -502,7 +521,7 @@ Server connection settings
|
||||
.. _bookmark:
|
||||
.. config:option:: $cfg['Servers'][$i]['bookmarktable']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 2.2.0 phpMyAdmin allows users to bookmark queries. This
|
||||
@ -512,11 +531,12 @@ Server connection settings
|
||||
* set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
|
||||
* enter the table name in :config:option:`$cfg['Servers'][$i]['bookmarktable']`
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _relation:
|
||||
.. config:option:: $cfg['Servers'][$i]['relation']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 2.2.4 you can describe, in a special 'relation' table,
|
||||
@ -546,6 +566,8 @@ Server connection settings
|
||||
where you want to use this feature, click :guilabel:`Structure/Relation view/`
|
||||
and choose foreign columns.
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. note::
|
||||
|
||||
In the current version, ``master_db`` must be the same as ``foreign_db``.
|
||||
@ -555,7 +577,7 @@ Server connection settings
|
||||
.. _table_info:
|
||||
.. config:option:: $cfg['Servers'][$i]['table_info']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 2.3.0 you can describe, in a special 'table\_info'
|
||||
@ -571,17 +593,19 @@ Server connection settings
|
||||
"Structure/Relation view/Choose column to display" to choose the
|
||||
column.
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. seealso:: :ref:`faqdisplay`
|
||||
|
||||
.. _table_coords:
|
||||
.. config:option:: $cfg['Servers'][$i]['table_coords']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
.. config:option:: $cfg['Servers'][$i]['pdf_pages']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 2.3.0 you can have phpMyAdmin create :term:`PDF` pages
|
||||
@ -598,12 +622,14 @@ Server connection settings
|
||||
:config:option:`$cfg['Servers'][$i]['table\_coords']` and
|
||||
:config:option:`$cfg['Servers'][$i]['pdf\_pages']`
|
||||
|
||||
This feature can be disabled by setting either of the configurations to ``false``.
|
||||
|
||||
.. seealso:: :ref:`faqpdf`.
|
||||
|
||||
.. _col_com:
|
||||
.. config:option:: $cfg['Servers'][$i]['column_info']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
This part requires a content update! Since release 2.3.0 you can
|
||||
@ -651,6 +677,8 @@ Server connection settings
|
||||
* to update your PRE-4.3.0 Column\_info table manually use this
|
||||
``./sql/upgrade_column_info_4_3_0+.sql`` SQL script.
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. note::
|
||||
|
||||
For auto-upgrade functionality to work, your
|
||||
@ -662,7 +690,7 @@ Server connection settings
|
||||
.. _history:
|
||||
.. config:option:: $cfg['Servers'][$i]['history']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 2.5.0 you can store your :term:`SQL` history, which means all
|
||||
@ -684,10 +712,12 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['history']` (e.g.
|
||||
``pma__history``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _recent:
|
||||
.. config:option:: $cfg['Servers'][$i]['recent']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 3.5.0 you can show recently used tables in the
|
||||
@ -697,7 +727,6 @@ Server connection settings
|
||||
of recent tables shown. When you select a table from the list, it will jump to
|
||||
the page specified in :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
|
||||
|
||||
|
||||
Without configuring the storage, you can still access the recently used tables,
|
||||
but it will disappear after you logout.
|
||||
|
||||
@ -707,10 +736,40 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['recent']` (e.g.
|
||||
``pma__recent``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _favorite:
|
||||
.. config:option:: $cfg['Servers'][$i]['favorite']
|
||||
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 4.2.0 you can show a list of selected tables in the
|
||||
navigation panel. It helps you to jump to the table directly, without
|
||||
the need to select the database, and then select the table. When you
|
||||
select a table from the list, it will jump to the page specified in
|
||||
:config:option:`$cfg['NavigationTreeDefaultTabTable']`.
|
||||
|
||||
You can add tables to this list or remove tables from it in database
|
||||
structure page by clicking on the star icons next to table names. Using
|
||||
:config:option:`$cfg['NumFavoriteTables']` you can configure the maximum
|
||||
number of favorite tables shown.
|
||||
|
||||
Without configuring the storage, you can still access the favorite tables,
|
||||
but it will disappear after you logout.
|
||||
|
||||
To allow the usage of this functionality persistently:
|
||||
|
||||
* set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['favorite']` (e.g.
|
||||
``pma__favorite``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _table_uiprefs:
|
||||
.. config:option:: $cfg['Servers'][$i]['table_uiprefs']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 3.5.0 phpMyAdmin can be configured to remember several
|
||||
@ -725,15 +784,17 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['table\_uiprefs']` (e.g.
|
||||
``pma__table_uiprefs``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _configurablemenus:
|
||||
.. config:option:: $cfg['Servers'][$i]['users']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
.. config:option:: $cfg['Servers'][$i]['usergroups']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 4.1.0 you can create different user groups with menu items
|
||||
@ -749,10 +810,12 @@ Server connection settings
|
||||
:config:option:`$cfg['Servers'][$i]['users']` (e.g. ``pma__users``) and
|
||||
:config:option:`$cfg['Servers'][$i]['usergroups']` (e.g. ``pma__usergroups``)
|
||||
|
||||
This feature can be disabled by setting either of the configurations to ``false``.
|
||||
|
||||
.. _navigationhiding:
|
||||
.. config:option:: $cfg['Servers'][$i]['navigationhiding']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 4.1.0 you can hide/show items in the navigation tree.
|
||||
@ -763,10 +826,12 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['navigationhiding']` (e.g.
|
||||
``pma__navigationhiding``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _central_columns:
|
||||
.. config:option:: $cfg['Servers'][$i]['central_columns']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 4.3.0 you can have a central list of columns per database.
|
||||
@ -782,10 +847,12 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['central_columns']` (e.g.
|
||||
``pma__central_columns``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _designer_settings:
|
||||
.. config:option:: $cfg['Servers'][$i]['designer_settings']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 4.5.0 your designer settings can be remembered.
|
||||
@ -798,10 +865,12 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['designer_settings']` (e.g.
|
||||
``pma__designer_settings``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _savedsearches:
|
||||
.. config:option:: $cfg['Servers'][$i]['savedsearches']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 4.2.0 you can save and load query-by-example searches from the Database > Query panel.
|
||||
@ -812,10 +881,12 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['savedsearches']` (e.g.
|
||||
``pma__savedsearches``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _export_templates:
|
||||
.. config:option:: $cfg['Servers'][$i]['export_templates']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 4.5.0 you can save and load export templates.
|
||||
@ -826,10 +897,12 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['export_templates']` (e.g.
|
||||
``pma__export_templates``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _tracking:
|
||||
.. config:option:: $cfg['Servers'][$i]['tracking']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 3.3.x a tracking mechanism is available. It helps you to
|
||||
@ -858,6 +931,7 @@ Server connection settings
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['tracking']` (e.g.
|
||||
``pma__tracking``)
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. _tracking2:
|
||||
.. config:option:: $cfg['Servers'][$i]['tracking_version_auto_create']
|
||||
@ -915,7 +989,7 @@ Server connection settings
|
||||
.. _userconfig:
|
||||
.. config:option:: $cfg['Servers'][$i]['userconfig']
|
||||
|
||||
:type: string
|
||||
:type: string or false
|
||||
:default: ``''``
|
||||
|
||||
Since release 3.4.x phpMyAdmin allows users to set most preferences by
|
||||
@ -931,6 +1005,8 @@ Server connection settings
|
||||
* set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
|
||||
* put the table name in :config:option:`$cfg['Servers'][$i]['userconfig']`
|
||||
|
||||
This feature can be disabled by setting the configuration to ``false``.
|
||||
|
||||
.. config:option:: $cfg['Servers'][$i]['MaxTableUiprefs']
|
||||
|
||||
:type: integer
|
||||
@ -1230,6 +1306,11 @@ Generic settings
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
.. deprecated:: 4.6.0
|
||||
|
||||
This setting is no longer available since phpMyAdmin 4.6.0. Please
|
||||
adjust your webserver instead.
|
||||
|
||||
Whether to force using https while accessing phpMyAdmin. In a reverse
|
||||
proxy setup, setting this to ``true`` is not supported.
|
||||
|
||||
@ -1507,12 +1588,11 @@ Navigation panel setup
|
||||
|
||||
.. config:option:: $cfg['NavigationTreeDbSeparator']
|
||||
|
||||
:type: string or array
|
||||
:type: string
|
||||
:default: ``'_'``
|
||||
|
||||
The string used to separate the parts of the database name when
|
||||
showing them in a tree. Alternatively you can specify more strings in
|
||||
an array and all of them will be used as a separator.
|
||||
showing them in a tree.
|
||||
|
||||
.. config:option:: $cfg['NavigationTreeTableSeparator']
|
||||
|
||||
@ -1542,6 +1622,14 @@ Navigation panel setup
|
||||
The maximum number of recently used tables shown in the navigation
|
||||
panel. Set this to 0 (zero) to disable the listing of recent tables.
|
||||
|
||||
.. config:option:: $cfg['NumFavoriteTables']
|
||||
|
||||
:type: integer
|
||||
:default: 10
|
||||
|
||||
The maximum number of favorite tables shown in the navigation
|
||||
panel. Set this to 0 (zero) to disable the listing of favorite tables.
|
||||
|
||||
.. config:option:: $cfg['ZeroConf']
|
||||
|
||||
:type: boolean
|
||||
@ -2114,8 +2202,7 @@ Languages
|
||||
Defines the default connection collation to use, if not user-defined.
|
||||
See the `MySQL documentation for charsets
|
||||
<http://dev.mysql.com/doc/mysql/en/charset-charsets.html>`_
|
||||
for list of possible values. This setting is
|
||||
ignored when connected to Drizzle server.
|
||||
for list of possible values.
|
||||
|
||||
.. config:option:: $cfg['Lang']
|
||||
|
||||
@ -2277,130 +2364,8 @@ Web server settings
|
||||
Theme settings
|
||||
--------------
|
||||
|
||||
.. config:option:: $cfg['NaviWidth']
|
||||
|
||||
:type: integer
|
||||
:default:
|
||||
|
||||
Navigation panel width in pixels. See
|
||||
:file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['NaviBackground']
|
||||
|
||||
:type: string [CSS color for background]
|
||||
:default:
|
||||
|
||||
.. config:option:: $cfg['MainBackground']
|
||||
|
||||
:type: string [CSS color for background]
|
||||
:default:
|
||||
|
||||
The background styles used for both the frames. See
|
||||
:file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['NaviPointerBackground']
|
||||
|
||||
:type: string [CSS color for background]
|
||||
:default:
|
||||
|
||||
.. config:option:: $cfg['NaviPointerColor']
|
||||
|
||||
:type: string [CSS color]
|
||||
:default:
|
||||
|
||||
The style used for the pointer in the navigation panel. See
|
||||
:file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['Border']
|
||||
|
||||
:type: integer
|
||||
:default:
|
||||
|
||||
The size of a table's border. See :file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['ThBackground']
|
||||
|
||||
:type: string [CSS color for background]
|
||||
:default:
|
||||
|
||||
.. config:option:: $cfg['ThColor']
|
||||
|
||||
:type: string [CSS color]
|
||||
:default:
|
||||
|
||||
The style used for table headers. See
|
||||
:file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. _cfg_BgcolorOne:
|
||||
.. config:option:: $cfg['BgOne']
|
||||
|
||||
:type: string [CSS color]
|
||||
:default:
|
||||
|
||||
The color (HTML) #1 for table rows. See
|
||||
:file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. _cfg_BgcolorTwo:
|
||||
.. config:option:: $cfg['BgTwo']
|
||||
|
||||
:type: string [CSS color]
|
||||
:default:
|
||||
|
||||
The color (HTML) #2 for table rows. See
|
||||
:file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['BrowsePointerBackground']
|
||||
|
||||
:type: string [CSS color]
|
||||
:default:
|
||||
|
||||
The background color used when hovering over a row in the Browse panel.
|
||||
See :file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['BrowsePointerColor']
|
||||
|
||||
:type: string [CSS color]
|
||||
:default:
|
||||
|
||||
The text color used when hovering over a row in the Browse panel.
|
||||
Used when :config:option:`$cfg['BrowsePointerEnable']` is true.
|
||||
See :file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['BrowseMarkerBackground']
|
||||
|
||||
:type: string [CSS color]
|
||||
:default:
|
||||
|
||||
The background color used to highlight a row selected by checkbox in the Browse panel or
|
||||
when a column is selected.
|
||||
Used when :config:option:`$cfg['BrowsePointerEnable']` is true.
|
||||
See :file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['BrowseMarkerColor']
|
||||
|
||||
:type: string [CSS color]
|
||||
:default:
|
||||
|
||||
The color used when you visually mark a row or column in the Browse panel.
|
||||
Rows can be marked by clicking the checkbox to the left of the row and columns can be
|
||||
marked by clicking the column's header (outside of the header text).
|
||||
See :file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['FontFamily']
|
||||
|
||||
:type: string
|
||||
:default:
|
||||
|
||||
You put here a valid CSS font family value, for example ``arial, sans-
|
||||
serif``. See :file:`themes/themename/layout.inc.php`.
|
||||
|
||||
.. config:option:: $cfg['FontFamilyFixed']
|
||||
|
||||
:type: string
|
||||
:default:
|
||||
|
||||
You put here a valid CSS font family value, for example ``monospace``.
|
||||
This one is used in textarea. See :file:`themes/themename/layout.inc.php`.
|
||||
Please directly modify :file:`themes/themename/layout.inc.php`, although
|
||||
your changes will be overwritten with the next update.
|
||||
|
||||
Design customization
|
||||
--------------------
|
||||
|
||||
632
doc/credits.rst
632
doc/credits.rst
@ -414,6 +414,12 @@ Credits, in chronological order
|
||||
|
||||
* Other UI improvements
|
||||
|
||||
* Deven Bansod (Google Summer of Code 2015)
|
||||
|
||||
* Print view using CSS
|
||||
|
||||
* Other UI improvements and new features
|
||||
|
||||
And also to the following people who have contributed minor changes,
|
||||
enhancements, bugfixes or support for a new language since version
|
||||
2.1.0:
|
||||
@ -435,192 +441,628 @@ Translators
|
||||
|
||||
Following people have contributed to translation of phpMyAdmin:
|
||||
|
||||
|
||||
|
||||
* Albanian
|
||||
|
||||
* Arben Çokaj <acokaj\_at\_shkoder.net>
|
||||
|
||||
|
||||
* Arabic
|
||||
|
||||
* Abdullah Al-Saedi <abdullah.10\_at\_windowslive.com>
|
||||
* Ahmed Saleh Abd El-Raouf Ismae <a.saleh.ismael\_at\_gmail.com>
|
||||
* Ahmed Saad <egbrave\_at\_hotmail.com>
|
||||
* hassan mokhtari <persiste1\_at\_gmail.com>
|
||||
|
||||
|
||||
* Armenian
|
||||
|
||||
* Andrey Aleksanyants <aaleksanyants\_at\_yahoo.com>
|
||||
|
||||
|
||||
* Azerbaijani
|
||||
|
||||
* Mircəlal <01youknowme\_at\_gmail.com>
|
||||
* Huseyn <huseyn_esgerov\_at\_mail.ru>
|
||||
* Sevdimali İsa <sevdimaliisayev\_at\_mail.ru>
|
||||
* Jafar <sharifov\_at\_programmer.net>
|
||||
|
||||
|
||||
* Belarusian
|
||||
|
||||
* Viktar Palstsiuk <vipals\_at\_gmail.com>
|
||||
|
||||
|
||||
* Bulgarian
|
||||
|
||||
* stoyanster <stoyanster\_at\_gmail.com>
|
||||
* Boyan Kehayov <bkehayov\_at\_gmail.com>
|
||||
* Valter Georgiev <blagynchy\_at\_gmail.com>
|
||||
* Valentin Mladenov <hudsonvsm\_at\_gmail.com>
|
||||
* P <plamen_mbx\_at\_yahoo.com>
|
||||
* krasimir <vip\_at\_krasio-valia.com>
|
||||
|
||||
|
||||
* Catalan
|
||||
|
||||
* Xavier Navarro <xvnavarro\_at\_gmail.com>
|
||||
* josep constanti <jconstanti\_at\_yahoo.es>
|
||||
* Xavier Navarro <xvnavarro\_at\_gmail.com>
|
||||
|
||||
|
||||
* Chinese (China)
|
||||
|
||||
* Vincent Lau <3092849\_at\_qq.com>
|
||||
* Zheng Dan <clanboy\_at\_163.com>
|
||||
* disorderman <disorderman\_at\_qq.com>
|
||||
* Rex Lee <duguying2008\_at\_gmail.com>
|
||||
* <fundawang\_at\_gmail.com>
|
||||
* popcorner <memoword\_at\_163.com>
|
||||
* Yizhou Qiang <qyz.yswy\_at\_hotmail.com>
|
||||
* zz <tczzjin\_at\_gmail.com>
|
||||
* Terry Weng <wengshiyu\_at\_gmail.com>
|
||||
* whh <whhlcj\_at\_126.com>
|
||||
|
||||
|
||||
* Chinese (Taiwan)
|
||||
|
||||
* Albert Song <albb0920\_at\_gmail.com>
|
||||
* Chien Wei Lin <cwlin0416\_at\_gmail.com>
|
||||
* LNDDYL <lnddyl\_at\_outlook.com>
|
||||
* Peter Dave Hello <xs910203\_at\_gmail.com>
|
||||
|
||||
|
||||
* Colognian
|
||||
|
||||
* Purodha <publi\_at\_web.de>
|
||||
|
||||
|
||||
* Czech
|
||||
|
||||
* Michal Čihař <michal\_at\_cihar.com>
|
||||
* Aleš Hakl <ales\_at\_hakl.net>
|
||||
* Dalibor Straka <dalibor.straka3\_at\_gmail.com>
|
||||
* Martin Vidner <martin\_at\_vidner.net>
|
||||
* Ondra Šimeček <ondrasek.simecek\_at\_gmail.com>
|
||||
* Jan Palider <palider\_at\_seznam.cz>
|
||||
* Petr Kateřiňák <petr.katerinak\_at\_gmail.com>
|
||||
|
||||
|
||||
* Danish
|
||||
|
||||
* opensource <opensource\_at\_jth.net>
|
||||
* Jørgen Thomsen <opensource\_at\_jth.net>
|
||||
* Aputsiaĸ Niels Janussen <aj\_at\_isit.gl>
|
||||
* Dennis Jakobsen <dennis.jakobsen\_at\_gmail.com>
|
||||
* Jonas <jonas.den.smarte\_at\_gmail.com>
|
||||
* Claus Svalekjaer <just.my.smtp.server\_at\_gmail.com>
|
||||
|
||||
* German
|
||||
|
||||
* mrbendig <mrbendig\_at\_mrbendig.com>
|
||||
* torsten.funck <torsten.funck\_at\_googlemail.com>
|
||||
* Sven Strickroth <email\_at\_cs-ware.de>
|
||||
* typo3 <typo3\_at\_dirk-weise.de>
|
||||
* Jo Michael <me\_at\_mynetx.net>
|
||||
|
||||
* Greek
|
||||
|
||||
* Panagiotis Papazoglou <papaz_p\_at\_yahoo.com>
|
||||
|
||||
* English (United Kingdom)
|
||||
|
||||
* Robert Readman <robert_readman\_at\_hotmail.com>
|
||||
|
||||
* Spanish
|
||||
|
||||
* Matías Bellone <matiasbellone\_at\_gmail.com>
|
||||
|
||||
* French
|
||||
|
||||
* Marc Delisle <marc\_at\_infomarc.info>
|
||||
|
||||
* Hindi
|
||||
|
||||
* u4663530 <u4663530\_at\_anu.edu.au>
|
||||
* rsedwardian <rsedwardian\_at\_gmail.com>
|
||||
|
||||
* Hungarian
|
||||
|
||||
* gergo314 <gergo314\_at\_gmail.com>
|
||||
|
||||
* Italian
|
||||
|
||||
* Rouslan Placella <rouslan\_at\_placella.com>
|
||||
|
||||
* Japanese
|
||||
|
||||
* Yuichiro <yuichiro\_at\_pop07.odn.ne.jp>
|
||||
|
||||
* Lithuanian
|
||||
|
||||
* Kęstutis <forkik\_at\_gmail.com>
|
||||
|
||||
* Norwegian Bokmål
|
||||
|
||||
* Sven-Erik Andersen <sven.erik.andersen\_at\_gmail.com>
|
||||
|
||||
* Dutch
|
||||
|
||||
* Dieter Adriaenssens <ruleant\_at\_users.sourceforge.net>
|
||||
* Herman van Rink <rink\_at\_initfour.nl>
|
||||
* A. Voogt <a.voogt\_at\_hccnet.nl>
|
||||
* dingo thirteen <dingo13\_at\_gmail.com>
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
* Dieter Adriaenssens <ruleant\_at\_users.sourceforge.net>
|
||||
* Niko Strijbol <strijbol.niko\_at\_gmail.com>
|
||||
|
||||
|
||||
* English (United Kingdom)
|
||||
|
||||
* Dries Verschuere <dries.verschuere\_at\_outlook.com>
|
||||
* Francisco Rocha <j.francisco.o.rocha\_at\_zoho.com>
|
||||
* Marc Delisle <marc\_at\_infomarc.info>
|
||||
* Marek Tomaštík <tomastik.m\_at\_gmail.com>
|
||||
|
||||
|
||||
* Esperanto
|
||||
|
||||
* Eliovir <eliovir\_at\_gmail.com>
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
|
||||
|
||||
* Estonian
|
||||
|
||||
* Kristjan Räts <kristjanrats\_at\_gmail.com>
|
||||
|
||||
|
||||
* Finnish
|
||||
|
||||
* Juha <jremes\_at\_outlook.com>
|
||||
* Lari Oesch <lari\_at\_oesch.me>
|
||||
|
||||
|
||||
* French
|
||||
|
||||
* Marc Delisle <marc\_at\_infomarc.info>
|
||||
|
||||
|
||||
* Frisian
|
||||
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
|
||||
|
||||
* Galician
|
||||
|
||||
* Xosé Calvo <xosecalvo\_at\_gmail.com>
|
||||
|
||||
|
||||
* German
|
||||
|
||||
* Julian Ladisch <github.com-t3if\_at\_ladisch.de>
|
||||
* Jan Erik Zassenhaus <jan.zassenhaus\_at\_jgerman.de>
|
||||
* Lasse Goericke <lasse\_at\_mydom.de>
|
||||
* Matthias Bluthardt <matthias\_at\_bluthardt.org>
|
||||
* Michael Koch <michael.koch\_at\_enough.de>
|
||||
* Ann + J.M. <phpMyAdmin\_at\_ZweiSteinSoft.de>
|
||||
* <pma\_at\_sebastianmendel.de>
|
||||
* Phillip Rohmberger <rohmberger\_at\_hotmail.de>
|
||||
* Hauke Henningsen <sqrt\_at\_entless.org>
|
||||
|
||||
|
||||
* Greek
|
||||
|
||||
* Παναγιώτης Παπάζογλου <papaz_p\_at\_yahoo.com>
|
||||
|
||||
|
||||
* Hebrew
|
||||
|
||||
* Moshe Harush <mmh15\_at\_windowslive.com>
|
||||
* Yaron Shahrabani <sh.yaron\_at\_gmail.com>
|
||||
* Eyal Visoker <visokereyal\_at\_gmail.com>
|
||||
|
||||
|
||||
* Hindi
|
||||
|
||||
* Atul Pratap Singh <atulpratapsingh05\_at\_gmail.com>
|
||||
* Yogeshwar <charanyogeshwar\_at\_gmail.com>
|
||||
* Deven Bansod <devenbansod.bits\_at\_gmail.com>
|
||||
* Kushagra Pandey <kushagra4296\_at\_gmail.com>
|
||||
* Nisarg Jhaveri <nisargjhaveri\_at\_gmail.com>
|
||||
* Roohan Kazi <roohan_cena\_at\_yahoo.co.in>
|
||||
* Yugal Pantola <yug.scorpio\_at\_gmail.com>
|
||||
|
||||
|
||||
* Hungarian
|
||||
|
||||
* Akos Eros <erosakos02\_at\_gmail.com>
|
||||
* Dániel Tóth <leedermeister\_at\_gmail.com>
|
||||
* Szász Attila <undernetangel\_at\_gmail.com>
|
||||
* Balázs Úr <urbalazs\_at\_gmail.com>
|
||||
|
||||
|
||||
* Indonesian
|
||||
|
||||
* Deky Arifianto <Deky40\_at\_gmail.com>
|
||||
* Andika Triwidada <andika\_at\_gmail.com>
|
||||
* Dadan Setia <da2n_s\_at\_yahoo.co.id>
|
||||
* Dadan Setia <dadan.setia\_at\_gmail.com>
|
||||
* Yohanes Edwin <edwin\_at\_yohanesedwin.com>
|
||||
* Fadhiil Rachman <fadhiilrachman\_at\_gmail.com>
|
||||
* Benny <tarzq28\_at\_gmail.com>
|
||||
* Tommy Surbakti <tommy\_at\_surbakti.net>
|
||||
* Zufar Fathi Suhardi <zufar.bogor\_at\_gmail.com>
|
||||
|
||||
|
||||
* Interlingua
|
||||
|
||||
* Giovanni Sora <g.sora\_at\_tiscali.it>
|
||||
|
||||
|
||||
* Italian
|
||||
|
||||
* Francesco Saverio Giacobazzi <francesco.giacobazzi\_at\_ferrania.it>
|
||||
* Marco Pozzato <ironpotts\_at\_gmail.com>
|
||||
* Stefano Martinelli <stefano.ste.martinelli\_at\_gmail.com>
|
||||
|
||||
|
||||
* Japanese
|
||||
|
||||
* k725 <alexalex.kobayashi\_at\_gmail.com>
|
||||
* Hiroshi Chiyokawa <hiroshi.chiyokawa\_at\_gmail.com>
|
||||
* Masahiko HISAKAWA <orzkun\_at\_ageage.jp>
|
||||
* worldwideskier <worldwideskier\_at\_yahoo.co.jp>
|
||||
|
||||
|
||||
* Kannada
|
||||
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
* Shameem Ahmed A Mulla <shameem.sam\_at\_gmail.com>
|
||||
|
||||
|
||||
* Korean
|
||||
|
||||
* Bumsoo Kim <bskim45\_at\_gmail.com>
|
||||
* Kyeong Su Shin <cdac1234\_at\_gmail.com>
|
||||
* Dongyoung Kim <dckyoung\_at\_gmail.com>
|
||||
* Myung-han Yu <greatymh\_at\_gmail.com>
|
||||
* JongDeok <human.zion\_at\_gmail.com>
|
||||
* Yong Kim <kim\_at\_nhn.com>
|
||||
* 이경준 <kyungjun2\_at\_gmail.com>
|
||||
* Seongki Shin <skshin\_at\_gmail.com>
|
||||
* Yoon Bum-Jong <virusyoon\_at\_gmail.com>
|
||||
* Koo Youngmin <youngminz.kr\_at\_gmail.com>
|
||||
|
||||
|
||||
* Kurdish Sorani
|
||||
|
||||
* Alan Hilal <alan.hilal94\_at\_gmail.com>
|
||||
* Aso Naderi <aso.naderi\_at\_gmail.com>
|
||||
* muhammad <esy_vb\_at\_yahoo.com>
|
||||
* Zrng Abdulla <zhyarabdulla94\_at\_gmail.com>
|
||||
|
||||
|
||||
* Latvian
|
||||
|
||||
* Latvian TV <dnighttv\_at\_gmail.com>
|
||||
* Edgars Neimanis <edgarsneims5092\_at\_inbox.lv>
|
||||
* Ukko <perkontevs\_at\_gmail.com>
|
||||
|
||||
|
||||
* Limburgish
|
||||
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
|
||||
|
||||
* Lithuanian
|
||||
|
||||
* Vytautas Motuzas <v.motuzas\_at\_gmail.com>
|
||||
|
||||
|
||||
* Malay
|
||||
|
||||
* Amir Hamzah <amir.overlord666\_at\_gmail.com>
|
||||
* diprofinfiniti <anonynuine-999\_at\_yahoo.com>
|
||||
|
||||
|
||||
* Nepali
|
||||
|
||||
* Nabin Ghimire <nnabinn\_at\_hotmail.com>
|
||||
|
||||
|
||||
* Norwegian Bokmål
|
||||
|
||||
* Børge Holm-Wennberg <borge947\_at\_gmail.com>
|
||||
* Tor Stokkan <danorse\_at\_gmail.com>
|
||||
* Espen Frøyshov <efroys\_at\_gmail.com>
|
||||
* Kurt Eilertsen <kurt\_at\_kheds.com>
|
||||
* Christoffer Haugom <ph3n1x.nobody\_at\_gmail.com>
|
||||
* Sebastian <sebastian\_at\_sgundersen.com>
|
||||
* Tomas <tomas\_at\_tomasruud.com>
|
||||
|
||||
|
||||
* Persian
|
||||
|
||||
* ashkan shirian <ashkan.shirian\_at\_gmail.com>
|
||||
* HM <goodlinuxuser\_at\_chmail.ir>
|
||||
|
||||
|
||||
* Polish
|
||||
|
||||
* Stanisław Krukowski <stankruk\_at\_neostrada.pl>
|
||||
* Marcin Kozioł <lord_dark\_at\_wp.pl>
|
||||
* Andrzej <andrzej\_at\_kynu.pl>
|
||||
* Przemo <info\_at\_opsbielany.waw.pl>
|
||||
* Krystian Biesaga <krystian4842\_at\_gmail.com>
|
||||
* Maciej Gryniuk <maciejka45\_at\_gmail.com>
|
||||
* Michał VonFlynee <vonflynee\_at\_gmail.com>
|
||||
|
||||
|
||||
* Portuguese
|
||||
|
||||
* JoaoTMDias <contacto\_at\_joaodias.me>
|
||||
* Alexandre Badalo <alexandre.badalo\_at\_sapo.pt>
|
||||
* João Rodrigues <geral\_at\_jonilive.com>
|
||||
* Pedro Ribeiro <p.m42.ribeiro\_at\_gmail.com>
|
||||
* Sandro Amaral <sandro123iv\_at\_gmail.com>
|
||||
|
||||
|
||||
* Portuguese (Brazil)
|
||||
|
||||
* wiltave <wiltave\_at\_gmail.com>
|
||||
* emerson4br <emerson4br\_at\_gmail.com>
|
||||
* Alex Rohleder <alexrohleder96\_at\_outlook.com>
|
||||
* bruno mendax <brunomendax\_at\_gmail.com>
|
||||
* Danilo GUia <danilo.eng\_at\_globomail.com>
|
||||
* Douglas Rafael Morais Kollar <douglas.kollar\_at\_pg.df.gov.br>
|
||||
* Douglas Eccker <douglaseccker\_at\_hotmail.com>
|
||||
* Ed Jr <edjacobjunior\_at\_gmail.com>
|
||||
* Guilherme Souza Silva <g.szsilva\_at\_gmail.com>
|
||||
* Guilherme Seibt <gui\_at\_webseibt.net>
|
||||
* Helder Santana <helder.bs.santana\_at\_gmail.com>
|
||||
* Junior Zancan <jrzancan\_at\_hotmail.com>
|
||||
* Luis <luis.eduardo.braschi\_at\_outlook.com>
|
||||
* Marcos Algeri <malgeri\_at\_gmail.com>
|
||||
* Marc Delisle <marc\_at\_infomarc.info>
|
||||
* Renato Rodrigues de Lima Júnio <renatomdd\_at\_yahoo.com.br>
|
||||
* Thiago Casotti <thiago.casotti\_at\_uol.com.br>
|
||||
* Victor Laureano <victor.laureano\_at\_gmail.com>
|
||||
* Vinícius Araújo <vinipitta\_at\_gmail.com>
|
||||
* Washington Bruno Rodrigues Cav <washingtonbruno\_at\_msn.com>
|
||||
* Yan Gabriel <yansilvagabriel\_at\_gmail.com>
|
||||
|
||||
|
||||
* Punjabi
|
||||
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
|
||||
|
||||
* Romanian
|
||||
|
||||
* alexukf <alex.ukf\_at\_gmail.com>
|
||||
* Alex <amihaita\_at\_yahoo.com>
|
||||
* Costel Cocerhan <costa1988sv\_at\_gmail.com>
|
||||
* Ion Adrian-Ionut <john\_at\_panevo.ro>
|
||||
* Raul Molnar <molnar.raul\_at\_wservices.eu>
|
||||
* Deleted User <noreply\_at\_weblate.org>
|
||||
* Stefan Murariu <stefan.murariu\_at\_yahoo.com>
|
||||
|
||||
|
||||
* Russian
|
||||
|
||||
* Victor Volkov <hanut\_at\_php-myadmin.ru>
|
||||
* Andrey Aleksanyants <aaleksanyants\_at\_yahoo.com>
|
||||
* <ddrmoscow\_at\_gmail.com>
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
* Хомутов Иван Сергеевич <khomutov.ivan\_at\_mail.ru>
|
||||
* Alexey Rubinov <orion1979\_at\_yandex.ru>
|
||||
* Олег Карпов <salvadoporjc\_at\_gmail.com>
|
||||
* Egorov Artyom <unlucky\_at\_inbox.ru>
|
||||
|
||||
|
||||
* Serbian
|
||||
|
||||
* Smart Kid <kidsmart33\_at\_gmail.com>
|
||||
|
||||
|
||||
* Sinhala
|
||||
|
||||
* Madhura Jayaratne <madhura.cj\_at\_gmail.com>
|
||||
* Madhura Jayaratne <madhura.cj\_at\_gmail.com>
|
||||
|
||||
|
||||
* Slovak
|
||||
|
||||
* Martin Lacina <martin\_at\_whistler.sk>
|
||||
* Martin Lacina <martin\_at\_whistler.sk>
|
||||
* Patrik Kollmann <parkourpotex\_at\_gmail.com>
|
||||
* Jozef Pistej <pistej2\_at\_gmail.com>
|
||||
|
||||
|
||||
* Slovenian
|
||||
|
||||
* Domen <dbc334\_at\_gmail.com>
|
||||
* Domen <mitenem\_at\_outlook.com>
|
||||
|
||||
|
||||
* Spanish
|
||||
|
||||
* Luis García Sevillano <floss.dev\_at\_gmail.com>
|
||||
* Franco <fulanodetal.github1\_at\_openaliasbox.org>
|
||||
* Luis Ruiz <luisan00\_at\_hotmail.com>
|
||||
* Macofe <macofe.languagetool\_at\_gmail.com>
|
||||
* Matías Bellone <matiasbellone+weblate\_at\_gmail.com>
|
||||
* Rodrigo A. <ra4\_at\_openmailbox.org>
|
||||
* FAMMA TV NOTICIAS MEDIOS DE CO <revistafammatvmusic.oficial\_at\_gmail.com>
|
||||
* Ronnie Simon <ronniesimonf\_at\_gmail.com>
|
||||
|
||||
|
||||
* Swedish
|
||||
|
||||
* stefan <stefan\_at\_inkopsforum.se>
|
||||
* Anders Jonsson <anders.jonsson\_at\_norsjovallen.se>
|
||||
|
||||
|
||||
* Tamil
|
||||
|
||||
* ysajeepan <ysajeepan\_at\_live.com>
|
||||
* கணேஷ் குமார் <GANESHTHEONE\_at\_gmail.com>
|
||||
* Achchuthan Yogarajah <achch1990\_at\_gmail.com>
|
||||
* Rifthy Ahmed <rifthy456\_at\_gmail.com>
|
||||
|
||||
* Telugu
|
||||
|
||||
* veeven <veeven\_at\_gmail.com>
|
||||
|
||||
* Thai
|
||||
|
||||
* kanitchet <kanichet\_at\_hotmail.com>
|
||||
* <nontawat39\_at\_gmail.com>
|
||||
* Somthanat W. <somthanat\_at\_gmail.com>
|
||||
|
||||
|
||||
* Turkish
|
||||
|
||||
* Burak Yavuz <hitowerdigit\_at\_hotmail.com>
|
||||
* Burak Yavuz <hitowerdigit\_at\_hotmail.com>
|
||||
|
||||
* Uighur
|
||||
|
||||
* gheni <gheni\_at\_yahoo.cn>
|
||||
|
||||
* Ukrainian
|
||||
|
||||
* typim <duke3d\_at\_ukr.net>
|
||||
* oleg-ilnytskyi <ukraine.oleg\_at\_gmail.com>
|
||||
* Сергій Педько <nitrotoll\_at\_gmail.com>
|
||||
* Igor <vmta\_at\_yahoo.com>
|
||||
* Vitaliy Perekupka <vperekupka\_at\_gmail.com>
|
||||
|
||||
* Urdu
|
||||
|
||||
* Mehbooob Khan <mehboobbugti\_at\_gmail.com>
|
||||
* Vietnamese
|
||||
|
||||
* Simplified Chinese
|
||||
* Bao Phan <baophan94\_at\_icloud.com>
|
||||
* Xuan Hung <mr.hungdx\_at\_gmail.com>
|
||||
* Bao trinh minh <trinhminhbao\_at\_gmail.com>
|
||||
|
||||
* shanyan baishui <Siramizu\_at\_gmail.com>
|
||||
|
||||
* Traditional Chinese
|
||||
* West Flemish
|
||||
|
||||
* star <star\_at\_origin.club.tw>
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
|
||||
Documentation translators
|
||||
+++++++++++++++++++++++++
|
||||
|
||||
Following people have contributed to translation of phpMyAdmin documentation:
|
||||
|
||||
* Albanian
|
||||
|
||||
* Arben Çokaj <acokaj\_at\_shkoder.net>
|
||||
|
||||
|
||||
* Arabic
|
||||
|
||||
* Ahmed El Azzabi <ahmedtek1993\_at\_gmail.com>
|
||||
* Omar Essam <omar_2412\_at\_live.com>
|
||||
|
||||
|
||||
* Armenian
|
||||
|
||||
* Andrey Aleksanyants <aaleksanyants\_at\_yahoo.com>
|
||||
|
||||
|
||||
* Azerbaijani
|
||||
|
||||
* Mircəlal <01youknowme\_at\_gmail.com>
|
||||
* Sevdimali İsa <sevdimaliisayev\_at\_mail.ru>
|
||||
|
||||
|
||||
* Catalan
|
||||
|
||||
* josep constanti <jconstanti\_at\_yahoo.es>
|
||||
* Joan Montané <joan\_at\_montane.cat>
|
||||
* Xavier Navarro <xvnavarro\_at\_gmail.com>
|
||||
|
||||
|
||||
* Chinese (China)
|
||||
|
||||
* Vincent Lau <3092849\_at\_qq.com>
|
||||
* 罗攀登 <6375lpd\_at\_gmail.com>
|
||||
* disorderman <disorderman\_at\_qq.com>
|
||||
* ITXiaoPang <djh1017555\_at\_126.com>
|
||||
* tunnel213 <tunnel213\_at\_aliyun.com>
|
||||
* Terry Weng <wengshiyu\_at\_gmail.com>
|
||||
* whh <whhlcj\_at\_126.com>
|
||||
|
||||
|
||||
* Chinese (Taiwan)
|
||||
|
||||
* Chien Wei Lin <cwlin0416\_at\_gmail.com>
|
||||
* Peter Dave Hello <xs910203\_at\_gmail.com>
|
||||
|
||||
|
||||
* Czech
|
||||
|
||||
* Michal Čihař <michal\_at\_cihar.com>
|
||||
* Aleš Hakl <ales\_at\_hakl.net>
|
||||
* Michal Čihař <michal\_at\_cihar.com>
|
||||
* Jan Palider <palider\_at\_seznam.cz>
|
||||
* Petr Kateřiňák <petr.katerinak\_at\_gmail.com>
|
||||
|
||||
* Greek
|
||||
|
||||
* Panagiotis Papazoglou <papaz_p\_at\_yahoo.com>
|
||||
* Danish
|
||||
|
||||
* English (United Kingdom)
|
||||
* Aputsiaĸ Niels Janussen <aj\_at\_isit.gl>
|
||||
* Claus Svalekjaer <just.my.smtp.server\_at\_gmail.com>
|
||||
|
||||
|
||||
* Dutch
|
||||
|
||||
* A. Voogt <a.voogt\_at\_hccnet.nl>
|
||||
* dingo thirteen <dingo13\_at\_gmail.com>
|
||||
* Dries Verschuere <dries.verschuere\_at\_outlook.com>
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
* Stefan Koolen <nast3zz\_at\_gmail.com>
|
||||
* Ray Borggreve <ray\_at\_datahuis.net>
|
||||
* Dieter Adriaenssens <ruleant\_at\_users.sourceforge.net>
|
||||
* Tom Hofman <tom.hofman\_at\_gmail.com>
|
||||
|
||||
|
||||
* Estonian
|
||||
|
||||
* Kristjan Räts <kristjanrats\_at\_gmail.com>
|
||||
|
||||
|
||||
* Finnish
|
||||
|
||||
* Juha <jremes\_at\_outlook.com>
|
||||
|
||||
* Robert Readman <robert_readman\_at\_hotmail.com>
|
||||
|
||||
* French
|
||||
|
||||
* Cédric Corazza <cedric.corazza\_at\_wanadoo.fr>
|
||||
* Cédric Corazza <cedric.corazza\_at\_wanadoo.fr>
|
||||
* Étienne Gilli <etienne.gilli\_at\_gmail.com>
|
||||
* Marc Delisle <marc\_at\_infomarc.info>
|
||||
* Donavan_Martin <mart.donavan\_at\_hotmail.com>
|
||||
|
||||
|
||||
* Frisian
|
||||
|
||||
* Robin van der Vliet <info\_at\_robinvandervliet.nl>
|
||||
|
||||
|
||||
* Galician
|
||||
|
||||
* Xosé Calvo <xosecalvo\_at\_gmail.com>
|
||||
|
||||
|
||||
* German
|
||||
|
||||
* Daniel <d.gnauk89\_at\_googlemail.com>
|
||||
* JH M <janhenrikm\_at\_yahoo.de>
|
||||
* Lasse Goericke <lasse\_at\_mydom.de>
|
||||
* Michael Koch <michael.koch\_at\_enough.de>
|
||||
* Ann + J.M. <phpMyAdmin\_at\_ZweiSteinSoft.de>
|
||||
* Niemand Jedermann <predatorix\_at\_web.de>
|
||||
* Phillip Rohmberger <rohmberger\_at\_hotmail.de>
|
||||
* Hauke Henningsen <sqrt\_at\_entless.org>
|
||||
|
||||
|
||||
* Greek
|
||||
|
||||
* Παναγιώτης Παπάζογλου <papaz_p\_at\_yahoo.com>
|
||||
|
||||
|
||||
* Hungarian
|
||||
|
||||
* Balázs Úr <urbalazs\_at\_gmail.com>
|
||||
|
||||
|
||||
* Italian
|
||||
|
||||
* Francesco Saverio Giacobazzi <francesco.giacobazzi\_at\_ferrania.it>
|
||||
* Marco Pozzato <ironpotts\_at\_gmail.com>
|
||||
* Stefano Martinelli <stefano.ste.martinelli\_at\_gmail.com>
|
||||
* TWS <tablettws\_at\_gmail.com>
|
||||
|
||||
|
||||
* Japanese
|
||||
|
||||
* Yuichiro Takahashi <yuichiro\_at\_pop07.odn.ne.jp>
|
||||
* Eshin Kunishima <ek\_at\_luna.miko.im>
|
||||
* Hiroshi Chiyokawa <hiroshi.chiyokawa\_at\_gmail.com>
|
||||
|
||||
* Polish
|
||||
|
||||
* Stanisław Krukowski <stankruk\_at\_neostrada.pl>
|
||||
* Lithuanian
|
||||
|
||||
* Jur Kis <atvejis\_at\_gmail.com>
|
||||
* Dovydas <dovy.buz\_at\_gmail.com>
|
||||
|
||||
|
||||
* Norwegian Bokmål
|
||||
|
||||
* Tor Stokkan <danorse\_at\_gmail.com>
|
||||
* Kurt Eilertsen <kurt\_at\_kheds.com>
|
||||
|
||||
|
||||
* Portuguese (Brazil)
|
||||
|
||||
* mjaning <mjaning\_at\_gmail.com>
|
||||
* Alexandre Moretti <alemoretti2010\_at\_hotmail.com>
|
||||
* Douglas Rafael Morais Kollar <douglas.kollar\_at\_pg.df.gov.br>
|
||||
* Guilherme Seibt <gui\_at\_webseibt.net>
|
||||
* Helder Santana <helder.bs.santana\_at\_gmail.com>
|
||||
* Michal Čihař <michal\_at\_cihar.com>
|
||||
* Michel Souza <michel.ekio\_at\_gmail.com>
|
||||
* Danilo Azevedo <mrdaniloazevedo\_at\_gmail.com>
|
||||
* Thiago Casotti <thiago.casotti\_at\_uol.com.br>
|
||||
* Vinícius Araújo <vinipitta\_at\_gmail.com>
|
||||
* Yan Gabriel <yansilvagabriel\_at\_gmail.com>
|
||||
|
||||
|
||||
* Slovak
|
||||
|
||||
* Martin Lacina <martin\_at\_whistler.sk>
|
||||
* Michal Čihař <michal\_at\_cihar.com>
|
||||
* Jozef Pistej <pistej2\_at\_gmail.com>
|
||||
|
||||
|
||||
* Slovenian
|
||||
|
||||
* Domen <dbc334\_at\_gmail.com>
|
||||
* Domen <mitenem\_at\_outlook.com>
|
||||
|
||||
|
||||
* Spanish
|
||||
|
||||
* Luis García Sevillano <floss.dev\_at\_gmail.com>
|
||||
* Franco <fulanodetal.github1\_at\_openaliasbox.org>
|
||||
* Matías Bellone <matiasbellone+weblate\_at\_gmail.com>
|
||||
* Ronnie Simon <ronniesimonf\_at\_gmail.com>
|
||||
|
||||
|
||||
* Turkish
|
||||
|
||||
* Burak Yavuz <hitowerdigit\_at\_hotmail.com>
|
||||
|
||||
Original Credits of Version 2.1.0
|
||||
+++++++++++++++++++++++++++++++++
|
||||
|
||||
28
doc/faq.rst
28
doc/faq.rst
@ -195,8 +195,6 @@ For older MySQL versions, our `Downloads <https://www.phpmyadmin.net/downloads/>
|
||||
|
||||
For `MariaDB <http://mariadb.org/>`_, versions 5.5 and newer are supported.
|
||||
|
||||
For `Drizzle <http://www.drizzle.org>`_, versions 7.1 and newer are supported.
|
||||
|
||||
.. _faq1_17a:
|
||||
|
||||
1.17a I cannot connect to the MySQL server. It always returns the error message, "Client does not support authentication protocol requested by server; consider upgrading MySQL client"
|
||||
@ -611,6 +609,25 @@ some robots accessing your installation.
|
||||
|
||||
Because your PHP's ``memory_limit`` is too low; adjust it in :file:`php.ini`.
|
||||
|
||||
.. _faq1:44:
|
||||
|
||||
1.44 How can I reduce the installed size of phpMyAdmin on disk?
|
||||
---------------------------------------------------------------
|
||||
|
||||
Some users have requested to be able to reduce the size of the phpMyAdmin installation.
|
||||
This is not recommended and could lead to confusion over missing features, but can be done.
|
||||
A list of files and corresponding functionality which degrade gracefully when removed include:
|
||||
|
||||
* :file:`./libraries/tcpdf` folder (exporting to PDF)
|
||||
* :file:`./locale/` folder, or unused subfolders (interface translations)
|
||||
* Any unused themes in :file:`./themes/`
|
||||
* :file:`./js/jquery/src/` (included for licensing reasons)
|
||||
* :file:`./js/line_counts.php`
|
||||
* :file:`./doc/` (documentation)
|
||||
* :file:`./setup/` (setup script)
|
||||
* :file:`./examples/`
|
||||
* :file:`./sql/` (SQL scripts to configure advanced functionality)
|
||||
|
||||
.. _faqconfig:
|
||||
|
||||
Configuration
|
||||
@ -695,8 +712,11 @@ revision.
|
||||
2.5 Each time I want to insert or change a row or drop a database or a table, an error 404 (page not found) is displayed or, with HTTP or cookie authentication, I'm asked to log in again. What's wrong?
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Check the value you set for the :config:option:`$cfg['PmaAbsoluteUri']` directive in the phpMyAdmin
|
||||
configuration file.
|
||||
Check your webserver setup if it correctly fills in either PHP_SELF or REQUEST_URI variables.
|
||||
|
||||
If you are running phpMyAdmin older than 4.6.0, you can also check the value
|
||||
you set for the :config:option:`$cfg['PmaAbsoluteUri']` directive in the
|
||||
phpMyAdmin configuration file.
|
||||
|
||||
.. _faq2_6:
|
||||
|
||||
|
||||
@ -31,6 +31,10 @@ PHP
|
||||
* To support reCAPTCHA on the login page, you need the
|
||||
`openssl <http://www.php.net/openssl>`_ extension.
|
||||
|
||||
* To support displaying phpMyAdmin's latest version, you need to enable
|
||||
``allow_url_open`` in your :file:`php.ini` or to have the
|
||||
`curl <http://www.php.net/curl>`_ extension.
|
||||
|
||||
* Performance suggestion: install the ``ctype`` extension.
|
||||
|
||||
.. seealso:: :ref:`faq1_31`, :ref:`authentication_modes`
|
||||
@ -42,7 +46,6 @@ phpMyAdmin supports MySQL-compatible databases.
|
||||
|
||||
* MySQL 5.5 or newer
|
||||
* MariaDB 5.5 or newer
|
||||
* Drizzle
|
||||
|
||||
.. seealso:: :ref:`faq1_17`
|
||||
|
||||
@ -52,3 +55,5 @@ Web browser
|
||||
To access phpMyAdmin you need a web browser with cookies and JavaScript
|
||||
enabled.
|
||||
|
||||
You need browser which is supported by jQuery 2.0, see
|
||||
<https://jquery.com/browser-support/>.
|
||||
|
||||
111
doc/setup.rst
111
doc/setup.rst
@ -87,6 +87,104 @@ which include phpMyAdmin together with a database and web server such as
|
||||
You can find more of such options at `Wikipedia <https://en.wikipedia.org/wiki/List_of_AMP_packages>`_.
|
||||
|
||||
|
||||
Installing using Composer
|
||||
+++++++++++++++++++++++++
|
||||
|
||||
You can install phpMyAdmin using `Composer <https://getcomposer.org/>`_,
|
||||
however it's currently not available in the default
|
||||
`Packagist <https://packagist.org/>`_ repository due to its technical
|
||||
limitations.
|
||||
|
||||
The installation is possible by adding our own repository
|
||||
<https://www.phpmyadmin.net/packages.json>:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
composer create-project phpmyadmin/phpmyadmin --repository-url=https://www.phpmyadmin.net/packages.json --no-dev
|
||||
|
||||
Installing using Docker
|
||||
+++++++++++++++++++++++
|
||||
|
||||
phpMyAdmin comes with a Docker image, which you can easily deploy. You can
|
||||
download it using:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker pull phpmyadmin/phpmyadmin
|
||||
|
||||
The phpMyAdmin server will be executed on port 80. It supports several ways of
|
||||
configuring the link to the database server, which you can manage using
|
||||
environment variables:
|
||||
|
||||
.. envvar:: PMA_ARBITRARY
|
||||
|
||||
Allows you to enter database server hostname on login form (see
|
||||
:config:option:`$cfg['AllowArbitraryServer']`).
|
||||
|
||||
.. envvar:: PMA_HOST
|
||||
|
||||
Host name or IP address of the database server to use.
|
||||
|
||||
.. envvar:: PMA_HOSTS
|
||||
|
||||
Comma separated host names or IP addresses of the database servers to use.
|
||||
|
||||
.. envvar:: PMA_USER
|
||||
|
||||
User name to use for :ref:`auth_config`.
|
||||
|
||||
.. envvar:: PMA_PASSWORD
|
||||
|
||||
Password to use for :ref:`auth_config`.
|
||||
|
||||
.. envvar:: PMA_PORT
|
||||
|
||||
Port of the databse server to use.
|
||||
|
||||
.. envvar:: PMA_ABSOLUTE_URI
|
||||
|
||||
The fully-qualified path (``https://pma.example.net/``) where the reverse
|
||||
proxy makes phpMyAdmin available.
|
||||
|
||||
By default, :ref:`cookie` is used, but if :envvar:`PMA_USER` and
|
||||
:envvar:`PMA_PASSWORD` are set, it is switched to :ref:`auth_config`.
|
||||
|
||||
|
||||
To connect phpMyAdmin to given server use:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run --name myadmin -d -e PMA_HOST=dbhost -p 8080:80 phpmyadmin/phpmyadmin
|
||||
|
||||
To connect phpMyAdmin to more servers use:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run --name myadmin -d -e PMA_HOSTS=dbhost1,dbhost2,dbhost3 -p 8080:80 phpmyadmin/phpmyadmin
|
||||
|
||||
To use arbitrary server option:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 -e PMA_ARBITRARY=1 phpmyadmin/phpmyadmin
|
||||
|
||||
You can also link the database container using Docker:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run --name phpmyadmin -d --link mysql_db_server:db -p 8080:80 phpmyadmin/phpmyadmin
|
||||
|
||||
Using docker-compose
|
||||
--------------------
|
||||
|
||||
Alternatively you can also use docker-compose with the docker-compose.yml from
|
||||
<https://github.com/phpmyadmin/docker>. This will run phpMyAdmin with
|
||||
arbitrary server - allowing you to specify MySQL/MariaDB server on login page.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker-compose up -d
|
||||
|
||||
.. _quick_install:
|
||||
|
||||
Quick Install
|
||||
@ -507,6 +605,15 @@ HTTP authentication mode
|
||||
* Is supported with most PHP configurations. For :term:`IIS` (:term:`ISAPI`)
|
||||
support using :term:`CGI` PHP see :ref:`faq1_32`, for using with Apache
|
||||
:term:`CGI` see :ref:`faq1_35`.
|
||||
* When PHP is running under Apache's :term:`mod_proxy_fcgi` (e.g. with PHP-FPM),
|
||||
:term:`Authorization` headers are not passed to the underlying FCGI application,
|
||||
such that your credentials will not reach the application. In this case, you can
|
||||
add the following configuration directive:
|
||||
|
||||
.. code-block:: apache
|
||||
|
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
|
||||
* See also :ref:`faq4_4` about not using the :term:`.htaccess` mechanism along with
|
||||
':term:`HTTP`' authentication mode.
|
||||
|
||||
@ -574,6 +681,8 @@ in :file:`examples/signon-script.php`:
|
||||
|
||||
.. index:: pair: Config; Authentication mode
|
||||
|
||||
.. _auth_config:
|
||||
|
||||
Config authentication mode
|
||||
--------------------------
|
||||
|
||||
@ -636,6 +745,8 @@ Securing your phpMyAdmin installation
|
||||
The phpMyAdmin team tries hard to make the application secure, however there
|
||||
are always ways to make your installation more secure:
|
||||
|
||||
* Serve phpMyAdmin on HTTPS only. Preferably, you should use HSTS as well, so that
|
||||
you're protected from protocol downgrade attacks.
|
||||
* Remove the ``setup`` directory from phpMyAdmin, you will probably not
|
||||
use it after the initial setup.
|
||||
* Properly choose an authentication method - :ref:`cookie`
|
||||
|
||||
@ -15,7 +15,7 @@ if (!isset($_REQUEST['exception_type'])
|
||||
die('Oops, something went wrong!!');
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
|
||||
if (isset($_REQUEST['send_error_report'])
|
||||
&& ($_REQUEST['send_error_report'] == true
|
||||
@ -35,7 +35,7 @@ if (isset($_REQUEST['send_error_report'])
|
||||
) {
|
||||
$_SESSION['error_subm_count'] = 0;
|
||||
$_SESSION['prev_errors'] = '';
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addJSON('_stopErrorReportLoop', '1');
|
||||
} else {
|
||||
$_SESSION['prev_error_subm_time'] = time();
|
||||
@ -86,9 +86,9 @@ if (isset($_REQUEST['send_error_report'])
|
||||
|
||||
/* Create message object */
|
||||
if ($success) {
|
||||
$msg = PMA_Message::notice($msg);
|
||||
$msg = PMA\libraries\Message::notice($msg);
|
||||
} else {
|
||||
$msg = PMA_Message::error($msg);
|
||||
$msg = PMA\libraries\Message::error($msg);
|
||||
}
|
||||
|
||||
/* Add message to response */
|
||||
|
||||
@ -40,7 +40,7 @@ $AUTH_MAP = array(
|
||||
function Show_page($contents)
|
||||
{
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>' , "\n";
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en" dir="ltr">
|
||||
@ -53,7 +53,7 @@ function Show_page($contents)
|
||||
<body>
|
||||
<?php
|
||||
if (isset($_SESSION) && isset($_SESSION['PMA_single_signon_error_message'])) {
|
||||
echo '<p class="error">' . $_SESSION['PMA_single_signon_message'] . '</p>';
|
||||
echo '<p class="error">' , $_SESSION['PMA_single_signon_message'] , '</p>';
|
||||
unset($_SESSION['PMA_single_signon_message']);
|
||||
}
|
||||
echo $contents;
|
||||
@ -79,7 +79,7 @@ $base .= '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'];
|
||||
|
||||
$realm = $base . '/';
|
||||
$returnTo = $base . dirname($_SERVER['PHP_SELF']);
|
||||
if ($returnTo[/*overload*/mb_strlen($returnTo) - 1] != '/') {
|
||||
if ($returnTo[mb_strlen($returnTo) - 1] != '/') {
|
||||
$returnTo .= '/';
|
||||
}
|
||||
$returnTo .= 'openid.php';
|
||||
|
||||
@ -37,7 +37,7 @@ if (isset($_POST['user'])) {
|
||||
} else {
|
||||
/* Show simple form */
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>' , "\n";
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en" dir="ltr">
|
||||
|
||||
46
export.php
46
export.php
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\plugins\ExportPlugin;
|
||||
|
||||
/**
|
||||
* Get the variables sent or posted to this script and a core script
|
||||
@ -12,13 +13,12 @@
|
||||
if (!defined('TESTSUITE')) {
|
||||
/**
|
||||
* If we are sending the export file (as opposed to just displaying it
|
||||
* as text), we have to bypass the usual PMA_Response mechanism
|
||||
* as text), we have to bypass the usual PMA\libraries\Response mechanism
|
||||
*/
|
||||
if (isset($_POST['output_format']) && $_POST['output_format'] == 'sendit') {
|
||||
define('PMA_BYPASS_GET_INSTANCE', 1);
|
||||
}
|
||||
include_once 'libraries/common.inc.php';
|
||||
include_once 'libraries/zip.lib.php';
|
||||
include_once 'libraries/plugin_interface.lib.php';
|
||||
include_once 'libraries/export.lib.php';
|
||||
|
||||
@ -165,7 +165,7 @@ if (!defined('TESTSUITE')) {
|
||||
|
||||
$table = $GLOBALS['table'];
|
||||
|
||||
PMA_Util::checkParameters(array('what', 'export_type'));
|
||||
PMA\libraries\Util::checkParameters(array('what', 'export_type'));
|
||||
|
||||
// sanitize this parameter which will be used below in a file inclusion
|
||||
$what = PMA_securePath($_POST['what']);
|
||||
@ -213,7 +213,9 @@ if (!defined('TESTSUITE')) {
|
||||
$separate_files = '';
|
||||
|
||||
// Is it a quick or custom export?
|
||||
if (isset($_REQUEST['quick_or_custom']) && $_REQUEST['quick_or_custom'] == 'quick') {
|
||||
if (isset($_REQUEST['quick_or_custom'])
|
||||
&& $_REQUEST['quick_or_custom'] == 'quick'
|
||||
) {
|
||||
$quick_export = true;
|
||||
} else {
|
||||
$quick_export = false;
|
||||
@ -251,12 +253,10 @@ if (!defined('TESTSUITE')) {
|
||||
}
|
||||
|
||||
// Generate error url and check for needed variables
|
||||
/** @var PMA_String $pmaString */
|
||||
$pmaString = $GLOBALS['PMA_String'];
|
||||
if ($export_type == 'server') {
|
||||
$err_url = 'server_export.php' . PMA_URL_getCommon();
|
||||
} elseif ($export_type == 'database'
|
||||
&& /*overload*/mb_strlen($db)
|
||||
&& mb_strlen($db)
|
||||
) {
|
||||
$err_url = 'db_export.php' . PMA_URL_getCommon(array('db' => $db));
|
||||
// Check if we have something to export
|
||||
@ -265,8 +265,8 @@ if (!defined('TESTSUITE')) {
|
||||
} else {
|
||||
$tables = array();
|
||||
}
|
||||
} elseif ($export_type == 'table' && /*overload*/mb_strlen($db)
|
||||
&& /*overload*/mb_strlen($table)
|
||||
} elseif ($export_type == 'table' && mb_strlen($db)
|
||||
&& mb_strlen($table)
|
||||
) {
|
||||
$err_url = 'tbl_export.php' . PMA_URL_getCommon(
|
||||
array(
|
||||
@ -285,15 +285,11 @@ if (!defined('TESTSUITE')) {
|
||||
if ((!empty($parser->statements[0]))
|
||||
&& ($parser->statements[0] instanceof SqlParser\Statements\SelectStatement)
|
||||
) {
|
||||
if (!empty($_REQUEST['aliases'])) {
|
||||
$aliases = PMA_mergeAliases(
|
||||
SqlParser\Utils\Misc::getAliases($parser->statements[0], $db),
|
||||
$_REQUEST['aliases']
|
||||
);
|
||||
$_SESSION['tmpval']['aliases'] = $_REQUEST['aliases'];
|
||||
} else {
|
||||
$aliases = SqlParser\Utils\Misc::getAliases($parser->statements[0], $db);
|
||||
}
|
||||
$aliases = SqlParser\Utils\Misc::getAliases($parser->statements[0], $db);
|
||||
}
|
||||
if (!empty($_REQUEST['aliases'])) {
|
||||
$aliases = PMA_mergeAliases($aliases, $_REQUEST['aliases']);
|
||||
$_SESSION['tmpval']['aliases'] = $_REQUEST['aliases'];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -319,7 +315,7 @@ if (!defined('TESTSUITE')) {
|
||||
if ($what == 'sql') {
|
||||
$crlf = "\n";
|
||||
} else {
|
||||
$crlf = PMA_Util::whichCrlf();
|
||||
$crlf = PMA\libraries\Util::whichCrlf();
|
||||
}
|
||||
|
||||
$output_kanji_conversion = function_exists('PMA_Kanji_strConv')
|
||||
@ -379,7 +375,7 @@ if (!defined('TESTSUITE')) {
|
||||
if ($export_type == 'database') {
|
||||
$num_tables = count($tables);
|
||||
if ($num_tables == 0) {
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__('No tables found in database.')
|
||||
);
|
||||
$active_page = 'db_export.php';
|
||||
@ -410,7 +406,7 @@ if (!defined('TESTSUITE')) {
|
||||
// Will we need relation & co. setup?
|
||||
$do_relation = isset($GLOBALS[$what . '_relation']);
|
||||
$do_comments = isset($GLOBALS[$what . '_include_comments'])
|
||||
|| isset($GLOBALS[$what . '_comments']) ;
|
||||
|| isset($GLOBALS[$what . '_comments']);
|
||||
$do_mime = isset($GLOBALS[$what . '_mime']);
|
||||
if ($do_relation || $do_comments || $do_mime) {
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
@ -456,10 +452,8 @@ if (!defined('TESTSUITE')) {
|
||||
$do_relation, $do_comments, $do_mime, $do_dates, $aliases,
|
||||
$separate_files
|
||||
);
|
||||
} finally {
|
||||
PMA_unlockTables();
|
||||
} catch (Exception $e) { // TODO use finally when PHP version is 5.5
|
||||
PMA_unlockTables();
|
||||
throw $e;
|
||||
}
|
||||
} else {
|
||||
PMA_exportDatabase(
|
||||
@ -489,10 +483,8 @@ if (!defined('TESTSUITE')) {
|
||||
$do_mime, $do_dates, $allrows, $limit_to, $limit_from,
|
||||
$sql_query, $aliases
|
||||
);
|
||||
} finally {
|
||||
PMA_unlockTables();
|
||||
} catch (Exception $e) { // TODO use finally when PHP version is 5.5
|
||||
PMA_unlockTables();
|
||||
throw $e;
|
||||
}
|
||||
} else {
|
||||
PMA_exportTable(
|
||||
|
||||
@ -41,14 +41,11 @@ if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) {
|
||||
$filename = $_REQUEST['filename'];
|
||||
}
|
||||
|
||||
/** @var PMA_String $pmaString */
|
||||
$pmaString = $GLOBALS['PMA_String'];
|
||||
|
||||
/* Decode data */
|
||||
if ($extension != 'svg') {
|
||||
$data = /*overload*/mb_substr(
|
||||
$data = mb_substr(
|
||||
$_REQUEST['image'],
|
||||
/*overload*/mb_strpos($_REQUEST['image'], ',') + 1
|
||||
mb_strpos($_REQUEST['image'], ',') + 1
|
||||
);
|
||||
$data = base64_decode($data);
|
||||
} else {
|
||||
@ -59,7 +56,7 @@ if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) {
|
||||
PMA_downloadHeader(
|
||||
$filename,
|
||||
$_REQUEST['type'],
|
||||
/*overload*/mb_strlen($data)
|
||||
mb_strlen($data)
|
||||
);
|
||||
|
||||
/* Send data */
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\gis\GISFactory;
|
||||
use PMA\libraries\gis\GISVisualization;
|
||||
|
||||
/**
|
||||
* Escapes special characters if the variable is set.
|
||||
@ -20,11 +22,9 @@ function escape($variable)
|
||||
}
|
||||
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/gis/GIS_Factory.class.php';
|
||||
require_once 'libraries/gis/GIS_Visualization.class.php';
|
||||
|
||||
if (! isset($_REQUEST['field'])) {
|
||||
PMA_Util::checkParameters(array('field'));
|
||||
PMA\libraries\Util::checkParameters(array('field'));
|
||||
}
|
||||
|
||||
// Get data if any posted
|
||||
@ -43,21 +43,18 @@ $gis_types = array(
|
||||
'GEOMETRYCOLLECTION'
|
||||
);
|
||||
|
||||
/** @var PMA_String $pmaString */
|
||||
$pmaString = $GLOBALS['PMA_String'];
|
||||
|
||||
// Extract type from the initial call and make sure that it's a valid one.
|
||||
// Extract from field's values if available, if not use the column type passed.
|
||||
if (! isset($gis_data['gis_type'])) {
|
||||
if (isset($_REQUEST['type']) && $_REQUEST['type'] != '') {
|
||||
$gis_data['gis_type'] = /*overload*/mb_strtoupper($_REQUEST['type']);
|
||||
$gis_data['gis_type'] = mb_strtoupper($_REQUEST['type']);
|
||||
}
|
||||
if (isset($_REQUEST['value']) && trim($_REQUEST['value']) != '') {
|
||||
$start = (substr($_REQUEST['value'], 0, 1) == "'") ? 1 : 0;
|
||||
$gis_data['gis_type'] = /*overload*/mb_substr(
|
||||
$gis_data['gis_type'] = mb_substr(
|
||||
$_REQUEST['value'],
|
||||
$start,
|
||||
/*overload*/mb_strpos($_REQUEST['value'], "(") - $start
|
||||
mb_strpos($_REQUEST['value'], "(") - $start
|
||||
);
|
||||
}
|
||||
if ((! isset($gis_data['gis_type']))
|
||||
@ -69,7 +66,7 @@ if (! isset($gis_data['gis_type'])) {
|
||||
$geom_type = $gis_data['gis_type'];
|
||||
|
||||
// Generate parameters from value passed.
|
||||
$gis_obj = PMA_GIS_Factory::factory($geom_type);
|
||||
$gis_obj = GISFactory::factory($geom_type);
|
||||
if (isset($_REQUEST['value'])) {
|
||||
$gis_data = array_merge(
|
||||
$gis_data, $gis_obj->generateParams($_REQUEST['value'])
|
||||
@ -83,19 +80,17 @@ $wkt = $gis_obj->generateWkt($gis_data, 0);
|
||||
$wkt_with_zero = $gis_obj->generateWkt($gis_data, 0, '0');
|
||||
$result = "'" . $wkt . "'," . $srid;
|
||||
|
||||
// Generate PNG or SVG based visualization
|
||||
$format = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8)
|
||||
? 'png' : 'svg';
|
||||
// Generate SVG based visualization
|
||||
$visualizationSettings = array(
|
||||
'width' => 450,
|
||||
'height' => 300,
|
||||
'spatialColumn' => 'wkt'
|
||||
);
|
||||
$data = array(array('wkt' => $wkt_with_zero, 'srid' => $srid));
|
||||
$visualization = PMA_GIS_Visualization::getByData($data, $visualizationSettings)
|
||||
->toImage($format);
|
||||
$visualization = GISVisualization::getByData($data, $visualizationSettings)
|
||||
->toImage('svg');
|
||||
|
||||
$open_layers = PMA_GIS_Visualization::getByData($data, $visualizationSettings)
|
||||
$open_layers = GISVisualization::getByData($data, $visualizationSettings)
|
||||
->asOl();
|
||||
|
||||
// If the call is to update the WKT and visualization make an AJAX response
|
||||
@ -105,7 +100,7 @@ if (isset($_REQUEST['generate']) && $_REQUEST['generate'] == true) {
|
||||
'visualization' => $visualization,
|
||||
'openLayers' => $open_layers,
|
||||
);
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addJSON($extra_data);
|
||||
exit;
|
||||
}
|
||||
@ -114,7 +109,7 @@ ob_start();
|
||||
|
||||
echo '<form id="gis_data_editor_form" action="gis_data_editor.php" method="post">';
|
||||
echo '<input type="hidden" id="pmaThemeImage"'
|
||||
. ' value="' . $GLOBALS['pmaThemeImage'] . '" />';
|
||||
, ' value="' , $GLOBALS['pmaThemeImage'] , '" />';
|
||||
echo '<div id="gis_data_editor">';
|
||||
|
||||
echo '<h3>';
|
||||
@ -125,29 +120,29 @@ printf(
|
||||
echo '</h3>';
|
||||
|
||||
echo '<input type="hidden" name="field" value="'
|
||||
. htmlspecialchars($_REQUEST['field']) . '" />';
|
||||
, htmlspecialchars($_REQUEST['field']) , '" />';
|
||||
// The input field to which the final result should be added
|
||||
// and corresponding null checkbox
|
||||
if (isset($_REQUEST['input_name'])) {
|
||||
echo '<input type="hidden" name="input_name" value="'
|
||||
. htmlspecialchars($_REQUEST['input_name']) . '" />';
|
||||
, htmlspecialchars($_REQUEST['input_name']) , '" />';
|
||||
}
|
||||
echo PMA_URL_getHiddenInputs();
|
||||
|
||||
echo '<!-- Visualization section -->';
|
||||
echo '<div id="placeholder" style="width:450px;height:300px;'
|
||||
. ($srid != 0 ? 'display:none;' : '') . '">';
|
||||
, ($srid != 0 ? 'display:none;' : '') , '">';
|
||||
echo $visualization;
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="openlayersmap" style="width:450px;height:300px;'
|
||||
. ($srid == 0 ? 'display:none;' : '') . '">';
|
||||
, ($srid == 0 ? 'display:none;' : '') , '">';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="choice" style="float:right;clear:right;">';
|
||||
echo '<input type="checkbox" id="choice" value="useBaseLayer"'
|
||||
. ($srid != 0 ? ' checked="checked"' : '') . '/>';
|
||||
echo '<label for="choice">' . __("Use OpenStreetMaps as Base Layer") . '</label>';
|
||||
, ($srid != 0 ? ' checked="checked"' : '') , '/>';
|
||||
echo '<label for="choice">' , __("Use OpenStreetMaps as Base Layer") , '</label>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<script language="javascript" type="text/javascript">';
|
||||
@ -160,17 +155,17 @@ echo '<!-- Header section - Inclueds GIS type selector and input field for SRID
|
||||
echo '<div id="gis_data_header">';
|
||||
echo '<select name="gis_data[gis_type]" class="gis_type">';
|
||||
foreach ($gis_types as $gis_type) {
|
||||
echo '<option value="' . $gis_type . '"';
|
||||
echo '<option value="' , $gis_type , '"';
|
||||
if ($geom_type == $gis_type) {
|
||||
echo ' selected="selected"';
|
||||
}
|
||||
echo '>' . $gis_type . '</option>';
|
||||
echo '>' , $gis_type , '</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
echo ' ';
|
||||
/* l10n: Spatial Reference System Identifier */
|
||||
echo '<label for="srid">' . __('SRID:') . '</label>';
|
||||
echo '<input name="gis_data[srid]" type="text" value="' . $srid . '" />';
|
||||
echo '<label for="srid">' , __('SRID:') , '</label>';
|
||||
echo '<input name="gis_data[srid]" type="text" value="' , $srid , '" />';
|
||||
echo '</div>';
|
||||
echo '<!-- End of header section -->';
|
||||
|
||||
@ -185,7 +180,7 @@ if ($geom_type == 'GEOMETRYCOLLECTION') {
|
||||
$geom_count++;
|
||||
}
|
||||
echo '<input type="hidden" name="gis_data[GEOMETRYCOLLECTION][geom_count]"'
|
||||
. ' value="' . $geom_count . '" />';
|
||||
, ' value="' , $geom_count , '" />';
|
||||
}
|
||||
|
||||
for ($a = 0; $a < $geom_count; $a++) {
|
||||
@ -202,13 +197,13 @@ for ($a = 0; $a < $geom_count; $a++) {
|
||||
} else {
|
||||
$type = $gis_types[0];
|
||||
}
|
||||
echo '<select name="gis_data[' . $a . '][gis_type]" class="gis_type">';
|
||||
echo '<select name="gis_data[' , $a , '][gis_type]" class="gis_type">';
|
||||
foreach (array_slice($gis_types, 0, 6) as $gis_type) {
|
||||
echo '<option value="' . $gis_type . '"';
|
||||
echo '<option value="' , $gis_type , '"';
|
||||
if ($type == $gis_type) {
|
||||
echo ' selected="selected"';
|
||||
}
|
||||
echo '>' . $gis_type . '</option>';
|
||||
echo '>' , $gis_type , '</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
} else {
|
||||
@ -218,12 +213,12 @@ for ($a = 0; $a < $geom_count; $a++) {
|
||||
if ($type == 'POINT') {
|
||||
echo '<br/>';
|
||||
echo __('Point:');
|
||||
echo '<label for="x">' . __("X") . '</label>';
|
||||
echo '<input name="gis_data[' . $a . '][POINT][x]" type="text"'
|
||||
. ' value="' . escape($gis_data[$a]['POINT']['x']) . '" />';
|
||||
echo '<label for="y">' . __("Y") . '</label>';
|
||||
echo '<input name="gis_data[' . $a . '][POINT][y]" type="text"'
|
||||
. ' value="' . escape($gis_data[$a]['POINT']['y']) . '" />';
|
||||
echo '<label for="x">' , __("X") , '</label>';
|
||||
echo '<input name="gis_data[' , $a , '][POINT][x]" type="text"'
|
||||
, ' value="' , escape($gis_data[$a]['POINT']['x']) , '" />';
|
||||
echo '<label for="y">' , __("Y") , '</label>';
|
||||
echo '<input name="gis_data[' , $a , '][POINT][y]" type="text"'
|
||||
, ' value="' , escape($gis_data[$a]['POINT']['y']) , '" />';
|
||||
|
||||
} elseif ($type == 'MULTIPOINT' || $type == 'LINESTRING') {
|
||||
$no_of_points = isset($gis_data[$a][$type]['no_of_points'])
|
||||
@ -238,25 +233,25 @@ for ($a = 0; $a < $geom_count; $a++) {
|
||||
if (isset($gis_data[$a][$type]['add_point'])) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo '<input type="hidden" value="' . $no_of_points . '"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][no_of_points]" />';
|
||||
echo '<input type="hidden" value="' , $no_of_points , '"'
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][no_of_points]" />';
|
||||
|
||||
for ($i = 0; $i < $no_of_points; $i++) {
|
||||
echo '<br/>';
|
||||
printf(__('Point %d'), $i + 1);
|
||||
echo ': ';
|
||||
echo '<label for="x">' . __("X") . '</label>';
|
||||
echo '<label for="x">' , __("X") , '</label>';
|
||||
echo '<input type="text"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $i . '][x]"'
|
||||
. ' value="' . escape($gis_data[$a][$type][$i]['x']) . '" />';
|
||||
echo '<label for="y">' . __("Y") . '</label>';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $i , '][x]"'
|
||||
, ' value="' , escape($gis_data[$a][$type][$i]['x']) , '" />';
|
||||
echo '<label for="y">' , __("Y") , '</label>';
|
||||
echo '<input type="text"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $i . '][y]"'
|
||||
. ' value="' . escape($gis_data[$a][$type][$i]['y']) . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $i , '][y]"'
|
||||
, ' value="' , escape($gis_data[$a][$type][$i]['y']) , '" />';
|
||||
}
|
||||
echo '<input type="submit"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][add_point]"'
|
||||
. ' class="add addPoint" value="' . __("Add a point") . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][add_point]"'
|
||||
, ' class="add addPoint" value="' , __("Add a point") , '" />';
|
||||
|
||||
} elseif ($type == 'MULTILINESTRING' || $type == 'POLYGON') {
|
||||
$no_of_lines = isset($gis_data[$a][$type]['no_of_lines'])
|
||||
@ -267,8 +262,8 @@ for ($a = 0; $a < $geom_count; $a++) {
|
||||
if (isset($gis_data[$a][$type]['add_line'])) {
|
||||
$no_of_lines++;
|
||||
}
|
||||
echo '<input type="hidden" value="' . $no_of_lines . '"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][no_of_lines]" />';
|
||||
echo '<input type="hidden" value="' , $no_of_lines , '"'
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][no_of_lines]" />';
|
||||
|
||||
for ($i = 0; $i < $no_of_lines; $i++) {
|
||||
echo '<br/>';
|
||||
@ -293,34 +288,34 @@ for ($a = 0; $a < $geom_count; $a++) {
|
||||
if (isset($gis_data[$a][$type][$i]['add_point'])) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo '<input type="hidden" value="' . $no_of_points . '"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $i
|
||||
. '][no_of_points]" />';
|
||||
echo '<input type="hidden" value="' , $no_of_points , '"'
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $i
|
||||
, '][no_of_points]" />';
|
||||
|
||||
for ($j = 0; $j < $no_of_points; $j++) {
|
||||
echo('<br/>');
|
||||
printf(__('Point %d'), $j + 1);
|
||||
echo ': ';
|
||||
echo '<label for="x">' . __("X") . '</label>';
|
||||
echo '<input type="text" name="gis_data[' . $a . '][' . $type . ']['
|
||||
. $i . '][' . $j . '][x]" value="'
|
||||
. escape($gis_data[$a][$type][$i][$j]['x']) . '" />';
|
||||
echo '<label for="y">' . __("Y") . '</label>';
|
||||
echo '<input type="text" name="gis_data[' . $a . '][' . $type . ']['
|
||||
. $i . '][' . $j . '][y]"' . ' value="'
|
||||
. escape($gis_data[$a][$type][$i][$j]['y']) . '" />';
|
||||
echo '<label for="x">' , __("X") , '</label>';
|
||||
echo '<input type="text" name="gis_data[' , $a , '][' , $type . ']['
|
||||
, $i , '][' , $j , '][x]" value="'
|
||||
, escape($gis_data[$a][$type][$i][$j]['x']) , '" />';
|
||||
echo '<label for="y">' , __("Y") , '</label>';
|
||||
echo '<input type="text" name="gis_data[' , $a , '][' , $type , ']['
|
||||
, $i , '][' , $j , '][y]"' , ' value="'
|
||||
, escape($gis_data[$a][$type][$i][$j]['y']) , '" />';
|
||||
}
|
||||
echo '<input type="submit" name="gis_data[' . $a . '][' . $type . ']['
|
||||
. $i . '][add_point]"'
|
||||
. ' class="add addPoint" value="' . __("Add a point") . '" />';
|
||||
echo '<input type="submit" name="gis_data[' , $a , '][' , $type , ']['
|
||||
, $i , '][add_point]"'
|
||||
, ' class="add addPoint" value="' , __("Add a point") , '" />';
|
||||
}
|
||||
$caption = ($type == 'MULTILINESTRING')
|
||||
? __('Add a linestring')
|
||||
: __('Add an inner ring');
|
||||
echo '<br/>';
|
||||
echo '<input type="submit"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][add_line]"'
|
||||
. ' class="add addLine" value="' . $caption . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][add_line]"'
|
||||
, ' class="add addLine" value="' , $caption , '" />';
|
||||
|
||||
} elseif ($type == 'MULTIPOLYGON') {
|
||||
$no_of_polygons = isset($gis_data[$a][$type]['no_of_polygons'])
|
||||
@ -332,8 +327,8 @@ for ($a = 0; $a < $geom_count; $a++) {
|
||||
$no_of_polygons++;
|
||||
}
|
||||
echo '<input type="hidden"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][no_of_polygons]"'
|
||||
. ' value="' . $no_of_polygons . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][no_of_polygons]"'
|
||||
, ' value="' , $no_of_polygons , '" />';
|
||||
|
||||
for ($k = 0; $k < $no_of_polygons; $k++) {
|
||||
echo '<br/>';
|
||||
@ -347,8 +342,8 @@ for ($a = 0; $a < $geom_count; $a++) {
|
||||
$no_of_lines++;
|
||||
}
|
||||
echo '<input type="hidden"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $k
|
||||
. '][no_of_lines]"' . ' value="' . $no_of_lines . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $k
|
||||
, '][no_of_lines]"' , ' value="' , $no_of_lines , '" />';
|
||||
|
||||
for ($i = 0; $i < $no_of_lines; $i++) {
|
||||
echo '<br/><br/>';
|
||||
@ -367,56 +362,56 @@ for ($a = 0; $a < $geom_count; $a++) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo '<input type="hidden"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][' . $i
|
||||
. '][no_of_points]"' . ' value="' . $no_of_points . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $k , '][' , $i
|
||||
, '][no_of_points]"' , ' value="' , $no_of_points , '" />';
|
||||
|
||||
for ($j = 0; $j < $no_of_points; $j++) {
|
||||
echo '<br/>';
|
||||
printf(__('Point %d'), $j + 1);
|
||||
echo ': ';
|
||||
echo '<label for="x">' . __("X") . '</label>';
|
||||
echo '<label for="x">' , __("X") , '</label>';
|
||||
echo '<input type="text"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . ']['
|
||||
. $i . '][' . $j . '][x]"'
|
||||
. ' value="' . escape($gis_data[$a][$type][$k][$i][$j]['x'])
|
||||
. '" />';
|
||||
echo '<label for="y">' . __("Y") . '</label>';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $k , ']['
|
||||
, $i , '][' , $j , '][x]"'
|
||||
, ' value="' , escape($gis_data[$a][$type][$k][$i][$j]['x'])
|
||||
, '" />';
|
||||
echo '<label for="y">' , __("Y") , '</label>';
|
||||
echo '<input type="text"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . ']['
|
||||
. $i . '][' . $j . '][y]"'
|
||||
. ' value="' . escape($gis_data[$a][$type][$k][$i][$j]['y'])
|
||||
. '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $k , ']['
|
||||
, $i , '][' , $j , '][y]"'
|
||||
, ' value="' , escape($gis_data[$a][$type][$k][$i][$j]['y'])
|
||||
, '" />';
|
||||
}
|
||||
echo '<input type="submit"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][' . $i
|
||||
. '][add_point]"'
|
||||
. ' class="add addPoint" value="' . __("Add a point") . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $k , '][' , $i
|
||||
, '][add_point]"'
|
||||
, ' class="add addPoint" value="' , __("Add a point") , '" />';
|
||||
}
|
||||
echo '<br/>';
|
||||
echo '<input type="submit"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][' . $k . '][add_line]"'
|
||||
. ' class="add addLine" value="' . __('Add an inner ring') . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][' , $k , '][add_line]"'
|
||||
, ' class="add addLine" value="' , __('Add an inner ring') , '" />';
|
||||
echo '<br/>';
|
||||
}
|
||||
echo '<br/>';
|
||||
echo '<input type="submit"'
|
||||
. ' name="gis_data[' . $a . '][' . $type . '][add_polygon]"'
|
||||
. ' class="add addPolygon" value="' . __('Add a polygon') . '" />';
|
||||
, ' name="gis_data[' , $a , '][' , $type , '][add_polygon]"'
|
||||
, ' class="add addPolygon" value="' , __('Add a polygon') , '" />';
|
||||
}
|
||||
}
|
||||
if ($geom_type == 'GEOMETRYCOLLECTION') {
|
||||
echo '<br/><br/>';
|
||||
echo '<input type="submit" name="gis_data[GEOMETRYCOLLECTION][add_geom]"'
|
||||
. 'class="add addGeom" value="' . __("Add geometry") . '" />';
|
||||
, 'class="add addGeom" value="' , __("Add geometry") , '" />';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<!-- End of data section -->';
|
||||
|
||||
echo '<br/>';
|
||||
echo '<input type="submit" name="gis_data[save]" value="' . __('Go') . '" />';
|
||||
echo '<input type="submit" name="gis_data[save]" value="' , __('Go') , '" />';
|
||||
|
||||
echo '<div id="gis_data_output">';
|
||||
echo '<h3>' . __('Output') . '</h3>';
|
||||
echo '<h3>' , __('Output') , '</h3>';
|
||||
echo '<p>';
|
||||
echo __(
|
||||
'Choose "GeomFromText" from the "Function" column and paste the'
|
||||
@ -431,5 +426,5 @@ echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
||||
PMA_Response::getInstance()->addJSON('gis_editor', ob_get_contents());
|
||||
PMA\libraries\Response::getInstance()->addJSON('gis_editor', ob_get_contents());
|
||||
ob_end_clean();
|
||||
|
||||
162
import.php
162
import.php
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\plugins\ImportPlugin;
|
||||
|
||||
/**
|
||||
* Get the variables sent or posted to this script and a core script
|
||||
@ -12,7 +13,6 @@
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/sql.lib.php';
|
||||
require_once 'libraries/bookmark.lib.php';
|
||||
require_once 'libraries/Console.class.php';
|
||||
//require_once 'libraries/display_import_functions.lib.php';
|
||||
|
||||
if (isset($_REQUEST['show_as_php'])) {
|
||||
@ -30,15 +30,15 @@ if (isset($_REQUEST['simulate_dml'])) {
|
||||
|
||||
// If it's a refresh console bookmarks request
|
||||
if (isset($_REQUEST['console_bookmark_refresh'])) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addJSON(
|
||||
'console_message_bookmark', PMA_Console::getBookmarkContent()
|
||||
'console_message_bookmark', PMA\libraries\Console::getBookmarkContent()
|
||||
);
|
||||
exit;
|
||||
}
|
||||
// If it's a console bookmark add request
|
||||
if (isset($_REQUEST['console_bookmark_add'])) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
if (isset($_REQUEST['label']) && isset($_REQUEST['db'])
|
||||
&& isset($_REQUEST['bookmark_query']) && isset($_REQUEST['shared'])
|
||||
) {
|
||||
@ -115,13 +115,13 @@ if (! empty($sql_query)) {
|
||||
// making sure that :param does not apply values to :param1
|
||||
$sql_query = preg_replace(
|
||||
'/' . $quoted . '([^a-zA-Z0-9_])/',
|
||||
PMA_Util::sqlAddSlashes($replacement) . '${1}',
|
||||
PMA\libraries\Util::sqlAddSlashes($replacement) . '${1}',
|
||||
$sql_query
|
||||
);
|
||||
// for parameters the appear at the end of the string
|
||||
$sql_query = preg_replace(
|
||||
'/' . $quoted . '$/',
|
||||
PMA_Util::sqlAddSlashes($replacement),
|
||||
PMA\libraries\Util::sqlAddSlashes($replacement),
|
||||
$sql_query
|
||||
);
|
||||
}
|
||||
@ -160,7 +160,9 @@ if (! empty($sql_query)) {
|
||||
$rename_table_names
|
||||
)) {
|
||||
$ajax_reload['reload'] = true;
|
||||
$ajax_reload['table_name'] = PMA_Util::unQuote($rename_table_names[2]);
|
||||
$ajax_reload['table_name'] = PMA\libraries\Util::unQuote(
|
||||
$rename_table_names[2]
|
||||
);
|
||||
}
|
||||
|
||||
$sql_query = '';
|
||||
@ -179,7 +181,7 @@ if (! empty($sql_query)) {
|
||||
// If we didn't get any parameters, either user called this directly, or
|
||||
// upload limit has been reached, let's assume the second possibility.
|
||||
if ($_POST == array() && $_GET == array()) {
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__(
|
||||
'You probably tried to upload a file that is too large. Please refer ' .
|
||||
'to %sdocumentation%s for a workaround for this limit.'
|
||||
@ -198,7 +200,7 @@ if ($_POST == array() && $_GET == array()) {
|
||||
|
||||
// Add console message id to response output
|
||||
if (isset($_POST['console_message_id'])) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addJSON('console_message_id', $_POST['console_message_id']);
|
||||
}
|
||||
|
||||
@ -233,12 +235,10 @@ $post_patterns = array(
|
||||
PMA_setPostAsGlobal($post_patterns);
|
||||
|
||||
// Check needed parameters
|
||||
PMA_Util::checkParameters(array('import_type', 'format'));
|
||||
PMA\libraries\Util::checkParameters(array('import_type', 'format'));
|
||||
|
||||
// We don't want anything special in format
|
||||
$format = PMA_securePath($format);
|
||||
/** @var PMA_String $pmaString */
|
||||
$pmaString = $GLOBALS['PMA_String'];
|
||||
|
||||
// Create error and goto url
|
||||
if ($import_type == 'table') {
|
||||
@ -259,17 +259,17 @@ if ($import_type == 'table') {
|
||||
$goto = 'server_import.php';
|
||||
} else {
|
||||
if (empty($goto) || !preg_match('@^(server|db|tbl)(_[a-z]*)*\.php$@i', $goto)) {
|
||||
if (/*overload*/mb_strlen($table) && /*overload*/mb_strlen($db)) {
|
||||
if (mb_strlen($table) && mb_strlen($db)) {
|
||||
$goto = 'tbl_structure.php';
|
||||
} elseif (/*overload*/mb_strlen($db)) {
|
||||
} elseif (mb_strlen($db)) {
|
||||
$goto = 'db_structure.php';
|
||||
} else {
|
||||
$goto = 'server_sql.php';
|
||||
}
|
||||
}
|
||||
if (/*overload*/mb_strlen($table) && /*overload*/mb_strlen($db)) {
|
||||
if (mb_strlen($table) && mb_strlen($db)) {
|
||||
$common = PMA_URL_getCommon(array('db' => $db, 'table' => $table));
|
||||
} elseif (/*overload*/mb_strlen($db)) {
|
||||
} elseif (mb_strlen($db)) {
|
||||
$common = PMA_URL_getCommon(array('db' => $db));
|
||||
} else {
|
||||
$common = PMA_URL_getCommon();
|
||||
@ -287,7 +287,7 @@ if (basename($_SERVER['SCRIPT_NAME']) === 'import.php') {
|
||||
}
|
||||
|
||||
|
||||
if (/*overload*/mb_strlen($db)) {
|
||||
if (mb_strlen($db)) {
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
}
|
||||
|
||||
@ -359,9 +359,9 @@ if (! empty($_REQUEST['id_bookmark'])) {
|
||||
case 1: // bookmarked query that have to be displayed
|
||||
$import_text = PMA_Bookmark_get($db, $id_bookmark);
|
||||
if ($GLOBALS['is_ajax_request'] == true) {
|
||||
$message = PMA_Message::success(__('Showing bookmark'));
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess($message->isSuccess());
|
||||
$message = PMA\libraries\Message::success(__('Showing bookmark'));
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->setRequestStatus($message->isSuccess());
|
||||
$response->addJSON('message', $message);
|
||||
$response->addJSON('sql_query', $import_text);
|
||||
$response->addJSON('action_bookmark', $_REQUEST['action_bookmark']);
|
||||
@ -374,9 +374,11 @@ if (! empty($_REQUEST['id_bookmark'])) {
|
||||
$import_text = PMA_Bookmark_get($db, $id_bookmark);
|
||||
PMA_Bookmark_delete($id_bookmark);
|
||||
if ($GLOBALS['is_ajax_request'] == true) {
|
||||
$message = PMA_Message::success(__('The bookmark has been deleted.'));
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess($message->isSuccess());
|
||||
$message = PMA\libraries\Message::success(
|
||||
__('The bookmark has been deleted.')
|
||||
);
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->setRequestStatus($message->isSuccess());
|
||||
$response->addJSON('message', $message);
|
||||
$response->addJSON('action_bookmark', $_REQUEST['action_bookmark']);
|
||||
$response->addJSON('id_bookmark', $id_bookmark);
|
||||
@ -407,7 +409,7 @@ if ($memory_limit == -1) {
|
||||
}
|
||||
|
||||
// Calculate value of the limit
|
||||
$memoryUnit = /*overload*/mb_strtolower(substr($memory_limit, -1));
|
||||
$memoryUnit = mb_strtolower(substr($memory_limit, -1));
|
||||
if ('m' == $memoryUnit) {
|
||||
$memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024;
|
||||
} elseif ('k' == $memoryUnit) {
|
||||
@ -430,7 +432,7 @@ if (! empty($local_import_file) && ! empty($cfg['UploadDir'])) {
|
||||
// sanitize $local_import_file as it comes from a POST
|
||||
$local_import_file = PMA_securePath($local_import_file);
|
||||
|
||||
$import_file = PMA_Util::userDir($cfg['UploadDir'])
|
||||
$import_file = PMA\libraries\Util::userDir($cfg['UploadDir'])
|
||||
. $local_import_file;
|
||||
|
||||
} elseif (empty($import_file) || ! is_uploaded_file($import_file)) {
|
||||
@ -469,7 +471,7 @@ if ($import_file != 'none' && ! $error) {
|
||||
// is not too meaningful. Show a meaningful error message to the user
|
||||
// instead.
|
||||
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__(
|
||||
'Uploaded file cannot be moved, because the server has ' .
|
||||
'open_basedir enabled without access to the %s directory ' .
|
||||
@ -483,11 +485,11 @@ if ($import_file != 'none' && ! $error) {
|
||||
|
||||
/**
|
||||
* Handle file compression
|
||||
* @todo duplicate code exists in File.class.php
|
||||
* @todo duplicate code exists in File.php
|
||||
*/
|
||||
$compression = PMA_detectCompression($import_file);
|
||||
if ($compression === false) {
|
||||
$message = PMA_Message::error(__('File could not be read!'));
|
||||
$message = PMA\libraries\Message::error(__('File could not be read!'));
|
||||
PMA_stopImport($message); //Contains an 'exit'
|
||||
}
|
||||
|
||||
@ -496,7 +498,7 @@ if ($import_file != 'none' && ! $error) {
|
||||
if ($cfg['BZipDump'] && @function_exists('bzopen')) {
|
||||
$import_handle = @bzopen($import_file, 'r');
|
||||
} else {
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__(
|
||||
'You attempted to load file with unsupported compression ' .
|
||||
'(%s). Either support for it is not implemented or disabled ' .
|
||||
@ -511,7 +513,7 @@ if ($import_file != 'none' && ! $error) {
|
||||
if ($cfg['GZipDump'] && @function_exists('gzopen')) {
|
||||
$import_handle = @gzopen($import_file, 'r');
|
||||
} else {
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__(
|
||||
'You attempted to load file with unsupported compression ' .
|
||||
'(%s). Either support for it is not implemented or disabled ' .
|
||||
@ -530,13 +532,13 @@ if ($import_file != 'none' && ! $error) {
|
||||
include_once 'libraries/zip_extension.lib.php';
|
||||
$zipResult = PMA_getZipContents($import_file);
|
||||
if (! empty($zipResult['error'])) {
|
||||
$message = PMA_Message::rawError($zipResult['error']);
|
||||
$message = PMA\libraries\Message::rawError($zipResult['error']);
|
||||
PMA_stopImport($message);
|
||||
} else {
|
||||
$import_text = $zipResult['data'];
|
||||
}
|
||||
} else {
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__(
|
||||
'You attempted to load file with unsupported compression ' .
|
||||
'(%s). Either support for it is not implemented or disabled ' .
|
||||
@ -551,7 +553,7 @@ if ($import_file != 'none' && ! $error) {
|
||||
$import_handle = @fopen($import_file, 'r');
|
||||
break;
|
||||
default:
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__(
|
||||
'You attempted to load file with unsupported compression (%s). ' .
|
||||
'Either support for it is not implemented or disabled by your ' .
|
||||
@ -560,16 +562,16 @@ if ($import_file != 'none' && ! $error) {
|
||||
);
|
||||
$message->addParam($compression);
|
||||
PMA_stopImport($message);
|
||||
break;
|
||||
// the previous function exits
|
||||
}
|
||||
// use isset() because zip compression type does not use a handle
|
||||
if (! $error && isset($import_handle) && $import_handle === false) {
|
||||
$message = PMA_Message::error(__('File could not be read!'));
|
||||
$message = PMA\libraries\Message::error(__('File could not be read!'));
|
||||
PMA_stopImport($message);
|
||||
}
|
||||
} elseif (! $error) {
|
||||
if (! isset($import_text) || empty($import_text)) {
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__(
|
||||
'No data was received to import. Either no file name was ' .
|
||||
'submitted, or the file size exceeded the maximum size permitted ' .
|
||||
@ -589,22 +591,10 @@ if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE && isset($charset_of_fil
|
||||
$charset_conversion = true;
|
||||
}
|
||||
} elseif (isset($charset_of_file) && $charset_of_file != 'utf-8') {
|
||||
if (PMA_DRIZZLE) {
|
||||
// Drizzle doesn't support other character sets,
|
||||
// so we can't fallback to SET NAMES - throw an error
|
||||
$message = PMA_Message::error(
|
||||
__(
|
||||
'Cannot convert file\'s character'
|
||||
. ' set without character set conversion library!'
|
||||
)
|
||||
);
|
||||
PMA_stopImport($message);
|
||||
} else {
|
||||
$GLOBALS['dbi']->query('SET NAMES \'' . $charset_of_file . '\'');
|
||||
// We can not show query in this case, it is in different charset
|
||||
$sql_query_disabled = true;
|
||||
$reset_charset = true;
|
||||
}
|
||||
$GLOBALS['dbi']->query('SET NAMES \'' . $charset_of_file . '\'');
|
||||
// We can not show query in this case, it is in different charset
|
||||
$sql_query_disabled = true;
|
||||
$reset_charset = true;
|
||||
}
|
||||
|
||||
// Something to skip? (because timeout has passed)
|
||||
@ -634,18 +624,18 @@ if (! $error) {
|
||||
$import_type
|
||||
);
|
||||
if ($import_plugin == null) {
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__('Could not load import plugins, please check your installation!')
|
||||
);
|
||||
PMA_stopImport($message);
|
||||
} else {
|
||||
// Do the real import
|
||||
try {
|
||||
$default_fk_check = PMA_Util::handleDisableFKCheckInit();
|
||||
$default_fk_check = PMA\libraries\Util::handleDisableFKCheckInit();
|
||||
$import_plugin->doImport($sql_data);
|
||||
PMA_Util::handleDisableFKCheckCleanup($default_fk_check);
|
||||
PMA\libraries\Util::handleDisableFKCheckCleanup($default_fk_check);
|
||||
} catch (Exception $e) {
|
||||
PMA_Util::handleDisableFKCheckCleanup($default_fk_check);
|
||||
PMA\libraries\Util::handleDisableFKCheckCleanup($default_fk_check);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
@ -670,23 +660,27 @@ if ($reset_charset) {
|
||||
|
||||
// Show correct message
|
||||
if (! empty($id_bookmark) && $_REQUEST['action_bookmark'] == 2) {
|
||||
$message = PMA_Message::success(__('The bookmark has been deleted.'));
|
||||
$message = PMA\libraries\Message::success(__('The bookmark has been deleted.'));
|
||||
$display_query = $import_text;
|
||||
$error = false; // unset error marker, it was used just to skip processing
|
||||
} elseif (! empty($id_bookmark) && $_REQUEST['action_bookmark'] == 1) {
|
||||
$message = PMA_Message::notice(__('Showing bookmark'));
|
||||
$message = PMA\libraries\Message::notice(__('Showing bookmark'));
|
||||
} elseif ($bookmark_created) {
|
||||
$special_message = '[br]' . sprintf(
|
||||
__('Bookmark %s has been created.'),
|
||||
htmlspecialchars($_POST['bkm_label'])
|
||||
);
|
||||
} elseif ($finished && ! $error) {
|
||||
if ($import_type == 'query') {
|
||||
$message = PMA_Message::success();
|
||||
} else {
|
||||
$message = PMA_Message::success(
|
||||
// Do not display the query with message, we do it separately
|
||||
$display_query = ';';
|
||||
if ($import_type != 'query') {
|
||||
$message = PMA\libraries\Message::success(
|
||||
'<em>'
|
||||
. __('Import has been successfully finished, %d queries executed.')
|
||||
. _ngettext(
|
||||
'Import has been successfully finished, %d query executed.',
|
||||
'Import has been successfully finished, %d queries executed.',
|
||||
$executed_queries
|
||||
)
|
||||
. '</em>'
|
||||
);
|
||||
$message->addParam($executed_queries);
|
||||
@ -712,7 +706,7 @@ if ($timeout_passed) {
|
||||
if (isset($local_import_file)) {
|
||||
$importUrl .= '&local_import_file=' . urlencode($local_import_file);
|
||||
}
|
||||
$message = PMA_Message::error(
|
||||
$message = PMA\libraries\Message::error(
|
||||
__(
|
||||
'Script timeout passed, if you want to finish import,'
|
||||
. ' please %sresubmit the same file%s and import will resume.'
|
||||
@ -741,15 +735,23 @@ if (isset($message)) {
|
||||
// in case of a query typed in the query window
|
||||
// (but if the query is too large, in case of an imported file, the parser
|
||||
// can choke on it so avoid parsing)
|
||||
$sqlLength = /*overload*/mb_strlen($sql_query);
|
||||
$sqlLength = mb_strlen($sql_query);
|
||||
if ($sqlLength <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
|
||||
include_once 'libraries/parse_analyze.inc.php';
|
||||
include_once 'libraries/parse_analyze.lib.php';
|
||||
|
||||
list(
|
||||
$analyzed_sql_results,
|
||||
$db,
|
||||
$table
|
||||
) = PMA_parseAnalyze($sql_query, $db);
|
||||
// @todo: possibly refactor
|
||||
extract($analyzed_sql_results);
|
||||
}
|
||||
|
||||
// There was an error?
|
||||
if (isset($my_die)) {
|
||||
foreach ($my_die as $key => $die) {
|
||||
PMA_Util::mysqlDie(
|
||||
PMA\libraries\Util::mysqlDie(
|
||||
$die['error'], $die['sql'], false, $err_url, $error
|
||||
);
|
||||
}
|
||||
@ -766,8 +768,16 @@ if ($go_sql) {
|
||||
|
||||
$html_output = '';
|
||||
foreach ($sql_queries as $sql_query) {
|
||||
|
||||
// parse sql query
|
||||
include 'libraries/parse_analyze.inc.php';
|
||||
include_once 'libraries/parse_analyze.lib.php';
|
||||
list(
|
||||
$analyzed_sql_results,
|
||||
$db,
|
||||
$table
|
||||
) = PMA_parseAnalyze($sql_query, $db);
|
||||
// @todo: possibly refactor
|
||||
extract($analyzed_sql_results);
|
||||
|
||||
$html_output .= PMA_executeQueryAndGetQueryResponse(
|
||||
$analyzed_sql_results, // analyzed_sql_results
|
||||
@ -791,7 +801,7 @@ if ($go_sql) {
|
||||
);
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addJSON('ajax_reload', $ajax_reload);
|
||||
$response->addHTML($html_output);
|
||||
exit();
|
||||
@ -807,17 +817,17 @@ if ($go_sql) {
|
||||
);
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess(true);
|
||||
$response->addJSON('message', PMA_Message::success($msg));
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->setRequestStatus(true);
|
||||
$response->addJSON('message', PMA\libraries\Message::success($msg));
|
||||
$response->addJSON(
|
||||
'sql_query',
|
||||
PMA_Util::getMessage($msg, $sql_query, 'success')
|
||||
PMA\libraries\Util::getMessage($msg, $sql_query, 'success')
|
||||
);
|
||||
} else if ($result == false) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess(false);
|
||||
$response->addJSON('message', PMA_Message::error($msg));
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->setRequestStatus(false);
|
||||
$response->addJSON('message', PMA\libraries\Message::error($msg));
|
||||
} else {
|
||||
$active_page = $goto;
|
||||
include '' . $goto;
|
||||
|
||||
@ -51,8 +51,12 @@ if (version_compare(PHP_VERSION, '5.4.0', '>=')
|
||||
define('PMA_MINIMUM_COMMON', 1);
|
||||
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/Util.class.php';
|
||||
require_once 'libraries/display_import_ajax.lib.php';
|
||||
list(
|
||||
$SESSION_KEY,
|
||||
$upload_id,
|
||||
$plugins
|
||||
) = PMA_uploadProgressSetup();
|
||||
|
||||
/*
|
||||
if (defined('SESSIONUPLOAD')) {
|
||||
@ -99,7 +103,7 @@ if (isset($_GET["message"]) && $_GET["message"]) {
|
||||
session_start();
|
||||
|
||||
if ((time() - $timestamp) > $maximumTime) {
|
||||
$_SESSION['Import_message']['message'] = PMA_Message::error(
|
||||
$_SESSION['Import_message']['message'] = PMA\libraries\Message::error(
|
||||
__('Could not load the progress of the import.')
|
||||
)->getDisplay();
|
||||
break;
|
||||
@ -107,10 +111,10 @@ if (isset($_GET["message"]) && $_GET["message"]) {
|
||||
}
|
||||
|
||||
echo $_SESSION['Import_message']['message'];
|
||||
echo '<fieldset class="tblFooters">' . "\n";
|
||||
echo ' [ <a href="' . $_SESSION['Import_message']['go_back_url']
|
||||
. '">' . __('Back') . '</a> ]' . "\n";
|
||||
echo '</fieldset>' . "\n";
|
||||
echo '<fieldset class="tblFooters">' , "\n";
|
||||
echo ' [ <a href="' , $_SESSION['Import_message']['go_back_url']
|
||||
. '">' , __('Back') , '</a> ]' , "\n";
|
||||
echo '</fieldset>' , "\n";
|
||||
|
||||
} else {
|
||||
PMA_importAjaxStatus($_GET["id"]);
|
||||
|
||||
150
index.php
150
index.php
@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
use PMA\libraries\RecentFavoriteTable;
|
||||
|
||||
/**
|
||||
* Gets some core libraries and displays a top message if required
|
||||
@ -15,7 +16,6 @@ require_once 'libraries/common.inc.php';
|
||||
* display Git revision if requested
|
||||
*/
|
||||
require_once 'libraries/display_git_revision.lib.php';
|
||||
require_once 'libraries/Template.class.php';
|
||||
|
||||
/**
|
||||
* pass variables to child pages
|
||||
@ -62,11 +62,11 @@ if (isset($_REQUEST['ajax_request']) && ! empty($_REQUEST['access_time'])) {
|
||||
if (! empty($_REQUEST['db'])) {
|
||||
$page = null;
|
||||
if (! empty($_REQUEST['table'])) {
|
||||
$page = PMA_Util::getScriptNameForOption(
|
||||
$page = PMA\libraries\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabTable'], 'table'
|
||||
);
|
||||
} else {
|
||||
$page = PMA_Util::getScriptNameForOption(
|
||||
$page = PMA\libraries\Util::getScriptNameForOption(
|
||||
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
|
||||
);
|
||||
}
|
||||
@ -77,12 +77,11 @@ if (! empty($_REQUEST['db'])) {
|
||||
/**
|
||||
* Check if it is an ajax request to reload the recent tables list.
|
||||
*/
|
||||
require_once 'libraries/RecentFavoriteTable.class.php';
|
||||
if ($GLOBALS['is_ajax_request'] && ! empty($_REQUEST['recent_table'])) {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response = PMA\libraries\Response::getInstance();
|
||||
$response->addJSON(
|
||||
'list',
|
||||
PMA_RecentFavoriteTable::getInstance('recent')->getHtmlList()
|
||||
RecentFavoriteTable::getInstance('recent')->getHtmlList()
|
||||
);
|
||||
exit;
|
||||
}
|
||||
@ -102,7 +101,7 @@ $show_query = '1';
|
||||
|
||||
// Any message to display?
|
||||
if (! empty($message)) {
|
||||
echo PMA_Util::getMessage($message);
|
||||
echo PMA\libraries\Util::getMessage($message);
|
||||
unset($message);
|
||||
}
|
||||
|
||||
@ -113,7 +112,6 @@ $mysql_cur_user_and_host = '';
|
||||
// all MySQL-related information
|
||||
if ($server > 0) {
|
||||
include 'libraries/server_common.inc.php';
|
||||
include 'libraries/StorageEngine.class.php';
|
||||
|
||||
// Use the verbose name of the server instead of the hostname
|
||||
// if a value is set
|
||||
@ -138,15 +136,15 @@ if ($server > 0) {
|
||||
: $GLOBALS['cfg']['Server']['host']);
|
||||
}
|
||||
|
||||
echo '<div id="maincontainer">' . "\n";
|
||||
echo '<div id="maincontainer">' , "\n";
|
||||
// Anchor for favorite tables synchronization.
|
||||
echo PMA_RecentFavoriteTable::getInstance('favorite')->getHtmlSyncFavoriteTables();
|
||||
echo RecentFavoriteTable::getInstance('favorite')->getHtmlSyncFavoriteTables();
|
||||
echo '<div id="main_pane_left">';
|
||||
if ($server > 0 || count($cfg['Servers']) > 1
|
||||
) {
|
||||
if ($cfg['DBG']['demo']) {
|
||||
echo '<div class="group">';
|
||||
echo '<h2>' . __('phpMyAdmin Demo Server') . '</h2>';
|
||||
echo '<h2>' , __('phpMyAdmin Demo Server') , '</h2>';
|
||||
echo '<p style="margin: 0.5em 1em 0.5em 1em">';
|
||||
printf(
|
||||
__(
|
||||
@ -160,7 +158,7 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
echo '</div>';
|
||||
}
|
||||
echo '<div class="group">';
|
||||
echo '<h2>' . __('General settings') . '</h2>';
|
||||
echo '<h2>' , __('General settings') , '</h2>';
|
||||
echo '<ul>';
|
||||
|
||||
/**
|
||||
@ -173,14 +171,15 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
) {
|
||||
echo '<li id="li_select_server" class="no_bullets" >';
|
||||
include_once 'libraries/select_server.lib.php';
|
||||
echo PMA_Util::getImage('s_host.png') . " " . PMA_selectServer(true, true);
|
||||
echo PMA\libraries\Util::getImage('s_host.png') , " "
|
||||
, PMA_selectServer(true, true);
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the mysql server related links
|
||||
*/
|
||||
if ($server > 0 && ! PMA_DRIZZLE) {
|
||||
if ($server > 0) {
|
||||
include_once 'libraries/check_user_privileges.lib.php';
|
||||
|
||||
// Logout for advanced authentication
|
||||
@ -188,7 +187,9 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
if ($cfg['ShowChgPassword']) {
|
||||
$conditional_class = 'ajax';
|
||||
PMA_printListItem(
|
||||
PMA_Util::getImage('s_passwd.png') . " " . __('Change password'),
|
||||
PMA\libraries\Util::getImage('s_passwd.png') . " " . __(
|
||||
'Change password'
|
||||
),
|
||||
'li_change_password',
|
||||
'user_password.php' . $common_url_query,
|
||||
null,
|
||||
@ -200,13 +201,13 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
}
|
||||
} // end if
|
||||
echo ' <li id="li_select_mysql_collation" class="no_bullets" >';
|
||||
echo ' <form method="post" action="index.php">' . "\n"
|
||||
echo ' <form method="post" action="index.php">' , "\n"
|
||||
. PMA_URL_getHiddenInputs(null, null, 4, 'collation_connection')
|
||||
. ' <label for="select_collation_connection">' . "\n"
|
||||
. ' ' . PMA_Util::getImage('s_asci.png') . " "
|
||||
. __('Server connection collation') . "\n"
|
||||
. ' ' . PMA\libraries\Util::getImage('s_asci.png')
|
||||
. " " . __('Server connection collation') . "\n"
|
||||
// put the doc link in the form so that it appears on the same line
|
||||
. PMA_Util::showMySQLDocu('Charset-connection')
|
||||
. PMA\libraries\Util::showMySQLDocu('Charset-connection')
|
||||
. ': ' . "\n"
|
||||
. ' </label>' . "\n"
|
||||
|
||||
@ -220,20 +221,21 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
)
|
||||
. ' </form>' . "\n"
|
||||
. ' </li>' . "\n";
|
||||
} // end of if ($server > 0 && !PMA_DRIZZLE)
|
||||
} // end of if ($server > 0)
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '<div class="group">';
|
||||
echo '<h2>' . __('Appearance settings') . '</h2>';
|
||||
echo '<h2>' , __('Appearance settings') , '</h2>';
|
||||
echo ' <ul>';
|
||||
|
||||
// Displays language selection combo
|
||||
if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
|
||||
if (empty($cfg['Lang'])) {
|
||||
echo '<li id="li_select_lang" class="no_bullets">';
|
||||
include_once 'libraries/display_select_lang.lib.php';
|
||||
echo PMA_Util::getImage('s_lang.png') . " " . PMA_getLanguageSelectorHtml();
|
||||
echo PMA\libraries\Util::getImage('s_lang.png') , " "
|
||||
, PMA_getLanguageSelectorHtml();
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
@ -241,12 +243,12 @@ if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
|
||||
|
||||
if ($GLOBALS['cfg']['ThemeManager']) {
|
||||
echo '<li id="li_select_theme" class="no_bullets">';
|
||||
echo PMA_Util::getImage('s_theme.png') . " "
|
||||
. $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
|
||||
echo PMA\libraries\Util::getImage('s_theme.png') , " "
|
||||
, $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
|
||||
echo '</li>';
|
||||
}
|
||||
echo '<li id="li_select_fontsize">';
|
||||
echo PMA_Config::getFontsizeForm();
|
||||
echo PMA\libraries\Config::getFontsizeForm();
|
||||
echo '</li>';
|
||||
|
||||
echo '</ul>';
|
||||
@ -256,7 +258,9 @@ echo '</ul>';
|
||||
if ($server > 0) {
|
||||
echo '<ul>';
|
||||
PMA_printListItem(
|
||||
PMA_Util::getImage('b_tblops.png') . " " . __('More settings'),
|
||||
PMA\libraries\Util::getImage('b_tblops.png') . " " . __(
|
||||
'More settings'
|
||||
),
|
||||
'li_user_preferences',
|
||||
'prefs_manage.php' . $common_url_query,
|
||||
null,
|
||||
@ -277,14 +281,14 @@ echo '<div id="main_pane_right">';
|
||||
if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
|
||||
|
||||
echo '<div class="group">';
|
||||
echo '<h2>' . __('Database server') . '</h2>';
|
||||
echo '<ul>' . "\n";
|
||||
echo '<h2>' , __('Database server') , '</h2>';
|
||||
echo '<ul>' , "\n";
|
||||
PMA_printListItem(
|
||||
__('Server:') . ' ' . $server_info,
|
||||
'li_server_info'
|
||||
);
|
||||
PMA_printListItem(
|
||||
__('Server type:') . ' ' . PMA_Util::getServerType(),
|
||||
__('Server type:') . ' ' . PMA\libraries\Util::getServerType(),
|
||||
'li_server_type'
|
||||
);
|
||||
PMA_printListItem(
|
||||
@ -303,13 +307,10 @@ if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
|
||||
);
|
||||
|
||||
echo ' <li id="li_select_mysql_charset">';
|
||||
echo ' ' . __('Server charset:') . ' '
|
||||
echo ' ' , __('Server charset:') , ' '
|
||||
. ' <span lang="en" dir="ltr">';
|
||||
if (! PMA_DRIZZLE) {
|
||||
echo ' '
|
||||
. $mysql_charsets_descriptions[$mysql_charset_map['utf-8']];
|
||||
}
|
||||
echo ' (' . $mysql_charset_map['utf-8'] . ')'
|
||||
echo ' ' , $mysql_charsets_descriptions[$mysql_charset_map['utf-8']];
|
||||
echo ' (' , $mysql_charset_map['utf-8'] , ')'
|
||||
. ' </span>'
|
||||
. ' </li>'
|
||||
. ' </ul>'
|
||||
@ -318,7 +319,7 @@ if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
|
||||
|
||||
if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
|
||||
echo '<div class="group">';
|
||||
echo '<h2>' . __('Web server') . '</h2>';
|
||||
echo '<h2>' , __('Web server') , '</h2>';
|
||||
echo '<ul>';
|
||||
if ($GLOBALS['cfg']['ShowServerInfo']) {
|
||||
PMA_printListItem($_SERVER['SERVER_SOFTWARE'], 'li_web_server_software');
|
||||
@ -334,13 +335,13 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
|
||||
);
|
||||
|
||||
$php_ext_string = __('PHP extension:') . ' ';
|
||||
if (PMA_DatabaseInterface::checkDbExtension('mysqli')) {
|
||||
$extension = 'mysqli';
|
||||
} else {
|
||||
$extension = 'mysql';
|
||||
|
||||
$extensions = PMA\libraries\Util::listPHPExtensions();
|
||||
|
||||
foreach ($extensions as $extension) {
|
||||
$php_ext_string .= ' ' . $extension
|
||||
. PMA\libraries\Util::showPHPDocu('book.' . $extension . '.php');
|
||||
}
|
||||
$php_ext_string .= $extension . ' '
|
||||
. PMA_Util::showPHPDocu('book.' . $extension . '.php');
|
||||
|
||||
PMA_printListItem(
|
||||
$php_ext_string,
|
||||
@ -373,11 +374,7 @@ echo '<div class="group pmagroup">';
|
||||
echo '<h2>phpMyAdmin</h2>';
|
||||
echo '<ul>';
|
||||
$class = null;
|
||||
// We rely on CSP to allow access to http://www.phpmyadmin.net, but IE lacks
|
||||
// support here and does not allow request to http once using https.
|
||||
if ($GLOBALS['cfg']['VersionCheck']
|
||||
&& (! $GLOBALS['PMA_Config']->get('is_https') || PMA_USR_BROWSER_AGENT != 'IE')
|
||||
) {
|
||||
if ($GLOBALS['cfg']['VersionCheck']) {
|
||||
$class = 'jsversioncheck';
|
||||
}
|
||||
PMA_printListItem(
|
||||
@ -392,7 +389,7 @@ PMA_printListItem(
|
||||
PMA_printListItem(
|
||||
__('Documentation'),
|
||||
'li_pma_docs',
|
||||
PMA_Util::getDocuLink('index'),
|
||||
PMA\libraries\Util::getDocuLink('index'),
|
||||
null,
|
||||
'_blank'
|
||||
);
|
||||
@ -433,6 +430,13 @@ PMA_printListItem(
|
||||
null,
|
||||
'_blank'
|
||||
);
|
||||
PMA_printListItem(
|
||||
__('License'),
|
||||
'li_pma_license',
|
||||
'license.php' . PMA_URL_getCommon(),
|
||||
null,
|
||||
'_blank'
|
||||
);
|
||||
echo ' </ul>';
|
||||
echo ' </div>';
|
||||
|
||||
@ -440,25 +444,6 @@ echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
/**
|
||||
* Warning if using the default MySQL privileged account
|
||||
*/
|
||||
if ($server != 0
|
||||
&& $cfg['Server']['user'] == 'root'
|
||||
&& $cfg['Server']['password'] == ''
|
||||
) {
|
||||
trigger_error(
|
||||
__(
|
||||
'You are connected as \'root\' with no password, which'
|
||||
. ' corresponds to the default MySQL privileged account.'
|
||||
. ' Your MySQL server is running with this default, is open to'
|
||||
. ' intrusion, and you really should fix this security hole by'
|
||||
. ' setting a password for user \'root\'.'
|
||||
),
|
||||
E_USER_WARNING
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* As we try to handle charsets by ourself, mbstring overloads just
|
||||
* break it, see bug 1063821.
|
||||
@ -490,6 +475,19 @@ if (! @extension_loaded('mbstring')) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Missing functionality
|
||||
*/
|
||||
if (! extension_loaded('curl') && ! ini_get('allow_url_fopen')) {
|
||||
trigger_error(
|
||||
__(
|
||||
'The curl extension was not found and allow_url_fopen is '
|
||||
. 'disabled. Due to this some features such as error reporting '
|
||||
. 'or version check are disabled.'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ($cfg['LoginCookieValidityDisableWarning'] == false) {
|
||||
/**
|
||||
* Check whether session.gc_maxlifetime limits session validity.
|
||||
@ -573,9 +571,9 @@ if ($server > 0) {
|
||||
. 'to set it up there.'
|
||||
);
|
||||
}
|
||||
$msg = PMA_Message::notice($msg_text);
|
||||
$msg = PMA\libraries\Message::notice($msg_text);
|
||||
$msg->addParam(
|
||||
'<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php'
|
||||
'<a href="./chk_rel.php'
|
||||
. $common_url_query . '">',
|
||||
false
|
||||
);
|
||||
@ -594,22 +592,16 @@ if ($server > 0) {
|
||||
* If someday there is a constant that we can check about mysqlnd,
|
||||
* we can use it instead of strpos().
|
||||
* If no default server is set, $GLOBALS['dbi'] is not defined yet.
|
||||
* Drizzle can speak MySQL protocol, so don't warn about version mismatch for
|
||||
* Drizzle servers.
|
||||
* We also do not warn if MariaDB is detected, as it has its own version
|
||||
* numbering.
|
||||
*/
|
||||
if (isset($GLOBALS['dbi'])
|
||||
&& !PMA_DRIZZLE
|
||||
&& $cfg['ServerLibraryDifference_DisableWarning'] == false
|
||||
) {
|
||||
/** @var PMA_String $pmaString */
|
||||
$pmaString = $GLOBALS['PMA_String'];
|
||||
|
||||
$_client_info = $GLOBALS['dbi']->getClientInfo();
|
||||
if ($server > 0
|
||||
&& /*overload*/mb_strpos($_client_info, 'mysqlnd') === false
|
||||
&& /*overload*/mb_strpos(PMA_MYSQL_STR_VERSION, 'MariaDB') === false
|
||||
&& mb_strpos($_client_info, 'mysqlnd') === false
|
||||
&& mb_strpos(PMA_MYSQL_STR_VERSION, 'MariaDB') === false
|
||||
&& substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr(
|
||||
PMA_MYSQL_INT_VERSION, 0, 3
|
||||
)
|
||||
@ -699,7 +691,7 @@ function PMA_printListItem($name, $listId = null, $url = null,
|
||||
$mysql_help_page = null, $target = null, $a_id = null, $class = null,
|
||||
$a_class = null
|
||||
) {
|
||||
echo PMA\Template::get('list/item')
|
||||
echo PMA\libraries\Template::get('list/item')
|
||||
->render(
|
||||
array(
|
||||
'content' => $name,
|
||||
|
||||
@ -1,126 +0,0 @@
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Namespace: Util.OSM
|
||||
*/
|
||||
OpenLayers.Util.OSM = {};
|
||||
|
||||
/**
|
||||
* Constant: MISSING_TILE_URL
|
||||
* {String} URL of image to display for missing tiles
|
||||
*/
|
||||
OpenLayers.Util.OSM.MISSING_TILE_URL = "http://www.openstreetmap.org/openlayers/img/404.png";
|
||||
|
||||
/**
|
||||
* Property: originalOnImageLoadError
|
||||
* {Function} Original onImageLoadError function.
|
||||
*/
|
||||
OpenLayers.Util.OSM.originalOnImageLoadError = OpenLayers.Util.onImageLoadError;
|
||||
|
||||
/**
|
||||
* Function: onImageLoadError
|
||||
*/
|
||||
OpenLayers.Util.onImageLoadError = function () {
|
||||
if (this.src.match(/^http:\/\/[abc]\.[a-z]+\.openstreetmap\.org\//)) {
|
||||
this.src = OpenLayers.Util.OSM.MISSING_TILE_URL;
|
||||
} else if (this.src.match(/^http:\/\/[def]\.tah\.openstreetmap\.org\//)) {
|
||||
// do nothing - this layer is transparent
|
||||
} else {
|
||||
OpenLayers.Util.OSM.originalOnImageLoadError;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.OSM.Mapnik
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.OSM>
|
||||
*/
|
||||
OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, {
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.OSM.Mapnik
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize: function (name, options) {
|
||||
var url = [
|
||||
"http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
|
||||
"http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
|
||||
"http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
|
||||
];
|
||||
options = OpenLayers.Util.extend({
|
||||
numZoomLevels: 19,
|
||||
buffer: 0,
|
||||
transitionEffect: "resize"
|
||||
}, options);
|
||||
var newArguments = [name, url, options];
|
||||
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Layer.OSM.Mapnik"
|
||||
});
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.OSM.Osmarender
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.OSM>
|
||||
*/
|
||||
OpenLayers.Layer.OSM.Osmarender = OpenLayers.Class(OpenLayers.Layer.OSM, {
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.OSM.Osmarender
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize: function (name, options) {
|
||||
var url = [
|
||||
"http://a.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png",
|
||||
"http://b.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png",
|
||||
"http://c.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png"
|
||||
];
|
||||
options = OpenLayers.Util.extend({
|
||||
numZoomLevels: 18,
|
||||
buffer: 0,
|
||||
transitionEffect: "resize"
|
||||
}, options);
|
||||
var newArguments = [name, url, options];
|
||||
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Layer.OSM.Osmarender"
|
||||
});
|
||||
|
||||
/**
|
||||
* Class: OpenLayers.Layer.OSM.CycleMap
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Layer.OSM>
|
||||
*/
|
||||
OpenLayers.Layer.OSM.CycleMap = OpenLayers.Class(OpenLayers.Layer.OSM, {
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.OSM.CycleMap
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize: function (name, options) {
|
||||
var url = [
|
||||
"http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
|
||||
"http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
|
||||
"http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"
|
||||
];
|
||||
options = OpenLayers.Util.extend({
|
||||
numZoomLevels: 19,
|
||||
buffer: 0,
|
||||
transitionEffect: "resize"
|
||||
}, options);
|
||||
var newArguments = [name, url, options];
|
||||
OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Layer.OSM.CycleMap"
|
||||
});
|
||||
12
js/ajax.js
12
js/ajax.js
@ -141,7 +141,7 @@ var AJAX = {
|
||||
*/
|
||||
lockPageHandler: function(event) {
|
||||
//Don't lock on enter.
|
||||
if (0 == event.charCode) {
|
||||
if (0 === event.charCode) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -549,11 +549,11 @@ var AJAX = {
|
||||
var self = this;
|
||||
// Clear loaded scripts if they are from another version of phpMyAdmin.
|
||||
// Depends on common params being set before loading scripts in responseHandler
|
||||
if (self._scriptsVersion == null) {
|
||||
self._scriptsVersion = PMA_commonParams.get('PMA_VERSION');
|
||||
if (self._scriptsVersion === null) {
|
||||
self._scriptsVersion = PMA_commonParams.get('PMA_VERSION');
|
||||
} else if (self._scriptsVersion != PMA_commonParams.get('PMA_VERSION')) {
|
||||
self._scripts = [];
|
||||
self._scriptsVersion = PMA_commonParams.get('PMA_VERSION');
|
||||
self._scripts = [];
|
||||
self._scriptsVersion = PMA_commonParams.get('PMA_VERSION');
|
||||
}
|
||||
self._scriptsToBeLoaded = [];
|
||||
self._scriptsToBeFired = [];
|
||||
@ -739,7 +739,7 @@ $(function () {
|
||||
//TODO: Check if sometimes menu is not retrieved from server,
|
||||
// Not sure but it seems menu was missing only for printview which
|
||||
// been removed lately, so if it's right some dead menu checks/fallbacks
|
||||
// may need to be removed from this file and Header.class.php
|
||||
// may need to be removed from this file and Header.php
|
||||
//AJAX.handleMenu.replace(event.originalEvent.state.menu);
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
Copyright (c) 2010-2011 Gabe Lerner (gabelerner@gmail.com) - http://code.google.com/p/canvg/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
2509
js/canvg/canvg.js
2509
js/canvg/canvg.js
File diff suppressed because it is too large
Load Diff
14
js/common.js
14
js/common.js
@ -7,8 +7,8 @@ $(function () {
|
||||
/**
|
||||
* Holds common parameters such as server, db, table, etc
|
||||
*
|
||||
* The content for this is normally loaded from Header.class.php or
|
||||
* Response.class.php and executed by ajax.js
|
||||
* The content for this is normally loaded from Header.php or
|
||||
* Response.php and executed by ajax.js
|
||||
*/
|
||||
var PMA_commonParams = (function () {
|
||||
/**
|
||||
@ -98,8 +98,8 @@ var PMA_commonParams = (function () {
|
||||
/**
|
||||
* Holds common parameters such as server, db, table, etc
|
||||
*
|
||||
* The content for this is normally loaded from Header.class.php or
|
||||
* Response.class.php and executed by ajax.js
|
||||
* The content for this is normally loaded from Header.php or
|
||||
* Response.php and executed by ajax.js
|
||||
*/
|
||||
var PMA_commonActions = {
|
||||
/**
|
||||
@ -409,6 +409,8 @@ PMA_DROP_IMPORT = {
|
||||
*/
|
||||
_drop: function (event) {
|
||||
var dbname = PMA_commonParams.get('db');
|
||||
var server = PMA_commonParams.get('server');
|
||||
|
||||
//if no database is selected -- no
|
||||
if (dbname !== '') {
|
||||
var files = event.originalEvent.dataTransfer.files;
|
||||
@ -447,9 +449,9 @@ PMA_DROP_IMPORT = {
|
||||
//uploading
|
||||
var fd = new FormData();
|
||||
fd.append('import_file', files[i]);
|
||||
// todo: method to find the value below
|
||||
fd.append('noplugin', '539de66e760ee');
|
||||
fd.append('noplugin', Math.random().toString(36).substring(2, 12));
|
||||
fd.append('db', dbname);
|
||||
fd.append('server', server);
|
||||
fd.append('token', PMA_commonParams.get('token'));
|
||||
fd.append('import_type', 'database');
|
||||
// todo: method to find the value below
|
||||
|
||||
@ -53,7 +53,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
|
||||
$form.PMA_confirm(question, $form.attr('action'), function (url) {
|
||||
PMA_ajaxShowMessage(PMA_messages.strRenamingDatabases, false);
|
||||
$.get(url, $("#rename_db_form").serialize() + '&is_js_confirmed=1', function (data) {
|
||||
$.post(url, $("#rename_db_form").serialize() + '&is_js_confirmed=1', function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
PMA_commonParams.set('db', data.newname);
|
||||
@ -73,7 +73,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.get()
|
||||
}); // end $.post()
|
||||
});
|
||||
}); // end Rename Database
|
||||
|
||||
@ -85,7 +85,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
PMA_ajaxShowMessage(PMA_messages.strCopyingDatabase, false);
|
||||
var $form = $(this);
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
$.get($form.attr('action'), $form.serialize(), function (data) {
|
||||
$.post($form.attr('action'), $form.serialize(), function (data) {
|
||||
// use messages that stay on screen
|
||||
$('div.success, div.error').fadeOut();
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
@ -102,7 +102,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.get
|
||||
}); // end $.post()
|
||||
}); // end copy database
|
||||
|
||||
/**
|
||||
@ -113,13 +113,13 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
var $form = $(this);
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
PMA_ajaxShowMessage(PMA_messages.strChangingCharset);
|
||||
$.get($form.attr('action'), $form.serialize() + "&submitcollation=1", function (data) {
|
||||
$.post($form.attr('action'), $form.serialize() + "&submitcollation=1", function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
}
|
||||
}); // end $.get()
|
||||
}); // end $.post()
|
||||
}); // end change charset
|
||||
|
||||
/**
|
||||
@ -137,7 +137,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
);
|
||||
$(this).PMA_confirm(question, $(this).attr('href'), function (url) {
|
||||
PMA_ajaxShowMessage(PMA_messages.strProcessingRequest);
|
||||
$.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function (data) {
|
||||
$.post(url, {'is_js_confirmed': '1', 'ajax_request': true}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success) {
|
||||
//Database deleted successfully, refresh both the frames
|
||||
PMA_reloadNavigation();
|
||||
|
||||
@ -57,6 +57,7 @@ function loadResult(result_path, table_name, link)
|
||||
PMA_makegrid(this, true, true, true, true);
|
||||
});
|
||||
$('#browse-results').show();
|
||||
PMA_highlightSQL($('#browse-results'));
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
}
|
||||
@ -84,26 +85,26 @@ function deleteResult(result_path, msg)
|
||||
var $msg = PMA_ajaxShowMessage(PMA_messages.strDeleting, false);
|
||||
/** Load the deleted option to the page*/
|
||||
$('#sqlqueryform').html('');
|
||||
var url = result_path;
|
||||
$.get(url, {'ajax_request': true, 'is_js_confirmed': true},
|
||||
$.post(result_path, {'ajax_request': true, 'is_js_confirmed': true},
|
||||
function (data) {
|
||||
if (typeof data !== 'undefined' && data.success) {
|
||||
$('#sqlqueryform').html(data.sql_query);
|
||||
/** Refresh the search results after the deletion */
|
||||
document.getElementById('buttonGo').click();
|
||||
$('#togglequerybox').html(PMA_messages.strHideQueryBox);
|
||||
/** Show the results of the deletion option */
|
||||
$('#browse-results').hide();
|
||||
$('#sqlqueryform').show();
|
||||
$('#togglequerybox').show();
|
||||
$('html, body')
|
||||
.animate({
|
||||
scrollTop: $("#browse-results").offset().top
|
||||
}, 1000);
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
} else {
|
||||
if (typeof data === 'undefined' || !data.success) {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
return;
|
||||
}
|
||||
|
||||
$('#sqlqueryform').html(data.sql_query);
|
||||
/** Refresh the search results after the deletion */
|
||||
document.getElementById('buttonGo').click();
|
||||
$('#togglequerybox').html(PMA_messages.strHideQueryBox);
|
||||
/** Show the results of the deletion option */
|
||||
$('#browse-results').hide();
|
||||
$('#sqlqueryform').show();
|
||||
$('#togglequerybox').show();
|
||||
$('html, body')
|
||||
.animate({
|
||||
scrollTop: $("#browse-results").offset().top
|
||||
}, 1000);
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ AJAX.registerTeardown('db_structure.js', function () {
|
||||
* when truncating, creating, dropping or inserting into a table
|
||||
*/
|
||||
function PMA_adjustTotals() {
|
||||
var byteUnits = new Array(
|
||||
var byteUnits = [
|
||||
PMA_messages.strB,
|
||||
PMA_messages.strKiB,
|
||||
PMA_messages.strMiB,
|
||||
@ -45,7 +45,7 @@ function PMA_adjustTotals() {
|
||||
PMA_messages.strTiB,
|
||||
PMA_messages.strPiB,
|
||||
PMA_messages.strEiB
|
||||
);
|
||||
];
|
||||
/**
|
||||
* @var $allTr jQuery object that references all the rows in the list of tables
|
||||
*/
|
||||
@ -214,7 +214,7 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
* Event handler on select of "Make consistent with central list"
|
||||
*/
|
||||
$('select[name=submit_mult]').change(function(event) {
|
||||
if($(this).val() === 'make_consistent_with_central_list') {
|
||||
if ($(this).val() === 'make_consistent_with_central_list') {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
jqConfirm(PMA_messages.makeConsistentMessage, function(){
|
||||
@ -222,6 +222,57 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
});
|
||||
return false;
|
||||
}
|
||||
else if ($(this).val() === 'copy_tbl' || $(this).val() === 'add_prefix_tbl' || $(this).val() === 'replace_prefix_tbl' || $(this).val() === 'copy_tbl_change_prefix') {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
if ($('input[name="selected_tbl[]"]:checked').length === 0) {
|
||||
return false;
|
||||
}
|
||||
var formData = $('#tablesForm').serialize();
|
||||
var modalTitle = '';
|
||||
if ($(this).val() === 'copy_tbl') {
|
||||
modalTitle = PMA_messages.strCopyTablesTo;
|
||||
}
|
||||
else if ($(this).val() === 'add_prefix_tbl') {
|
||||
modalTitle = PMA_messages.strAddPrefix;
|
||||
}
|
||||
else if ($(this).val() === 'replace_prefix_tbl') {
|
||||
modalTitle = PMA_messages.strReplacePrefix;
|
||||
}
|
||||
else if ($(this).val() === 'copy_tbl_change_prefix') {
|
||||
modalTitle = PMA_messages.strCopyPrefix;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'db_structure.php',
|
||||
dataType: 'html',
|
||||
data: formData
|
||||
|
||||
}).done(function(data) {
|
||||
|
||||
var dialogObj = $("<div style='display:none'>"+data+"</div>");
|
||||
$('body').append(dialogObj);
|
||||
var buttonOptions = {};
|
||||
buttonOptions[PMA_messages.strContinue] = function () {
|
||||
$('#ajax_form').submit();
|
||||
$( this ).dialog( "close" );
|
||||
};
|
||||
buttonOptions[PMA_messages.strCancel] = function () {
|
||||
$( this ).dialog( "close" );
|
||||
$('#tablesForm')[0].reset();
|
||||
};
|
||||
$(dialogObj).dialog({
|
||||
minWidth: 500,
|
||||
resizable: false,
|
||||
modal: true,
|
||||
title: modalTitle,
|
||||
buttons: buttonOptions
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#tablesForm').submit();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
@ -253,7 +304,7 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
|
||||
var params = getJSConfirmCommonParam(this);
|
||||
|
||||
$.get(url, params, function (data) {
|
||||
$.post(url, params, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
// Adjust table statistics
|
||||
@ -272,7 +323,7 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
} else {
|
||||
PMA_ajaxShowMessage(PMA_messages.strErrorProcessingRequest + " : " + data.error, false);
|
||||
}
|
||||
}); // end $.get()
|
||||
}); // end $.post()
|
||||
}, loadForeignKeyCheckbox); //end $.PMA_confirm()
|
||||
}); //end of Truncate Table Ajax action
|
||||
|
||||
@ -316,7 +367,7 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
|
||||
var params = getJSConfirmCommonParam(this);
|
||||
|
||||
$.get(url, params, function (data) {
|
||||
$.post(url, params, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
toggleRowColors($curr_row.next());
|
||||
@ -327,18 +378,18 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
} else {
|
||||
PMA_ajaxShowMessage(PMA_messages.strErrorProcessingRequest + " : " + data.error, false);
|
||||
}
|
||||
}); // end $.get()
|
||||
}); // end $.post()
|
||||
}, loadForeignKeyCheckbox); // end $.PMA_confirm()
|
||||
}); //end of Drop Table Ajax action
|
||||
|
||||
/**
|
||||
* Attach Event Handler for 'Print View'
|
||||
* Attach Event Handler for 'Print' link
|
||||
*/
|
||||
$(document).on('click', "#printView", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Print the page
|
||||
printPage();
|
||||
// Take to preview mode
|
||||
printPreview();
|
||||
}); //end of Print View action
|
||||
|
||||
//Calculate Real End for InnoDB
|
||||
|
||||
@ -83,7 +83,7 @@ AJAX.registerOnload('db_tracking.js', function () {
|
||||
$anchor.PMA_confirm(question, $anchor.attr('href'), function (url) {
|
||||
PMA_ajaxShowMessage(PMA_messages.strDeletingTrackingData);
|
||||
AJAX.source = $anchor;
|
||||
$.get(url, {'ajax_page_request': true, 'ajax_request': true}, AJAX.responseHandler);
|
||||
$.post(url, {'ajax_page_request': true, 'ajax_request': true}, AJAX.responseHandler);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -166,17 +166,17 @@ var ErrorReport = {
|
||||
* @return String
|
||||
*/
|
||||
_extractExceptionName: function (exception) {
|
||||
if (exception.message === null || typeof(exception.message) == "undefined"){
|
||||
if (exception.message === null || typeof(exception.message) == "undefined") {
|
||||
return "";
|
||||
} else {
|
||||
var reg = /([a-zA-Z]+):/;
|
||||
var regex_result = null;
|
||||
regex_result = reg.exec(exception.message);
|
||||
if(regex_result && regex_result.length == 2)
|
||||
return regex_result[1];
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
var reg = /([a-zA-Z]+):/;
|
||||
var regex_result = reg.exec(exception.message);
|
||||
if (regex_result && regex_result.length == 2) {
|
||||
return regex_result[1];
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
/**
|
||||
* Shows the modal dialog previewing the report
|
||||
|
||||
14
js/export.js
14
js/export.js
@ -305,16 +305,16 @@ AJAX.registerOnload('export.js', function () {
|
||||
} else {
|
||||
// enable the SQL comment options
|
||||
if (comments_are_present) {
|
||||
$("#checkbox_sql_dates").removeProp('disabled').parent().fadeTo('fast', 1);
|
||||
$("#checkbox_sql_dates").prop('disabled', false).parent().fadeTo('fast', 1);
|
||||
}
|
||||
$("#checkbox_sql_relation").removeProp('disabled').parent().fadeTo('fast', 1);
|
||||
$("#checkbox_sql_mime").removeProp('disabled').parent().fadeTo('fast', 1);
|
||||
$("#checkbox_sql_relation").prop('disabled', false).parent().fadeTo('fast', 1);
|
||||
$("#checkbox_sql_mime").prop('disabled', false).parent().fadeTo('fast', 1);
|
||||
}
|
||||
|
||||
if (show == 'structure') {
|
||||
$('#checkbox_sql_auto_increment').prop('disabled', true).parent().fadeTo('fast', 0.4);
|
||||
} else {
|
||||
$("#checkbox_sql_auto_increment").removeProp('disabled').parent().fadeTo('fast', 1);
|
||||
$("#checkbox_sql_auto_increment").prop('disabled', false).parent().fadeTo('fast', 1);
|
||||
}
|
||||
});
|
||||
|
||||
@ -349,7 +349,7 @@ function setup_table_structure_or_data() {
|
||||
} else {
|
||||
$('input[name="structure_or_data_forced"]').val(0);
|
||||
$('.export_structure input[type="checkbox"], .export_data input[type="checkbox"]')
|
||||
.removeProp('disabled');
|
||||
.prop('disabled', false);
|
||||
$('.export_structure, .export_data').fadeTo('fast', 1);
|
||||
|
||||
var structure_or_data = $('input[name="' + formElemName + '_default"]').val();
|
||||
@ -442,10 +442,10 @@ function toggle_sql_include_comments()
|
||||
} else {
|
||||
// If structure is not being exported, the comment options for structure should not be enabled
|
||||
if ($("#radio_sql_structure_or_data_data").prop("checked")) {
|
||||
$("#text_sql_header_comment").removeProp('disabled').parent("li").fadeTo('fast', 1);
|
||||
$("#text_sql_header_comment").prop('disabled', false).parent("li").fadeTo('fast', 1);
|
||||
} else {
|
||||
$ulIncludeComments.find("> li").fadeTo('fast', 1);
|
||||
$ulIncludeComments.find("> li > input").removeProp('disabled');
|
||||
$ulIncludeComments.find("> li > input").prop('disabled', false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
621
js/functions.js
621
js/functions.js
@ -44,11 +44,6 @@ var sql_autocomplete = false;
|
||||
*/
|
||||
var sql_autocomplete_default_table = '';
|
||||
|
||||
/**
|
||||
* @var chart_activeTimeouts object active timeouts that refresh the charts. When disabling a realtime chart, this can be used to stop the continuous ajax requests
|
||||
*/
|
||||
var chart_activeTimeouts = {};
|
||||
|
||||
/**
|
||||
* @var central_column_list array to hold the columns in central list per db.
|
||||
*/
|
||||
@ -92,8 +87,110 @@ $.ajaxPrefilter(function (options, originalOptions, jqXHR) {
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* Adds a date/time picker to an element
|
||||
*
|
||||
* @param object $this_element a jQuery object pointing to the element
|
||||
*/
|
||||
function PMA_addDatepicker($this_element, type, options)
|
||||
{
|
||||
var showTimepicker = true;
|
||||
if (type=="date") {
|
||||
showTimepicker = false;
|
||||
}
|
||||
|
||||
var defaultOptions = {
|
||||
showOn: 'button',
|
||||
buttonImage: themeCalendarImage, // defined in js/messages.php
|
||||
buttonImageOnly: true,
|
||||
stepMinutes: 1,
|
||||
stepHours: 1,
|
||||
showSecond: true,
|
||||
showMillisec: true,
|
||||
showMicrosec: true,
|
||||
showTimepicker: showTimepicker,
|
||||
showButtonPanel: false,
|
||||
dateFormat: 'yy-mm-dd', // yy means year with four digits
|
||||
timeFormat: 'HH:mm:ss.lc',
|
||||
constrainInput: false,
|
||||
altFieldTimeOnly: false,
|
||||
showAnim: '',
|
||||
beforeShow: function (input, inst) {
|
||||
// Remember that we came from the datepicker; this is used
|
||||
// in tbl_change.js by verificationsAfterFieldChange()
|
||||
$this_element.data('comes_from', 'datepicker');
|
||||
if ($(input).closest('.cEdit').length > 0) {
|
||||
setTimeout(function () {
|
||||
inst.dpDiv.css({
|
||||
top: 0,
|
||||
left: 0,
|
||||
position: 'relative'
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
// Fix wrong timepicker z-index, doesn't work without timeout
|
||||
setTimeout(function () {
|
||||
$('#ui-timepicker-div').css('z-index', $('#ui-datepicker-div').css('z-index'));
|
||||
}, 0);
|
||||
},
|
||||
onSelect: function() {
|
||||
$this_element.data('datepicker').inline = true;
|
||||
},
|
||||
onClose: function (dateText, dp_inst) {
|
||||
// The value is no more from the date picker
|
||||
$this_element.data('comes_from', '');
|
||||
if (typeof $this_element.data('datepicker') !== 'undefined') {
|
||||
$this_element.data('datepicker').inline = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
if (type == "datetime" || type == "timestamp") {
|
||||
$this_element.datetimepicker($.extend(defaultOptions, options));
|
||||
}
|
||||
else if (type == "date") {
|
||||
$this_element.datetimepicker($.extend(defaultOptions, options));
|
||||
}
|
||||
else if (type == "time") {
|
||||
$this_element.timepicker($.extend(defaultOptions, options));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hanle redirect and reload flags send as part of AJAX requests
|
||||
* Add a date/time picker to each element that needs it
|
||||
* (only when jquery-ui-timepicker-addon.js is loaded)
|
||||
*/
|
||||
function addDateTimePicker() {
|
||||
if ($.timepicker !== undefined) {
|
||||
$('input.timefield, input.datefield, input.datetimefield').each(function () {
|
||||
|
||||
var decimals = $(this).parent().attr('data-decimals');
|
||||
var type = $(this).parent().attr('data-type');
|
||||
|
||||
var showMillisec = false;
|
||||
var showMicrosec = false;
|
||||
var timeFormat = 'HH:mm:ss';
|
||||
// check for decimal places of seconds
|
||||
if (decimals > 0 && type.indexOf('time') != -1){
|
||||
if (decimals > 3) {
|
||||
showMillisec = true;
|
||||
showMicrosec = true;
|
||||
timeFormat = 'HH:mm:ss.lc';
|
||||
} else {
|
||||
showMillisec = true;
|
||||
timeFormat = 'HH:mm:ss.l';
|
||||
}
|
||||
}
|
||||
PMA_addDatepicker($(this), type, {
|
||||
showMillisec: showMillisec,
|
||||
showMicrosec: showMicrosec,
|
||||
timeFormat: timeFormat
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle redirect and reload flags sent as part of AJAX requests
|
||||
*
|
||||
* @param data ajax response data
|
||||
*/
|
||||
@ -290,7 +387,7 @@ function PMA_hideShowDefaultValue($default_type)
|
||||
*/
|
||||
function PMA_hideShowExpression($virtuality)
|
||||
{
|
||||
if ($virtuality.val() == '') {
|
||||
if ($virtuality.val() === '') {
|
||||
$virtuality.siblings('.expression').hide();
|
||||
} else {
|
||||
$virtuality.siblings('.expression').show();
|
||||
@ -471,74 +568,6 @@ function displayPasswordGenerateButton()
|
||||
$('#div_element_before_generate_password').parent().append('<div class="item"><label for="button_generate_password">' + PMA_messages.strGeneratePassword + ':</label><span class="options"><input type="button" class="button" id="button_generate_password" value="' + PMA_messages.strGenerate + '" onclick="suggestPassword(this.form)" /></span><input type="text" name="generated_pw" id="generated_pw" /></div>');
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a date/time picker to an element
|
||||
*
|
||||
* @param object $this_element a jQuery object pointing to the element
|
||||
*/
|
||||
function PMA_addDatepicker($this_element, type, options)
|
||||
{
|
||||
var showTimepicker = true;
|
||||
if (type=="date") {
|
||||
showTimepicker = false;
|
||||
}
|
||||
|
||||
var defaultOptions = {
|
||||
showOn: 'button',
|
||||
buttonImage: themeCalendarImage, // defined in js/messages.php
|
||||
buttonImageOnly: true,
|
||||
stepMinutes: 1,
|
||||
stepHours: 1,
|
||||
showSecond: true,
|
||||
showMillisec: true,
|
||||
showMicrosec: true,
|
||||
showTimepicker: showTimepicker,
|
||||
showButtonPanel: false,
|
||||
dateFormat: 'yy-mm-dd', // yy means year with four digits
|
||||
timeFormat: 'HH:mm:ss.lc',
|
||||
constrainInput: false,
|
||||
altFieldTimeOnly: false,
|
||||
showAnim: '',
|
||||
beforeShow: function (input, inst) {
|
||||
// Remember that we came from the datepicker; this is used
|
||||
// in tbl_change.js by verificationsAfterFieldChange()
|
||||
$this_element.data('comes_from', 'datepicker');
|
||||
if ($(input).closest('.cEdit').length > 0) {
|
||||
setTimeout(function () {
|
||||
inst.dpDiv.css({
|
||||
top: 0,
|
||||
left: 0,
|
||||
position: 'relative'
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
// Fix wrong timepicker z-index, doesn't work without timeout
|
||||
setTimeout(function () {
|
||||
$('#ui-timepicker-div').css('z-index', $('#ui-datepicker-div').css('z-index'));
|
||||
}, 0);
|
||||
},
|
||||
onSelect: function() {
|
||||
$this_element.data('datepicker').inline = true;
|
||||
},
|
||||
onClose: function (dateText, dp_inst) {
|
||||
// The value is no more from the date picker
|
||||
$this_element.data('comes_from', '');
|
||||
if (typeof $this_element.data('datepicker') !== 'undefined') {
|
||||
$this_element.data('datepicker').inline = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
if (type == "datetime" || type == "timestamp") {
|
||||
$this_element.datetimepicker($.extend(defaultOptions, options));
|
||||
}
|
||||
else if (type == "date") {
|
||||
$this_element.datetimepicker($.extend(defaultOptions, options));
|
||||
}
|
||||
else if (type == "time") {
|
||||
$this_element.timepicker($.extend(defaultOptions, options));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* selects the content of a given object, f.e. a textarea
|
||||
*
|
||||
@ -1009,11 +1038,6 @@ AJAX.registerOnload('functions.js', function () {
|
||||
});
|
||||
})*/
|
||||
|
||||
/**
|
||||
* This array is used to remember mark status of rows in browse mode
|
||||
*/
|
||||
var marked_row = [];
|
||||
|
||||
/**
|
||||
* marks all rows and selects its first checkbox inside the given element
|
||||
* the given element is usually a table or a div containing the table or tables
|
||||
@ -1044,20 +1068,6 @@ function unMarkAllRows(container_id)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks/unchecks all checkbox in given container (f.e. a form, fieldset or div)
|
||||
*
|
||||
* @param string container_id the container id
|
||||
* @param boolean state new value for checkbox (true or false)
|
||||
* @return boolean always true
|
||||
*/
|
||||
function setCheckboxes(container_id, state)
|
||||
{
|
||||
|
||||
$("#" + container_id).find("input:checkbox").prop('checked', state);
|
||||
return true;
|
||||
} // end of the 'setCheckboxes()' function
|
||||
|
||||
/**
|
||||
* Checks/unchecks all options of a <select> element
|
||||
*
|
||||
@ -1256,69 +1266,38 @@ function updateQueryParameters() {
|
||||
var query = codemirror_editor ? codemirror_editor.getValue() : $('#sqlquery').val();
|
||||
|
||||
var allParameters = query.match(/:[a-zA-Z0-9_]+/g);
|
||||
var parameters = [];
|
||||
// get unique parameters
|
||||
if (allParameters) {
|
||||
$.each(allParameters, function(i, parameter){
|
||||
if ($.inArray(parameter, parameters) === -1) {
|
||||
parameters.push(parameter);
|
||||
}
|
||||
});
|
||||
}
|
||||
var parameters = [];
|
||||
// get unique parameters
|
||||
if (allParameters) {
|
||||
$.each(allParameters, function(i, parameter){
|
||||
if ($.inArray(parameter, parameters) === -1) {
|
||||
parameters.push(parameter);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#parametersDiv').text(PMA_messages.strNoParam);
|
||||
return;
|
||||
}
|
||||
|
||||
var $temp = $('<div />');
|
||||
$temp.append($('#parametersDiv').children());
|
||||
$('#parametersDiv').empty();
|
||||
var $temp = $('<div />');
|
||||
$temp.append($('#parametersDiv').children());
|
||||
$('#parametersDiv').empty();
|
||||
|
||||
$.each(parameters, function (i, parameter) {
|
||||
var paramName = parameter.substring(1);
|
||||
var $param = $temp.find('#paramSpan_' + paramName );
|
||||
if (! $param.length) {
|
||||
$param = $('<span class="parameter" id="paramSpan_' + paramName + '" />');
|
||||
$('<label for="param_' + paramName + '" />').text(parameter).appendTo($param);
|
||||
$('<input type="text" name="parameters[' + parameter + ']" id="param_' + paramName + '" />').appendTo($param);
|
||||
}
|
||||
$('#parametersDiv').append($param);
|
||||
});
|
||||
$.each(parameters, function (i, parameter) {
|
||||
var paramName = parameter.substring(1);
|
||||
var $param = $temp.find('#paramSpan_' + paramName );
|
||||
if (! $param.length) {
|
||||
$param = $('<span class="parameter" id="paramSpan_' + paramName + '" />');
|
||||
$('<label for="param_' + paramName + '" />').text(parameter).appendTo($param);
|
||||
$('<input type="text" name="parameters[' + parameter + ']" id="param_' + paramName + '" />').appendTo($param);
|
||||
}
|
||||
$('#parametersDiv').append($param);
|
||||
});
|
||||
} else {
|
||||
$('#parametersDiv').empty();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a date/time picker to each element that needs it
|
||||
* (only when jquery-ui-timepicker-addon.js is loaded)
|
||||
*/
|
||||
function addDateTimePicker() {
|
||||
if ($.timepicker !== undefined) {
|
||||
$('input.timefield, input.datefield, input.datetimefield').each(function () {
|
||||
|
||||
var decimals = $(this).parent().attr('data-decimals');
|
||||
var type = $(this).parent().attr('data-type');
|
||||
|
||||
var showMillisec = false;
|
||||
var showMicrosec = false;
|
||||
var timeFormat = 'HH:mm:ss';
|
||||
// check for decimal places of seconds
|
||||
if (decimals > 0 && type.indexOf('time') != -1){
|
||||
if (decimals > 3) {
|
||||
showMillisec = true;
|
||||
showMicrosec = true;
|
||||
timeFormat = 'HH:mm:ss.lc';
|
||||
} else {
|
||||
showMillisec = true;
|
||||
timeFormat = 'HH:mm:ss.l';
|
||||
}
|
||||
}
|
||||
PMA_addDatepicker($(this), type, {
|
||||
showMillisec: showMillisec,
|
||||
showMicrosec: showMicrosec,
|
||||
timeFormat: timeFormat
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh/resize the WYSIWYG scratchboard
|
||||
*/
|
||||
@ -2167,7 +2146,7 @@ function PMA_highlightSQL($base)
|
||||
function PMA_updateCode($base, htmlValue, rawValue)
|
||||
{
|
||||
var $code = $base.find('code');
|
||||
if ($code.length == 0) {
|
||||
if ($code.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2455,56 +2434,65 @@ function PMA_showNoticeForEnum(selectElement)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates a Profiling Chart with jqplot. Used in sql.js
|
||||
/**
|
||||
* Creates a Profiling Chart. Used in sql.js
|
||||
* and in server_status_monitor.js
|
||||
*/
|
||||
function PMA_createProfilingChartJqplot(target, data)
|
||||
function PMA_createProfilingChart(target, data)
|
||||
{
|
||||
return $.jqplot(target, [data],
|
||||
{
|
||||
seriesDefaults: {
|
||||
renderer: $.jqplot.PieRenderer,
|
||||
rendererOptions: {
|
||||
showDataLabels: true
|
||||
}
|
||||
},
|
||||
highlighter: {
|
||||
show: true,
|
||||
tooltipLocation: 'se',
|
||||
sizeAdjust: 0,
|
||||
tooltipAxes: 'pieref',
|
||||
useAxesFormatters: false,
|
||||
formatString: '%s, %.9Ps'
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
location: 'e',
|
||||
rendererOptions: {numberColumns: 2}
|
||||
},
|
||||
// from http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette
|
||||
seriesColors: [
|
||||
'#fce94f',
|
||||
'#fcaf3e',
|
||||
'#e9b96e',
|
||||
'#8ae234',
|
||||
'#729fcf',
|
||||
'#ad7fa8',
|
||||
'#ef2929',
|
||||
'#eeeeec',
|
||||
'#888a85',
|
||||
'#c4a000',
|
||||
'#ce5c00',
|
||||
'#8f5902',
|
||||
'#4e9a06',
|
||||
'#204a87',
|
||||
'#5c3566',
|
||||
'#a40000',
|
||||
'#babdb6',
|
||||
'#2e3436'
|
||||
]
|
||||
}
|
||||
);
|
||||
// create the chart
|
||||
var factory = new JQPlotChartFactory();
|
||||
var chart = factory.createChart(ChartType.PIE, target);
|
||||
|
||||
// create the data table and add columns
|
||||
var dataTable = new DataTable();
|
||||
dataTable.addColumn(ColumnType.STRING, '');
|
||||
dataTable.addColumn(ColumnType.NUMBER, '');
|
||||
dataTable.setData(data);
|
||||
|
||||
// draw the chart and return the chart object
|
||||
chart.draw(dataTable, {
|
||||
seriesDefaults: {
|
||||
rendererOptions: {
|
||||
showDataLabels: true
|
||||
}
|
||||
},
|
||||
highlighter: {
|
||||
tooltipLocation: 'se',
|
||||
sizeAdjust: 0,
|
||||
tooltipAxes: 'pieref',
|
||||
formatString: '%s, %.9Ps'
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
location: 'e',
|
||||
rendererOptions: {
|
||||
numberColumns: 2
|
||||
}
|
||||
},
|
||||
// from http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette
|
||||
seriesColors: [
|
||||
'#fce94f',
|
||||
'#fcaf3e',
|
||||
'#e9b96e',
|
||||
'#8ae234',
|
||||
'#729fcf',
|
||||
'#ad7fa8',
|
||||
'#ef2929',
|
||||
'#eeeeec',
|
||||
'#888a85',
|
||||
'#c4a000',
|
||||
'#ce5c00',
|
||||
'#8f5902',
|
||||
'#4e9a06',
|
||||
'#204a87',
|
||||
'#5c3566',
|
||||
'#a40000',
|
||||
'#babdb6',
|
||||
'#2e3436'
|
||||
]
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2802,6 +2790,7 @@ AJAX.registerTeardown('functions.js', function () {
|
||||
$(document).off('submit', "form.create_table_form.ajax");
|
||||
$(document).off('click', "form.create_table_form.ajax input[name=submit_num_fields]");
|
||||
$(document).off('keyup', "form.create_table_form.ajax input");
|
||||
$(document).off('change', "input[name=partition_count],input[name=subpartition_count],select[name=partition_by]");
|
||||
});
|
||||
|
||||
/**
|
||||
@ -2915,24 +2904,21 @@ AJAX.registerOnload('functions.js', function () {
|
||||
}); // end create table form (save)
|
||||
|
||||
/**
|
||||
* Attach event handler for create table form (add fields)
|
||||
* Submits the intermediate changes in the table creation form
|
||||
* to refresh the UI accordingly
|
||||
*/
|
||||
$(document).on('click', "form.create_table_form.ajax input[name=submit_num_fields]", function (event) {
|
||||
event.preventDefault();
|
||||
function submitChangesInCreateTableForm (actionParam) {
|
||||
|
||||
/**
|
||||
* @var the_form object referring to the create table form
|
||||
*/
|
||||
var $form = $(this).closest('form');
|
||||
|
||||
if (!checkFormElementInRange(this.form, 'added_fields', PMA_messages.strLeastColumnError, 1)) {
|
||||
return;
|
||||
}
|
||||
var $form = $('form.create_table_form.ajax');
|
||||
|
||||
var $msgbox = PMA_ajaxShowMessage(PMA_messages.strProcessingRequest);
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
|
||||
//User wants to add more fields to the table
|
||||
$.post($form.attr('action'), $form.serialize() + "&submit_num_fields=1", function (data) {
|
||||
$.post($form.attr('action'), $form.serialize() + "&" + actionParam, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success) {
|
||||
var $pageContent = $("#page_content");
|
||||
$pageContent.html(data.message);
|
||||
@ -2944,6 +2930,19 @@ AJAX.registerOnload('functions.js', function () {
|
||||
PMA_ajaxShowMessage(data.error);
|
||||
}
|
||||
}); //end $.post()
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach event handler for create table form (add fields)
|
||||
*/
|
||||
$(document).on('click', "form.create_table_form.ajax input[name=submit_num_fields]", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (!checkFormElementInRange(this.form, 'added_fields', PMA_messages.strLeastColumnError, 1)) {
|
||||
return;
|
||||
}
|
||||
|
||||
submitChangesInCreateTableForm('submit_num_fields=1');
|
||||
}); // end create table form (add fields)
|
||||
|
||||
$(document).on('keydown', "form.create_table_form.ajax input[name=added_fields]", function (event) {
|
||||
@ -2956,6 +2955,20 @@ AJAX.registerOnload('functions.js', function () {
|
||||
.click();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Attach event handler to manage changes in number of partitions and subpartitions
|
||||
*/
|
||||
$(document).on('change', "input[name=partition_count],input[name=subpartition_count],select[name=partition_by]", function (event) {
|
||||
$this = $(this);
|
||||
$form = $this.parents('form');
|
||||
if ($form.is(".create_table_form.ajax")) {
|
||||
submitChangesInCreateTableForm('submit_partition_change=1');
|
||||
} else {
|
||||
$form.submit();
|
||||
}
|
||||
});
|
||||
|
||||
$("input[value=AUTO_INCREMENT]").change(function(){
|
||||
if (this.checked) {
|
||||
var col = /\d/.exec($(this).attr('name'));
|
||||
@ -3789,12 +3802,14 @@ function showIndexEditDialog($outer)
|
||||
$('a.ui-slider-handle').addClass('ui-state-focus');
|
||||
// set focus on index name input, if empty
|
||||
var input = $outer.find('input#input_index_name');
|
||||
input.val() || input.focus();
|
||||
if (! input.val()) {
|
||||
input.focus();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to display tooltips that were
|
||||
* generated on the PHP side by PMA_Util::showHint()
|
||||
* generated on the PHP side by PMA\libraries\Util::showHint()
|
||||
*
|
||||
* @param object $div a div jquery object which specifies the
|
||||
* domain for searching for tooltips. If we
|
||||
@ -4044,7 +4059,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
PMA_init_slider();
|
||||
|
||||
/**
|
||||
* Enables the text generated by PMA_Util::linkOrButton() to be clickable
|
||||
* Enables the text generated by PMA\libraries\Util::linkOrButton() to be clickable
|
||||
*/
|
||||
$(document).on('click', 'a.formLinkSubmit', function (e) {
|
||||
if (! $(this).hasClass('requireConfirm')) {
|
||||
@ -4294,48 +4309,6 @@ AJAX.registerOnload('functions.js', function () {
|
||||
$(this).data('val-hash', AJAX.hash($(this).is(":checked")));
|
||||
});
|
||||
});
|
||||
/**
|
||||
* jQuery plugin to cancel selection in HTML code.
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.noSelect = function (p) { //no select plugin by Paulo P.Marinas
|
||||
var prevent = (p === null) ? true : p;
|
||||
var is_msie = navigator.userAgent.indexOf('MSIE') > -1 || !!window.navigator.userAgent.match(/Trident.*rv\:11\./);
|
||||
var is_firefox = navigator.userAgent.indexOf('Firefox') > -1;
|
||||
var is_safari = navigator.userAgent.indexOf("Safari") > -1;
|
||||
var is_opera = navigator.userAgent.indexOf("Presto") > -1;
|
||||
if (prevent) {
|
||||
return this.each(function () {
|
||||
if (is_msie || is_safari) {
|
||||
$(this).bind('selectstart', function () {
|
||||
return false;
|
||||
});
|
||||
} else if (is_firefox) {
|
||||
$(this).css('MozUserSelect', 'none');
|
||||
$('body').trigger('focus');
|
||||
} else if (is_opera) {
|
||||
$(this).bind('mousedown', function () {
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
$(this).attr('unselectable', 'on');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return this.each(function () {
|
||||
if (is_msie || is_safari) {
|
||||
$(this).unbind('selectstart');
|
||||
} else if (is_firefox) {
|
||||
$(this).css('MozUserSelect', 'inherit');
|
||||
} else if (is_opera) {
|
||||
$(this).unbind('mousedown');
|
||||
} else {
|
||||
$(this).removeAttr('unselectable');
|
||||
}
|
||||
});
|
||||
}
|
||||
}; //end noSelect
|
||||
})(jQuery);
|
||||
|
||||
/**
|
||||
* jQuery plugin to correctly filter input fields by value, needed
|
||||
@ -4366,6 +4339,11 @@ function PMA_getCellValue(td) {
|
||||
}
|
||||
}
|
||||
|
||||
$(window).on('popstate', function (event, data) {
|
||||
$('#printcss').attr('media','print');
|
||||
return true;
|
||||
});
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
@ -4411,16 +4389,147 @@ AJAX.registerOnload('functions.js', function () {
|
||||
});
|
||||
|
||||
/**
|
||||
* Print button
|
||||
* Produce print preview
|
||||
*/
|
||||
function printPage()
|
||||
function printPreview()
|
||||
{
|
||||
// Do print the page
|
||||
$('#printcss').attr('media','all');
|
||||
createPrintAndBackButtons();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create print and back buttons in preview page
|
||||
*/
|
||||
function createPrintAndBackButtons() {
|
||||
|
||||
var back_button = $("<input/>",{
|
||||
type: 'button',
|
||||
value: PMA_messages.back,
|
||||
id: 'back_button_print_view'
|
||||
});
|
||||
back_button.click(removePrintAndBackButton);
|
||||
back_button.appendTo('#page_content');
|
||||
var print_button = $("<input/>",{
|
||||
type: 'button',
|
||||
value: PMA_messages.print,
|
||||
id: 'print_button_print_view'
|
||||
});
|
||||
print_button.click(printPage);
|
||||
print_button.appendTo('#page_content');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove print and back buttons and revert to normal view
|
||||
*/
|
||||
function removePrintAndBackButton(){
|
||||
$('#printcss').attr('media','print');
|
||||
$('#back_button_print_view').remove();
|
||||
$('#print_button_print_view').remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print page
|
||||
*/
|
||||
function printPage(){
|
||||
if (typeof(window.print) != 'undefined') {
|
||||
window.print();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print button
|
||||
*/
|
||||
function copyToClipboard()
|
||||
{
|
||||
var textArea = document.createElement("textarea");
|
||||
|
||||
//
|
||||
// *** This styling is an extra step which is likely not required. ***
|
||||
//
|
||||
// Why is it here? To ensure:
|
||||
// 1. the element is able to have focus and selection.
|
||||
// 2. if element was to flash render it has minimal visual impact.
|
||||
// 3. less flakyness with selection and copying which **might** occur if
|
||||
// the textarea element is not visible.
|
||||
//
|
||||
// The likelihood is the element won't even render, not even a flash,
|
||||
// so some of these are just precautions. However in IE the element
|
||||
// is visible whilst the popup box asking the user for permission for
|
||||
// the web page to copy to the clipboard.
|
||||
//
|
||||
|
||||
// Place in top-left corner of screen regardless of scroll position.
|
||||
textArea.style.position = 'fixed';
|
||||
textArea.style.top = 0;
|
||||
textArea.style.left = 0;
|
||||
|
||||
// Ensure it has a small width and height. Setting to 1px / 1em
|
||||
// doesn't work as this gives a negative w/h on some browsers.
|
||||
textArea.style.width = '2em';
|
||||
textArea.style.height = '2em';
|
||||
|
||||
// We don't need padding, reducing the size if it does flash render.
|
||||
textArea.style.padding = 0;
|
||||
|
||||
// Clean up any borders.
|
||||
textArea.style.border = 'none';
|
||||
textArea.style.outline = 'none';
|
||||
textArea.style.boxShadow = 'none';
|
||||
|
||||
// Avoid flash of white box if rendered for any reason.
|
||||
textArea.style.background = 'transparent';
|
||||
|
||||
textArea.value = '';
|
||||
|
||||
var elementList = $('#serverinfo a');
|
||||
|
||||
elementList.each(function(){
|
||||
textArea.value += $(this).text().split(':')[1].trim() + '/';
|
||||
});
|
||||
textArea.value += '\t\t' + window.location.href;
|
||||
textArea.value += '\n';
|
||||
|
||||
elementList = $('.notice,.success');
|
||||
|
||||
elementList.each(function(){
|
||||
textArea.value += $(this).clone().children().remove().end().text() + '\n\n';
|
||||
});
|
||||
|
||||
elementList = $('.sql pre');
|
||||
|
||||
elementList.each(function() {
|
||||
textArea.value += $(this).text() + '\n\n';
|
||||
});
|
||||
|
||||
elementList = $('.table_results .column_heading a');
|
||||
|
||||
elementList.each(function() {
|
||||
textArea.value += $(this).clone().children().remove().end().text() + '\t';
|
||||
});
|
||||
|
||||
textArea.value += '\n';
|
||||
elementList = $('tbody .odd,tbody .even');
|
||||
elementList.each(function() {
|
||||
var childElementList = $(this).find('.data span');
|
||||
childElementList.each(function(){
|
||||
textArea.value += $(this).clone().children().remove().end().text() + '\t';
|
||||
});
|
||||
textArea.value += '\n';
|
||||
});
|
||||
|
||||
document.body.appendChild(textArea);
|
||||
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
} catch (err) {
|
||||
alert('Sorry! Unable to copy');
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
@ -4475,7 +4584,7 @@ function PMA_createViewDialog($this)
|
||||
syntaxHighlighter.save();
|
||||
}
|
||||
$msg = PMA_ajaxShowMessage();
|
||||
$.get('view_create.php', $('#createViewDialog').find('form').serialize(), function (data) {
|
||||
$.post('view_create.php', $('#createViewDialog').find('form').serialize(), function (data) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
$('#createViewDialog').dialog("close");
|
||||
|
||||
@ -17,12 +17,11 @@ header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
|
||||
define('PMA_MINIMUM_COMMON', true);
|
||||
require_once './libraries/common.inc.php';
|
||||
|
||||
require_once './libraries/OutputBuffering.class.php';
|
||||
$buffer = PMA_OutputBuffering::getInstance();
|
||||
$buffer = PMA\libraries\OutputBuffering::getInstance();
|
||||
$buffer->start();
|
||||
register_shutdown_function(
|
||||
function () {
|
||||
echo PMA_OutputBuffering::getInstance()->getContents();
|
||||
echo PMA\libraries\OutputBuffering::getInstance()->getContents();
|
||||
}
|
||||
);
|
||||
|
||||
@ -69,7 +68,7 @@ function PMA_getImage(image, alternate, attributes) {
|
||||
return false;
|
||||
};
|
||||
var sprites = [
|
||||
<?php echo implode($keys, ",\n ") . "\n"; ?>
|
||||
<?php echo implode($keys, ",\n ") , "\n"; ?>
|
||||
];
|
||||
// custom image object, it will eventually be returned by this functions
|
||||
var retval = {
|
||||
|
||||
@ -26,12 +26,11 @@ $_GET['scripts'] = json_encode($_GET['scripts']);
|
||||
define('PMA_MINIMUM_COMMON', true);
|
||||
require_once './libraries/common.inc.php';
|
||||
|
||||
require_once './libraries/OutputBuffering.class.php';
|
||||
$buffer = PMA_OutputBuffering::getInstance();
|
||||
$buffer = PMA\libraries\OutputBuffering::getInstance();
|
||||
$buffer->start();
|
||||
register_shutdown_function(
|
||||
function () {
|
||||
echo PMA_OutputBuffering::getInstance()->getContents();
|
||||
echo PMA\libraries\OutputBuffering::getInstance()->getContents();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@ -119,6 +119,9 @@ function loadJSAndGISEditor(value, field, type, input_name, token) {
|
||||
script.onload = function () {
|
||||
loadGISEditor(value, field, type, input_name, token);
|
||||
};
|
||||
script.onerror = function() {
|
||||
loadGISEditor(value, field, type, input_name, token);
|
||||
}
|
||||
|
||||
script.src = 'js/openlayers/OpenLayers.js';
|
||||
head.appendChild(script);
|
||||
|
||||
@ -65,15 +65,6 @@ AJAX.registerOnload('import.js', function () {
|
||||
|
||||
if (radioLocalImport.length !== 0) {
|
||||
// remote upload.
|
||||
// TODO Remove this section when all browsers support HTML5 "required" property
|
||||
if (! radioLocalImport.is(":checked") && ! radioImport.is(":checked")) {
|
||||
radioImport.focus();
|
||||
var msg = '<div class="error"><img src="themes/dot.gif" title="" alt="" class="icon ic_s_error" /> ';
|
||||
msg += PMA_messages.strRadioUnchecked;
|
||||
msg += '</div>';
|
||||
PMA_ajaxShowMessage(msg, false);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (radioImport.is(":checked") && $("#input_import_file").val() === '') {
|
||||
$("#input_import_file").focus();
|
||||
|
||||
@ -8,6 +8,37 @@
|
||||
* @required js/functions.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns the array of indexes based on the index choice
|
||||
*
|
||||
* @param index_choice index choice
|
||||
*/
|
||||
function PMA_getIndexArray(index_choice)
|
||||
{
|
||||
var source_array = null;
|
||||
|
||||
switch (index_choice.toLowerCase()) {
|
||||
case 'primary':
|
||||
source_array = primary_indexes;
|
||||
break;
|
||||
case 'unique':
|
||||
source_array = unique_indexes;
|
||||
break;
|
||||
case 'index':
|
||||
source_array = indexes;
|
||||
break;
|
||||
case 'fulltext':
|
||||
source_array = fulltext_indexes;
|
||||
break;
|
||||
case 'spatial':
|
||||
source_array = spatial_indexes;
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return source_array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides/shows the inputs and submits appropriately depending
|
||||
* on whether the index type chosen is 'SPATIAL' or not.
|
||||
@ -490,38 +521,6 @@ function PMA_indexTypeSelectionDialog(source_array, index_choice, col_index)
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the array of indexes based on the index choice
|
||||
*
|
||||
* @param index_choice index choice
|
||||
*/
|
||||
function PMA_getIndexArray(index_choice)
|
||||
{
|
||||
var source_array = null;
|
||||
|
||||
switch (index_choice.toLowerCase()) {
|
||||
case 'primary':
|
||||
source_array = primary_indexes;
|
||||
break;
|
||||
case 'unique':
|
||||
source_array = unique_indexes;
|
||||
break;
|
||||
case 'index':
|
||||
source_array = indexes;
|
||||
break;
|
||||
case 'fulltext':
|
||||
source_array = fulltext_indexes;
|
||||
break;
|
||||
case 'spatial':
|
||||
source_array = spatial_indexes;
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return source_array;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
@ -610,7 +609,7 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
|
||||
$anchor.PMA_confirm(question, $anchor.attr('href'), function (url) {
|
||||
var $msg = PMA_ajaxShowMessage(PMA_messages.strDroppingPrimaryKeyIndex, false);
|
||||
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function (data) {
|
||||
$.post(url, {'is_js_confirmed': 1, 'ajax_request': true}, function (data) {
|
||||
if (typeof data !== 'undefined' && data.success === true) {
|
||||
PMA_ajaxRemoveMessage($msg);
|
||||
var $table_ref = $rows_to_hide.closest('table');
|
||||
@ -644,7 +643,7 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
} else {
|
||||
PMA_ajaxShowMessage(PMA_messages.strErrorProcessingRequest + " : " + data.error, false);
|
||||
}
|
||||
}); // end $.get()
|
||||
}); // end $.post()
|
||||
}); // end $.PMA_confirm()
|
||||
}); //end Drop Primary Key/Index
|
||||
|
||||
@ -703,7 +702,7 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
}
|
||||
|
||||
// Select a source array.
|
||||
var source_array = PMA_getIndexArray(index_choice);
|
||||
source_array = PMA_getIndexArray(index_choice);
|
||||
if (source_array == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
4
js/jquery/jquery-1.11.1.min.js
vendored
4
js/jquery/jquery-1.11.1.min.js
vendored
File diff suppressed because one or more lines are too long
4
js/jquery/jquery-2.1.4.min.js
vendored
Normal file
4
js/jquery/jquery-2.1.4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
js/jquery/jquery-ui-1.11.2.min.js
vendored
13
js/jquery/jquery-ui-1.11.2.min.js
vendored
File diff suppressed because one or more lines are too long
13
js/jquery/jquery-ui-1.11.4.min.js
vendored
Normal file
13
js/jquery/jquery-ui-1.11.4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
24
js/jquery/src/jquery-ui/.jshintrc
Normal file
24
js/jquery/src/jquery-ui/.jshintrc
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"boss": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"eqnull": true,
|
||||
"expr": true,
|
||||
"immed": true,
|
||||
"noarg": true,
|
||||
"onevar": true,
|
||||
"quotmark": "double",
|
||||
"smarttabs": true,
|
||||
"trailing": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
|
||||
"browser": true,
|
||||
"es3": true,
|
||||
"jquery": true,
|
||||
|
||||
"globals": {
|
||||
"define": false,
|
||||
"Globalize": false
|
||||
}
|
||||
}
|
||||
22
js/jquery/src/jquery-ui/accordion.js
vendored
22
js/jquery/src/jquery-ui/accordion.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Accordion 1.11.2
|
||||
* jQuery UI Accordion 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -25,7 +25,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget( "ui.accordion", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
options: {
|
||||
active: 0,
|
||||
animate: {},
|
||||
@ -483,7 +483,10 @@ return $.widget( "ui.accordion", {
|
||||
toHide.attr({
|
||||
"aria-hidden": "true"
|
||||
});
|
||||
toHide.prev().attr( "aria-selected", "false" );
|
||||
toHide.prev().attr({
|
||||
"aria-selected": "false",
|
||||
"aria-expanded": "false"
|
||||
});
|
||||
// if we're switching panels, remove the old header from the tab order
|
||||
// if we're opening from collapsed state, remove the previous header from the tab order
|
||||
// if we're collapsing, then keep the collapsing header in the tab order
|
||||
@ -494,7 +497,7 @@ return $.widget( "ui.accordion", {
|
||||
});
|
||||
} else if ( toShow.length ) {
|
||||
this.headers.filter(function() {
|
||||
return $( this ).attr( "tabIndex" ) === 0;
|
||||
return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
|
||||
})
|
||||
.attr( "tabIndex", -1 );
|
||||
}
|
||||
@ -504,8 +507,8 @@ return $.widget( "ui.accordion", {
|
||||
.prev()
|
||||
.attr({
|
||||
"aria-selected": "true",
|
||||
tabIndex: 0,
|
||||
"aria-expanded": "true"
|
||||
"aria-expanded": "true",
|
||||
tabIndex: 0
|
||||
});
|
||||
},
|
||||
|
||||
@ -513,6 +516,7 @@ return $.widget( "ui.accordion", {
|
||||
var total, easing, duration,
|
||||
that = this,
|
||||
adjust = 0,
|
||||
boxSizing = toShow.css( "box-sizing" ),
|
||||
down = toShow.length &&
|
||||
( !toHide.length || ( toShow.index() < toHide.index() ) ),
|
||||
animate = this.options.animate || {},
|
||||
@ -555,7 +559,9 @@ return $.widget( "ui.accordion", {
|
||||
step: function( now, fx ) {
|
||||
fx.now = Math.round( now );
|
||||
if ( fx.prop !== "height" ) {
|
||||
adjust += fx.now;
|
||||
if ( boxSizing === "content-box" ) {
|
||||
adjust += fx.now;
|
||||
}
|
||||
} else if ( that.options.heightStyle !== "content" ) {
|
||||
fx.now = Math.round( total - toHide.outerHeight() - adjust );
|
||||
adjust = 0;
|
||||
|
||||
6
js/jquery/src/jquery-ui/autocomplete.js
vendored
6
js/jquery/src/jquery-ui/autocomplete.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Autocomplete 1.11.2
|
||||
* jQuery UI Autocomplete 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -27,7 +27,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
$.widget( "ui.autocomplete", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
defaultElement: "<input>",
|
||||
options: {
|
||||
appendTo: null,
|
||||
|
||||
8
js/jquery/src/jquery-ui/button.js
vendored
8
js/jquery/src/jquery-ui/button.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Button 1.11.2
|
||||
* jQuery UI Button 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -52,7 +52,7 @@ var lastActive,
|
||||
};
|
||||
|
||||
$.widget( "ui.button", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
defaultElement: "<button>",
|
||||
options: {
|
||||
disabled: null,
|
||||
@ -348,7 +348,7 @@ $.widget( "ui.button", {
|
||||
});
|
||||
|
||||
$.widget( "ui.buttonset", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
options: {
|
||||
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
|
||||
},
|
||||
|
||||
8
js/jquery/src/jquery-ui/core.js
vendored
8
js/jquery/src/jquery-ui/core.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Core 1.11.2
|
||||
* jQuery UI Core 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -24,7 +24,7 @@
|
||||
$.ui = $.ui || {};
|
||||
|
||||
$.extend( $.ui, {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
|
||||
keyCode: {
|
||||
BACKSPACE: 8,
|
||||
@ -97,7 +97,7 @@ function focusable( element, isTabIndexNotNaN ) {
|
||||
img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
|
||||
return !!img && visible( img );
|
||||
}
|
||||
return ( /input|select|textarea|button|object/.test( nodeName ) ?
|
||||
return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
|
||||
!element.disabled :
|
||||
"a" === nodeName ?
|
||||
element.href || isTabIndexNotNaN :
|
||||
|
||||
12
js/jquery/src/jquery-ui/datepicker.js
vendored
12
js/jquery/src/jquery-ui/datepicker.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Datepicker 1.11.2
|
||||
* jQuery UI Datepicker 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -23,7 +23,7 @@
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
$.extend($.ui, { datepicker: { version: "1.11.2" } });
|
||||
$.extend($.ui, { datepicker: { version: "1.11.4" } });
|
||||
|
||||
var datepicker_instActive;
|
||||
|
||||
@ -389,6 +389,10 @@ $.extend(Datepicker.prototype, {
|
||||
} else if (nodeName === "div" || nodeName === "span") {
|
||||
$target.removeClass(this.markerClassName).empty();
|
||||
}
|
||||
|
||||
if ( datepicker_instActive === inst ) {
|
||||
datepicker_instActive = null;
|
||||
}
|
||||
},
|
||||
|
||||
/* Enable the date picker to a jQuery selection.
|
||||
@ -2073,7 +2077,7 @@ $.fn.datepicker = function(options){
|
||||
$.datepicker = new Datepicker(); // singleton instance
|
||||
$.datepicker.initialized = false;
|
||||
$.datepicker.uuid = new Date().getTime();
|
||||
$.datepicker.version = "1.11.2";
|
||||
$.datepicker.version = "1.11.4";
|
||||
|
||||
return $.datepicker;
|
||||
|
||||
|
||||
11
js/jquery/src/jquery-ui/dialog.js
vendored
11
js/jquery/src/jquery-ui/dialog.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Dialog 1.11.2
|
||||
* jQuery UI Dialog 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -30,7 +30,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget( "ui.dialog", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
options: {
|
||||
appendTo: "body",
|
||||
autoOpen: true,
|
||||
@ -150,6 +150,7 @@ return $.widget( "ui.dialog", {
|
||||
var next,
|
||||
originalPosition = this.originalPosition;
|
||||
|
||||
this._untrackInstance();
|
||||
this._destroyOverlay();
|
||||
|
||||
this.element
|
||||
@ -228,10 +229,10 @@ return $.widget( "ui.dialog", {
|
||||
|
||||
_moveToTop: function( event, silent ) {
|
||||
var moved = false,
|
||||
zIndicies = this.uiDialog.siblings( ".ui-front:visible" ).map(function() {
|
||||
zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map(function() {
|
||||
return +$( this ).css( "z-index" );
|
||||
}).get(),
|
||||
zIndexMax = Math.max.apply( null, zIndicies );
|
||||
zIndexMax = Math.max.apply( null, zIndices );
|
||||
|
||||
if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
|
||||
this.uiDialog.css( "z-index", zIndexMax + 1 );
|
||||
|
||||
14
js/jquery/src/jquery-ui/draggable.js
vendored
14
js/jquery/src/jquery-ui/draggable.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Draggable 1.11.2
|
||||
* jQuery UI Draggable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
$.widget("ui.draggable", $.ui.mouse, {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
widgetEventPrefix: "drag",
|
||||
options: {
|
||||
addClasses: true,
|
||||
@ -800,6 +800,9 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
|
||||
if ( !sortable.isOver ) {
|
||||
sortable.isOver = 1;
|
||||
|
||||
// Store draggable's parent in case we need to reappend to it later.
|
||||
draggable._parent = ui.helper.parent();
|
||||
|
||||
sortable.currentItem = ui.helper
|
||||
.appendTo( sortable.element )
|
||||
.data( "ui-sortable-item", true );
|
||||
@ -876,8 +879,9 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
|
||||
sortable.placeholder.remove();
|
||||
}
|
||||
|
||||
// Recalculate the draggable's offset considering the sortable
|
||||
// may have modified them in unexpected ways (#8809)
|
||||
// Restore and recalculate the draggable's offset considering the sortable
|
||||
// may have modified them in unexpected ways. (#8809, #10669)
|
||||
ui.helper.appendTo( draggable._parent );
|
||||
draggable._refreshOffsets( event );
|
||||
ui.position = draggable._generatePosition( event, true );
|
||||
|
||||
|
||||
6
js/jquery/src/jquery-ui/droppable.js
vendored
6
js/jquery/src/jquery-ui/droppable.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Droppable 1.11.2
|
||||
* jQuery UI Droppable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -27,7 +27,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
$.widget( "ui.droppable", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
widgetEventPrefix: "drop",
|
||||
options: {
|
||||
accept: "*",
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-blind.js
vendored
4
js/jquery/src/jquery-ui/effect-blind.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Blind 1.11.2
|
||||
* jQuery UI Effects Blind 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-bounce.js
vendored
4
js/jquery/src/jquery-ui/effect-bounce.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Bounce 1.11.2
|
||||
* jQuery UI Effects Bounce 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-clip.js
vendored
4
js/jquery/src/jquery-ui/effect-clip.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Clip 1.11.2
|
||||
* jQuery UI Effects Clip 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-drop.js
vendored
4
js/jquery/src/jquery-ui/effect-drop.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Drop 1.11.2
|
||||
* jQuery UI Effects Drop 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-explode.js
vendored
4
js/jquery/src/jquery-ui/effect-explode.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Explode 1.11.2
|
||||
* jQuery UI Effects Explode 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-fade.js
vendored
4
js/jquery/src/jquery-ui/effect-fade.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Fade 1.11.2
|
||||
* jQuery UI Effects Fade 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-fold.js
vendored
4
js/jquery/src/jquery-ui/effect-fold.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Fold 1.11.2
|
||||
* jQuery UI Effects Fold 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-highlight.js
vendored
4
js/jquery/src/jquery-ui/effect-highlight.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Highlight 1.11.2
|
||||
* jQuery UI Effects Highlight 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-puff.js
vendored
4
js/jquery/src/jquery-ui/effect-puff.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Puff 1.11.2
|
||||
* jQuery UI Effects Puff 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-pulsate.js
vendored
4
js/jquery/src/jquery-ui/effect-pulsate.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Pulsate 1.11.2
|
||||
* jQuery UI Effects Pulsate 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-scale.js
vendored
4
js/jquery/src/jquery-ui/effect-scale.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Scale 1.11.2
|
||||
* jQuery UI Effects Scale 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-shake.js
vendored
4
js/jquery/src/jquery-ui/effect-shake.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Shake 1.11.2
|
||||
* jQuery UI Effects Shake 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-size.js
vendored
4
js/jquery/src/jquery-ui/effect-size.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Size 1.11.2
|
||||
* jQuery UI Effects Size 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-slide.js
vendored
4
js/jquery/src/jquery-ui/effect-slide.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Slide 1.11.2
|
||||
* jQuery UI Effects Slide 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
4
js/jquery/src/jquery-ui/effect-transfer.js
vendored
4
js/jquery/src/jquery-ui/effect-transfer.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects Transfer 1.11.2
|
||||
* jQuery UI Effects Transfer 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
||||
6
js/jquery/src/jquery-ui/effect.js
vendored
6
js/jquery/src/jquery-ui/effect.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Effects 1.11.2
|
||||
* jQuery UI Effects 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -904,7 +904,7 @@ $.fn.extend({
|
||||
(function() {
|
||||
|
||||
$.extend( $.effects, {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
|
||||
// Saves a set of properties in a data storage
|
||||
save: function( element, set ) {
|
||||
|
||||
6
js/jquery/src/jquery-ui/menu.js
vendored
6
js/jquery/src/jquery-ui/menu.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Menu 1.11.2
|
||||
* jQuery UI Menu 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget( "ui.menu", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
defaultElement: "<ul>",
|
||||
delay: 300,
|
||||
options: {
|
||||
|
||||
6
js/jquery/src/jquery-ui/mouse.js
vendored
6
js/jquery/src/jquery-ui/mouse.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Mouse 1.11.2
|
||||
* jQuery UI Mouse 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -29,7 +29,7 @@ $( document ).mouseup( function() {
|
||||
});
|
||||
|
||||
return $.widget("ui.mouse", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
options: {
|
||||
cancel: "input,textarea,button,select,option",
|
||||
distance: 1,
|
||||
|
||||
8
js/jquery/src/jquery-ui/position.js
vendored
8
js/jquery/src/jquery-ui/position.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Position 1.11.2
|
||||
* jQuery UI Position 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -448,12 +448,12 @@ $.ui.position = {
|
||||
newOverBottom;
|
||||
if ( overTop < 0 ) {
|
||||
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
|
||||
if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
|
||||
if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
|
||||
position.top += myOffset + atOffset + offset;
|
||||
}
|
||||
} else if ( overBottom > 0 ) {
|
||||
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
|
||||
if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
|
||||
if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
|
||||
position.top += myOffset + atOffset + offset;
|
||||
}
|
||||
}
|
||||
|
||||
6
js/jquery/src/jquery-ui/progressbar.js
vendored
6
js/jquery/src/jquery-ui/progressbar.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Progressbar 1.11.2
|
||||
* jQuery UI Progressbar 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -25,7 +25,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget( "ui.progressbar", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
options: {
|
||||
max: 100,
|
||||
value: 0,
|
||||
|
||||
101
js/jquery/src/jquery-ui/resizable.js
vendored
101
js/jquery/src/jquery-ui/resizable.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Resizable 1.11.2
|
||||
* jQuery UI Resizable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
$.widget("ui.resizable", $.ui.mouse, {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
widgetEventPrefix: "resize",
|
||||
options: {
|
||||
alsoResize: false,
|
||||
@ -99,7 +99,7 @@ $.widget("ui.resizable", $.ui.mouse, {
|
||||
});
|
||||
|
||||
// Wrap the element if it cannot hold child nodes
|
||||
if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
|
||||
if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) {
|
||||
|
||||
this.element.wrap(
|
||||
$("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
|
||||
@ -160,7 +160,8 @@ $.widget("ui.resizable", $.ui.mouse, {
|
||||
nw: ".ui-resizable-nw"
|
||||
} );
|
||||
|
||||
if (this.handles.constructor === String) {
|
||||
this._handles = $();
|
||||
if ( this.handles.constructor === String ) {
|
||||
|
||||
if ( this.handles === "all") {
|
||||
this.handles = "n,e,s,w,se,sw,ne,nw";
|
||||
@ -198,9 +199,12 @@ $.widget("ui.resizable", $.ui.mouse, {
|
||||
|
||||
if (this.handles[i].constructor === String) {
|
||||
this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
|
||||
} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
|
||||
this.handles[ i ] = $( this.handles[ i ] );
|
||||
this._on( this.handles[ i ], { "mousedown": that._mouseDown });
|
||||
}
|
||||
|
||||
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
|
||||
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {
|
||||
|
||||
axis = $(this.handles[i], this.element);
|
||||
|
||||
@ -214,21 +218,17 @@ $.widget("ui.resizable", $.ui.mouse, {
|
||||
target.css(padPos, padWrapper);
|
||||
|
||||
this._proportionallyResize();
|
||||
|
||||
}
|
||||
|
||||
// TODO: What's that good for? There's not anything to be executed left
|
||||
if (!$(this.handles[i]).length) {
|
||||
continue;
|
||||
}
|
||||
this._handles = this._handles.add( this.handles[ i ] );
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: make renderAxis a prototype function
|
||||
this._renderAxis(this.element);
|
||||
|
||||
this._handles = $(".ui-resizable-handle", this.element)
|
||||
.disableSelection();
|
||||
this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
|
||||
this._handles.disableSelection();
|
||||
|
||||
this._handles.mouseover(function() {
|
||||
if (!that.resizing) {
|
||||
@ -262,7 +262,6 @@ $.widget("ui.resizable", $.ui.mouse, {
|
||||
}
|
||||
|
||||
this._mouseInit();
|
||||
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
@ -943,7 +942,7 @@ $.ui.plugin.add( "resizable", "containment", {
|
||||
}
|
||||
}
|
||||
|
||||
if ( !continueResize ){
|
||||
if ( !continueResize ) {
|
||||
that.position.left = that.prevPosition.left;
|
||||
that.position.top = that.prevPosition.top;
|
||||
that.size.width = that.prevSize.width;
|
||||
@ -984,29 +983,15 @@ $.ui.plugin.add("resizable", "alsoResize", {
|
||||
|
||||
start: function() {
|
||||
var that = $(this).resizable( "instance" ),
|
||||
o = that.options,
|
||||
_store = function(exp) {
|
||||
$(exp).each(function() {
|
||||
var el = $(this);
|
||||
el.data("ui-resizable-alsoresize", {
|
||||
width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
|
||||
left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
|
||||
});
|
||||
});
|
||||
};
|
||||
o = that.options;
|
||||
|
||||
if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) {
|
||||
if (o.alsoResize.length) {
|
||||
o.alsoResize = o.alsoResize[0];
|
||||
_store(o.alsoResize);
|
||||
} else {
|
||||
$.each(o.alsoResize, function(exp) {
|
||||
_store(exp);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
_store(o.alsoResize);
|
||||
}
|
||||
$(o.alsoResize).each(function() {
|
||||
var el = $(this);
|
||||
el.data("ui-resizable-alsoresize", {
|
||||
width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
|
||||
left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
resize: function(event, ui) {
|
||||
@ -1019,35 +1004,23 @@ $.ui.plugin.add("resizable", "alsoResize", {
|
||||
width: (that.size.width - os.width) || 0,
|
||||
top: (that.position.top - op.top) || 0,
|
||||
left: (that.position.left - op.left) || 0
|
||||
},
|
||||
|
||||
_alsoResize = function(exp, c) {
|
||||
$(exp).each(function() {
|
||||
var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
|
||||
css = c && c.length ?
|
||||
c :
|
||||
el.parents(ui.originalElement[0]).length ?
|
||||
[ "width", "height" ] :
|
||||
[ "width", "height", "top", "left" ];
|
||||
|
||||
$.each(css, function(i, prop) {
|
||||
var sum = (start[prop] || 0) + (delta[prop] || 0);
|
||||
if (sum && sum >= 0) {
|
||||
style[prop] = sum || null;
|
||||
}
|
||||
});
|
||||
|
||||
el.css(style);
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) {
|
||||
$.each(o.alsoResize, function(exp, c) {
|
||||
_alsoResize(exp, c);
|
||||
$(o.alsoResize).each(function() {
|
||||
var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
|
||||
css = el.parents(ui.originalElement[0]).length ?
|
||||
[ "width", "height" ] :
|
||||
[ "width", "height", "top", "left" ];
|
||||
|
||||
$.each(css, function(i, prop) {
|
||||
var sum = (start[prop] || 0) + (delta[prop] || 0);
|
||||
if (sum && sum >= 0) {
|
||||
style[prop] = sum || null;
|
||||
}
|
||||
});
|
||||
|
||||
el.css(style);
|
||||
});
|
||||
} else {
|
||||
_alsoResize(o.alsoResize);
|
||||
}
|
||||
},
|
||||
|
||||
stop: function() {
|
||||
@ -1165,7 +1138,7 @@ $.ui.plugin.add("resizable", "grid", {
|
||||
that.size.width = newWidth;
|
||||
that.position.left = op.left - ox;
|
||||
} else {
|
||||
newWidth = gridY - outerDimensions.height;
|
||||
newWidth = gridX - outerDimensions.width;
|
||||
that.size.width = newWidth;
|
||||
that.position.left = op.left + os.width - newWidth;
|
||||
}
|
||||
|
||||
6
js/jquery/src/jquery-ui/selectable.js
vendored
6
js/jquery/src/jquery-ui/selectable.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Selectable 1.11.2
|
||||
* jQuery UI Selectable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget("ui.selectable", $.ui.mouse, {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
options: {
|
||||
appendTo: "body",
|
||||
autoRefresh: true,
|
||||
|
||||
13
js/jquery/src/jquery-ui/selectmenu.js
vendored
13
js/jquery/src/jquery-ui/selectmenu.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Selectmenu 1.11.2
|
||||
* jQuery UI Selectmenu 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -27,7 +27,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget( "ui.selectmenu", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
defaultElement: "<select>",
|
||||
options: {
|
||||
appendTo: null,
|
||||
@ -67,8 +67,7 @@ return $.widget( "ui.selectmenu", {
|
||||
},
|
||||
|
||||
_drawButton: function() {
|
||||
var that = this,
|
||||
tabindex = this.element.attr( "tabindex" );
|
||||
var that = this;
|
||||
|
||||
// Associate existing label with the new button
|
||||
this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button );
|
||||
@ -85,7 +84,7 @@ return $.widget( "ui.selectmenu", {
|
||||
// Create button
|
||||
this.button = $( "<span>", {
|
||||
"class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
|
||||
tabindex: tabindex || this.options.disabled ? -1 : 0,
|
||||
tabindex: this.options.disabled ? -1 : 0,
|
||||
id: this.ids.button,
|
||||
role: "combobox",
|
||||
"aria-expanded": "false",
|
||||
@ -595,7 +594,7 @@ return $.widget( "ui.selectmenu", {
|
||||
data.push({
|
||||
element: option,
|
||||
index: index,
|
||||
value: option.attr( "value" ),
|
||||
value: option.val(),
|
||||
label: option.text(),
|
||||
optgroup: optgroup.attr( "label" ) || "",
|
||||
disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
|
||||
|
||||
28
js/jquery/src/jquery-ui/slider.js
vendored
28
js/jquery/src/jquery-ui/slider.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Slider 1.11.2
|
||||
* jQuery UI Slider 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget( "ui.slider", $.ui.mouse, {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
widgetEventPrefix: "slide",
|
||||
|
||||
options: {
|
||||
@ -547,8 +547,26 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
||||
},
|
||||
|
||||
_calculateNewMax: function() {
|
||||
var remainder = ( this.options.max - this._valueMin() ) % this.options.step;
|
||||
this.max = this.options.max - remainder;
|
||||
var max = this.options.max,
|
||||
min = this._valueMin(),
|
||||
step = this.options.step,
|
||||
aboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step;
|
||||
max = aboveMin + min;
|
||||
this.max = parseFloat( max.toFixed( this._precision() ) );
|
||||
},
|
||||
|
||||
_precision: function() {
|
||||
var precision = this._precisionOf( this.options.step );
|
||||
if ( this.options.min !== null ) {
|
||||
precision = Math.max( precision, this._precisionOf( this.options.min ) );
|
||||
}
|
||||
return precision;
|
||||
},
|
||||
|
||||
_precisionOf: function( num ) {
|
||||
var str = num.toString(),
|
||||
decimal = str.indexOf( "." );
|
||||
return decimal === -1 ? 0 : str.length - decimal - 1;
|
||||
},
|
||||
|
||||
_valueMin: function() {
|
||||
|
||||
81
js/jquery/src/jquery-ui/sortable.js
vendored
81
js/jquery/src/jquery-ui/sortable.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Sortable 1.11.2
|
||||
* jQuery UI Sortable 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget("ui.sortable", $.ui.mouse, {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
widgetEventPrefix: "sort",
|
||||
ready: false,
|
||||
options: {
|
||||
@ -77,17 +77,12 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
|
||||
var o = this.options;
|
||||
this.containerCache = {};
|
||||
this.element.addClass("ui-sortable");
|
||||
|
||||
//Get the items
|
||||
this.refresh();
|
||||
|
||||
//Let's determine if the items are being displayed horizontally
|
||||
this.floating = this.items.length ? o.axis === "x" || this._isFloating(this.items[0].item) : false;
|
||||
|
||||
//Let's determine the parent's offset
|
||||
this.offset = this.element.offset();
|
||||
|
||||
@ -276,7 +271,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
}
|
||||
|
||||
//Prepare scrolling
|
||||
if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
|
||||
if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
|
||||
this.overflowOffset = this.scrollParent.offset();
|
||||
}
|
||||
|
||||
@ -328,7 +323,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
|
||||
//Do scrolling
|
||||
if(this.options.scroll) {
|
||||
if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
|
||||
if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
|
||||
|
||||
if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
|
||||
this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
|
||||
@ -344,16 +339,16 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
|
||||
} else {
|
||||
|
||||
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
|
||||
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
|
||||
} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
|
||||
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
|
||||
if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) {
|
||||
scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed);
|
||||
} else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) {
|
||||
scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed);
|
||||
}
|
||||
|
||||
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
|
||||
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
|
||||
} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
|
||||
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
|
||||
if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) {
|
||||
scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);
|
||||
} else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) {
|
||||
scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed);
|
||||
}
|
||||
|
||||
}
|
||||
@ -452,10 +447,10 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
animation = {};
|
||||
|
||||
if ( !axis || axis === "x" ) {
|
||||
animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
|
||||
animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft);
|
||||
}
|
||||
if ( !axis || axis === "y" ) {
|
||||
animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
|
||||
animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop);
|
||||
}
|
||||
this.reverting = true;
|
||||
$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
|
||||
@ -648,7 +643,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
|
||||
if(connectWith && connected) {
|
||||
for (i = connectWith.length - 1; i >= 0; i--){
|
||||
cur = $(connectWith[i]);
|
||||
cur = $(connectWith[i], this.document[0]);
|
||||
for ( j = cur.length - 1; j >= 0; j--){
|
||||
inst = $.data(cur[j], this.widgetFullName);
|
||||
if(inst && inst !== this && !inst.options.disabled) {
|
||||
@ -698,7 +693,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
|
||||
if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
|
||||
for (i = connectWith.length - 1; i >= 0; i--){
|
||||
cur = $(connectWith[i]);
|
||||
cur = $(connectWith[i], this.document[0]);
|
||||
for (j = cur.length - 1; j >= 0; j--){
|
||||
inst = $.data(cur[j], this.widgetFullName);
|
||||
if(inst && inst !== this && !inst.options.disabled) {
|
||||
@ -731,6 +726,11 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
|
||||
refreshPositions: function(fast) {
|
||||
|
||||
// Determine whether items are being displayed horizontally
|
||||
this.floating = this.items.length ?
|
||||
this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
|
||||
false;
|
||||
|
||||
//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
|
||||
if(this.offsetParent && this.helper) {
|
||||
this.offset.parent = this._getParentOffset();
|
||||
@ -788,12 +788,13 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
.addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
|
||||
.removeClass("ui-sortable-helper");
|
||||
|
||||
if ( nodeName === "tr" ) {
|
||||
that.currentItem.children().each(function() {
|
||||
$( "<td> </td>", that.document[0] )
|
||||
.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
|
||||
.appendTo( element );
|
||||
});
|
||||
if ( nodeName === "tbody" ) {
|
||||
that._createTrPlaceholder(
|
||||
that.currentItem.find( "tr" ).eq( 0 ),
|
||||
$( "<tr>", that.document[ 0 ] ).appendTo( element )
|
||||
);
|
||||
} else if ( nodeName === "tr" ) {
|
||||
that._createTrPlaceholder( that.currentItem, element );
|
||||
} else if ( nodeName === "img" ) {
|
||||
element.attr( "src", that.currentItem.attr( "src" ) );
|
||||
}
|
||||
@ -830,6 +831,16 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
|
||||
},
|
||||
|
||||
_createTrPlaceholder: function( sourceTr, targetTr ) {
|
||||
var that = this;
|
||||
|
||||
sourceTr.children().each(function() {
|
||||
$( "<td> </td>", that.document[ 0 ] )
|
||||
.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
|
||||
.appendTo( targetTr );
|
||||
});
|
||||
},
|
||||
|
||||
_contactContainers: function(event) {
|
||||
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,
|
||||
innermostContainer = null,
|
||||
@ -990,14 +1001,14 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
||||
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
||||
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
||||
if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
|
||||
if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) {
|
||||
po.left += this.scrollParent.scrollLeft();
|
||||
po.top += this.scrollParent.scrollTop();
|
||||
}
|
||||
|
||||
// This needs to be actually done for all browsers, since pageX/pageY includes this information
|
||||
// with an ugly IE fix
|
||||
if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
|
||||
if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
|
||||
po = { top: 0, left: 0 };
|
||||
}
|
||||
|
||||
@ -1047,8 +1058,8 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
this.containment = [
|
||||
0 - this.offset.relative.left - this.offset.parent.left,
|
||||
0 - this.offset.relative.top - this.offset.parent.top,
|
||||
$(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
|
||||
($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
|
||||
o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left,
|
||||
(o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
|
||||
];
|
||||
}
|
||||
|
||||
@ -1073,7 +1084,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
pos = this.position;
|
||||
}
|
||||
var mod = d === "absolute" ? 1 : -1,
|
||||
scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
|
||||
scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
|
||||
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
||||
|
||||
return {
|
||||
@ -1099,13 +1110,13 @@ return $.widget("ui.sortable", $.ui.mouse, {
|
||||
o = this.options,
|
||||
pageX = event.pageX,
|
||||
pageY = event.pageY,
|
||||
scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
||||
scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
||||
|
||||
// This is another very weird special case that only happens for relative elements:
|
||||
// 1. If the css position is relative
|
||||
// 2. and the scroll parent is the document or similar to the offset parent
|
||||
// we have to refresh the relative offset during the scroll so there are no jumps
|
||||
if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
|
||||
if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) {
|
||||
this.offset.relative = this._getRelativeOffset();
|
||||
}
|
||||
|
||||
|
||||
6
js/jquery/src/jquery-ui/spinner.js
vendored
6
js/jquery/src/jquery-ui/spinner.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Spinner 1.11.2
|
||||
* jQuery UI Spinner 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -37,7 +37,7 @@ function spinner_modifier( fn ) {
|
||||
}
|
||||
|
||||
return $.widget( "ui.spinner", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
defaultElement: "<input>",
|
||||
widgetEventPrefix: "spin",
|
||||
options: {
|
||||
|
||||
40
js/jquery/src/jquery-ui/tabs.js
vendored
40
js/jquery/src/jquery-ui/tabs.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Tabs 1.11.2
|
||||
* jQuery UI Tabs 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -25,7 +25,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget( "ui.tabs", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
delay: 300,
|
||||
options: {
|
||||
active: null,
|
||||
@ -201,8 +201,9 @@ return $.widget( "ui.tabs", {
|
||||
clearTimeout( this.activating );
|
||||
selectedIndex = this._focusNextTab( selectedIndex, goingForward );
|
||||
|
||||
// Navigating with control key will prevent automatic activation
|
||||
if ( !event.ctrlKey ) {
|
||||
// Navigating with control/command key will prevent automatic activation
|
||||
if ( !event.ctrlKey && !event.metaKey ) {
|
||||
|
||||
// Update aria-selected immediately so that AT think the tab is already selected.
|
||||
// Otherwise AT may confuse the user by stating that they need to activate the tab,
|
||||
// but the tab will already be activated by the time the announcement finishes.
|
||||
@ -816,6 +817,18 @@ return $.widget( "ui.tabs", {
|
||||
eventData = {
|
||||
tab: tab,
|
||||
panel: panel
|
||||
},
|
||||
complete = function( jqXHR, status ) {
|
||||
if ( status === "abort" ) {
|
||||
that.panels.stop( false, true );
|
||||
}
|
||||
|
||||
tab.removeClass( "ui-tabs-loading" );
|
||||
panel.removeAttr( "aria-busy" );
|
||||
|
||||
if ( jqXHR === that.xhr ) {
|
||||
delete that.xhr;
|
||||
}
|
||||
};
|
||||
|
||||
// not remote
|
||||
@ -833,28 +846,21 @@ return $.widget( "ui.tabs", {
|
||||
panel.attr( "aria-busy", "true" );
|
||||
|
||||
this.xhr
|
||||
.success(function( response ) {
|
||||
.done(function( response, status, jqXHR ) {
|
||||
// support: jQuery <1.8
|
||||
// http://bugs.jquery.com/ticket/11778
|
||||
setTimeout(function() {
|
||||
panel.html( response );
|
||||
that._trigger( "load", event, eventData );
|
||||
|
||||
complete( jqXHR, status );
|
||||
}, 1 );
|
||||
})
|
||||
.complete(function( jqXHR, status ) {
|
||||
.fail(function( jqXHR, status ) {
|
||||
// support: jQuery <1.8
|
||||
// http://bugs.jquery.com/ticket/11778
|
||||
setTimeout(function() {
|
||||
if ( status === "abort" ) {
|
||||
that.panels.stop( false, true );
|
||||
}
|
||||
|
||||
tab.removeClass( "ui-tabs-loading" );
|
||||
panel.removeAttr( "aria-busy" );
|
||||
|
||||
if ( jqXHR === that.xhr ) {
|
||||
delete that.xhr;
|
||||
}
|
||||
complete( jqXHR, status );
|
||||
}, 1 );
|
||||
});
|
||||
}
|
||||
|
||||
32
js/jquery/src/jquery-ui/tooltip.js
vendored
32
js/jquery/src/jquery-ui/tooltip.js
vendored
@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* jQuery UI Tooltip 1.11.2
|
||||
* jQuery UI Tooltip 1.11.4
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright 2014 jQuery Foundation and other contributors
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
}(function( $ ) {
|
||||
|
||||
return $.widget( "ui.tooltip", {
|
||||
version: "1.11.2",
|
||||
version: "1.11.4",
|
||||
options: {
|
||||
content: function() {
|
||||
// support: IE<9, Opera in jQuery <1.7
|
||||
@ -194,6 +194,7 @@ return $.widget( "ui.tooltip", {
|
||||
});
|
||||
}
|
||||
|
||||
this._registerCloseHandlers( event, target );
|
||||
this._updateContent( target, event );
|
||||
},
|
||||
|
||||
@ -208,13 +209,16 @@ return $.widget( "ui.tooltip", {
|
||||
}
|
||||
|
||||
content = contentOption.call( target[0], function( response ) {
|
||||
// ignore async response if tooltip was closed already
|
||||
if ( !target.data( "ui-tooltip-open" ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// IE may instantly serve a cached response for ajax requests
|
||||
// delay this call to _open so the other call to _open runs first
|
||||
that._delay(function() {
|
||||
|
||||
// Ignore async response if tooltip was closed already
|
||||
if ( !target.data( "ui-tooltip-open" ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// jQuery creates a special event for focusin when it doesn't
|
||||
// exist natively. To improve performance, the native event
|
||||
// object is reused and the type is changed. Therefore, we can't
|
||||
@ -232,7 +236,7 @@ return $.widget( "ui.tooltip", {
|
||||
},
|
||||
|
||||
_open: function( event, target, content ) {
|
||||
var tooltipData, tooltip, events, delayedShow, a11yContent,
|
||||
var tooltipData, tooltip, delayedShow, a11yContent,
|
||||
positionOption = $.extend( {}, this.options.position );
|
||||
|
||||
if ( !content ) {
|
||||
@ -314,8 +318,10 @@ return $.widget( "ui.tooltip", {
|
||||
}
|
||||
|
||||
this._trigger( "open", event, { tooltip: tooltip } );
|
||||
},
|
||||
|
||||
events = {
|
||||
_registerCloseHandlers: function( event, target ) {
|
||||
var events = {
|
||||
keyup: function( event ) {
|
||||
if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
|
||||
var fakeEvent = $.Event(event);
|
||||
@ -329,7 +335,7 @@ return $.widget( "ui.tooltip", {
|
||||
// tooltips will handle this in destroy.
|
||||
if ( target[ 0 ] !== this.element[ 0 ] ) {
|
||||
events.remove = function() {
|
||||
this._removeTooltip( tooltip );
|
||||
this._removeTooltip( this._find( target ).tooltip );
|
||||
};
|
||||
}
|
||||
|
||||
@ -350,6 +356,12 @@ return $.widget( "ui.tooltip", {
|
||||
|
||||
// The tooltip may already be closed
|
||||
if ( !tooltipData ) {
|
||||
|
||||
// We set ui-tooltip-open immediately upon open (in open()), but only set the
|
||||
// additional data once there's actually content to show (in _open()). So even if the
|
||||
// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
|
||||
// the period between open() and _open().
|
||||
target.removeData( "ui-tooltip-open" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user