You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-28 07:41:55 +03:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -85,6 +85,9 @@ class Advisor
|
||||
|
||||
/**
|
||||
* Escapes percent string to be used in format string.
|
||||
*
|
||||
* @param string $str
|
||||
* @return string
|
||||
*/
|
||||
function escapePercent($str)
|
||||
{
|
||||
@@ -93,6 +96,10 @@ class Advisor
|
||||
|
||||
/**
|
||||
* Wrapper function for translating.
|
||||
*
|
||||
* @param string $str
|
||||
* @param mixed $param
|
||||
* @return string
|
||||
*/
|
||||
function translate($str, $param = null)
|
||||
{
|
||||
@@ -109,6 +116,9 @@ class Advisor
|
||||
|
||||
/**
|
||||
* Splits justification to text and formula.
|
||||
*
|
||||
* @param string $rule
|
||||
* @return array
|
||||
*/
|
||||
function splitJustification($rule)
|
||||
{
|
||||
|
||||
@@ -334,6 +334,7 @@ class PMA_Config
|
||||
* should be called on object creation
|
||||
*
|
||||
* @param string $source config file
|
||||
* @return bool
|
||||
*/
|
||||
function load($source = null)
|
||||
{
|
||||
@@ -698,6 +699,8 @@ class PMA_Config
|
||||
* $cfg['PmaAbsoluteUri'] is a required directive else cookies won't be
|
||||
* set properly and, depending on browsers, inserting or updating a
|
||||
* record might fail
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function checkPmaAbsoluteUri()
|
||||
{
|
||||
@@ -937,7 +940,7 @@ class PMA_Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @static
|
||||
* @return bool
|
||||
*/
|
||||
public function isHttps()
|
||||
{
|
||||
@@ -964,6 +967,8 @@ class PMA_Config
|
||||
*
|
||||
* Please note that this just detects what we see, so
|
||||
* it completely ignores things like reverse proxies.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function detectHttps()
|
||||
{
|
||||
@@ -1012,7 +1017,7 @@ class PMA_Config
|
||||
}
|
||||
|
||||
/**
|
||||
* @static
|
||||
* @return string
|
||||
*/
|
||||
public function getCookiePath()
|
||||
{
|
||||
|
||||
@@ -127,6 +127,7 @@ class PMA_Error_Handler
|
||||
*
|
||||
* @todo finish!
|
||||
* @param PMA_Error $error
|
||||
* @return bool
|
||||
*/
|
||||
protected function _logError($error)
|
||||
{
|
||||
|
||||
@@ -189,6 +189,7 @@ class PMA_File
|
||||
|
||||
/**
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function isUploaded()
|
||||
{
|
||||
@@ -591,7 +592,7 @@ class PMA_File
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function open()
|
||||
{
|
||||
@@ -688,6 +689,8 @@ class PMA_File
|
||||
* http://bugs.php.net/bug.php?id=29532
|
||||
* bzip reads a maximum of 8192 bytes on windows systems
|
||||
* @todo this function is unused
|
||||
* @param int $max_size
|
||||
* @return bool|string
|
||||
*/
|
||||
function getNextChunk($max_size = null)
|
||||
{
|
||||
|
||||
@@ -90,6 +90,7 @@ require_once './libraries/List.class.php';
|
||||
*
|
||||
* @todo we could also search mysql tables if all fail?
|
||||
* @param string $like_db_name usally a db_name containing wildcards
|
||||
* @return array
|
||||
*/
|
||||
protected function _retrieve($like_db_name = null)
|
||||
{
|
||||
|
||||
@@ -44,6 +44,9 @@ class PMA
|
||||
* magic access to protected/inaccessible members/properties
|
||||
*
|
||||
* @see http://php.net/language.oop5.overloading
|
||||
*
|
||||
* @param string $param
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($param)
|
||||
{
|
||||
@@ -66,6 +69,9 @@ class PMA
|
||||
* magic access to protected/inaccessible members/properties
|
||||
*
|
||||
* @see http://php.net/language.oop5.overloading
|
||||
*
|
||||
* @param string $param
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function __set($param, $value)
|
||||
{
|
||||
|
||||
@@ -130,6 +130,7 @@ class PMA_Theme
|
||||
* checks image path for existance - if not found use img from original theme
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function checkImgPath()
|
||||
{
|
||||
@@ -282,6 +283,7 @@ class PMA_Theme
|
||||
*
|
||||
* @access public
|
||||
* @param string $type left, right or print
|
||||
* @return bool
|
||||
*/
|
||||
function loadCss(&$type)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ class PMA_Theme_Manager
|
||||
var $active_theme = '';
|
||||
|
||||
/**
|
||||
* @var object PMA_Theme active theme
|
||||
* @var PMA_Theme PMA_Theme active theme
|
||||
*/
|
||||
var $theme = null;
|
||||
|
||||
@@ -193,6 +193,7 @@ class PMA_Theme_Manager
|
||||
/**
|
||||
* save theme in cookie
|
||||
*
|
||||
* @return bool true
|
||||
*/
|
||||
function setThemeCookie()
|
||||
{
|
||||
@@ -224,6 +225,8 @@ class PMA_Theme_Manager
|
||||
|
||||
/**
|
||||
* read all themes
|
||||
*
|
||||
* @return bool true
|
||||
*/
|
||||
function loadThemes()
|
||||
{
|
||||
@@ -259,6 +262,7 @@ class PMA_Theme_Manager
|
||||
* checks if given theme name is a known theme
|
||||
*
|
||||
* @param string $theme name fo theme to check for
|
||||
* @return bool
|
||||
*/
|
||||
function checkTheme($theme)
|
||||
{
|
||||
@@ -273,6 +277,7 @@ class PMA_Theme_Manager
|
||||
* returns HTML selectbox, with or without form enclosed
|
||||
*
|
||||
* @param boolean $form whether enclosed by from tags or not
|
||||
* @return string
|
||||
*/
|
||||
function getHtmlSelectBox($form = true)
|
||||
{
|
||||
@@ -351,6 +356,9 @@ class PMA_Theme_Manager
|
||||
|
||||
/**
|
||||
* prints css data
|
||||
*
|
||||
* @param string $type
|
||||
* @return bool
|
||||
*/
|
||||
function printCss($type)
|
||||
{
|
||||
|
||||
@@ -80,6 +80,7 @@ if (function_exists('mcrypt_encrypt')) {
|
||||
* Returns blowfish secret or generates one if needed.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function PMA_get_blowfish_secret()
|
||||
{
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
* @package BLOBStreaming
|
||||
*/
|
||||
|
||||
/**
|
||||
* Initializes PBMS database
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function initPBMSDatabase()
|
||||
{
|
||||
$query = "create database IF NOT EXISTS pbms;"; // If no other choice then try this.
|
||||
@@ -379,6 +384,11 @@ function PMA_BS_CreateReferenceLink($bs_reference, $db_name)
|
||||
* BLOB streaming on a per table or database basis. So in anticipation of this
|
||||
* PMA_BS_IsTablePBMSEnabled() passes in the table and database name even though
|
||||
* they are not currently needed.
|
||||
*
|
||||
* @param string $db_name
|
||||
* @param string $tbl_name
|
||||
* @param string $tbl_type
|
||||
* @return bool
|
||||
*/
|
||||
function PMA_BS_IsTablePBMSEnabled($db_name, $tbl_name, $tbl_type)
|
||||
{
|
||||
|
||||
@@ -321,6 +321,7 @@ class Horde_Cipher_blowfish
|
||||
* Set the key to be used for en/decryption.
|
||||
*
|
||||
* @param string $key The key to use.
|
||||
* @return bool
|
||||
*/
|
||||
public function setKey($key)
|
||||
{
|
||||
|
||||
@@ -2953,10 +2953,9 @@ function PMA_expandUserString($string, $escape = null, $updates = array())
|
||||
* function that generates a json output for an ajax request and ends script
|
||||
* execution
|
||||
*
|
||||
* @param bool $message message string containing the html of the message
|
||||
* @param bool $success success whether the ajax request was successfull
|
||||
* @param array $extra_data extra_data optional - any other data as part of the json request
|
||||
*
|
||||
* @param PMA_Message|string $message message string containing the html of the message
|
||||
* @param bool $success success whether the ajax request was successfull
|
||||
* @param array $extra_data extra_data optional - any other data as part of the json request
|
||||
*/
|
||||
function PMA_ajaxResponse($message, $success = true, $extra_data = array())
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ define('PMA_DBI_GETVAR_GLOBAL', 2);
|
||||
* Checks one of the mysql extensions
|
||||
*
|
||||
* @param string $extension mysql extension to check
|
||||
* @return bool
|
||||
*/
|
||||
function PMA_DBI_checkMysqlExtension($extension = 'mysql')
|
||||
{
|
||||
|
||||
@@ -65,10 +65,10 @@ function PMA_TableHeader($db_is_information_schema = false, $replication = false
|
||||
/**
|
||||
* Creates a clickable column header for table information
|
||||
*
|
||||
* @param string title to use for the link
|
||||
* @param string corresponds to sortable data name mapped in libraries/db_info.inc.php
|
||||
* @param string initial sort order
|
||||
* @returns string link to be displayed in the table header
|
||||
* @param string $title title to use for the link
|
||||
* @param string $sort corresponds to sortable data name mapped in libraries/db_info.inc.php
|
||||
* @param string $initial_sort_order
|
||||
* @return string link to be displayed in the table header
|
||||
*/
|
||||
function PMA_SortableTableHeader($title, $sort, $initial_sort_order = 'ASC')
|
||||
{
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
/**
|
||||
* Returns array of filtered file names
|
||||
*
|
||||
* @param string directory to list
|
||||
* @param string regular expression to match files
|
||||
* @returns array sorted file list on success, false on failure
|
||||
* @param string $dir directory to list
|
||||
* @param string $expression regular expression to match files
|
||||
* @return array sorted file list on success, false on failure
|
||||
*/
|
||||
function PMA_getDirContent($dir, $expression = '')
|
||||
{
|
||||
@@ -39,10 +39,10 @@ function PMA_getDirContent($dir, $expression = '')
|
||||
/**
|
||||
* Returns options of filtered file names
|
||||
*
|
||||
* @param string directory to list
|
||||
* @param string regullar expression to match files
|
||||
* @param string currently active choice
|
||||
* @returns array sorted file list on success, false on failure
|
||||
* @param string $dir directory to list
|
||||
* @param string $extensions regullar expression to match files
|
||||
* @param string $active currently active choice
|
||||
* @return array sorted file list on success, false on failure
|
||||
*/
|
||||
function PMA_getFileSelectOptions($dir, $extensions = '', $active = '')
|
||||
{
|
||||
@@ -64,7 +64,7 @@ function PMA_getFileSelectOptions($dir, $extensions = '', $active = '')
|
||||
/**
|
||||
* Get currently supported decompressions.
|
||||
*
|
||||
* @returns string | separated list of extensions usable in PMA_getDirContent
|
||||
* @return string | separated list of extensions usable in PMA_getDirContent
|
||||
*/
|
||||
function PMA_supportedDecompressions()
|
||||
{
|
||||
|
||||
@@ -16,8 +16,9 @@ if (! defined('PHPMYADMIN')) {
|
||||
* copy values from one array to another, usually from a superglobal into $GLOBALS
|
||||
*
|
||||
* @param array $array values from
|
||||
* @param array $target values to
|
||||
* @param boolean $sanitize prevent importing key names in $_import_blacklist
|
||||
* @param array &$target values to
|
||||
* @param bool $sanitize prevent importing key names in $_import_blacklist
|
||||
* @return bool
|
||||
*/
|
||||
function PMA_recursive_extract($array, &$target, $sanitize = true)
|
||||
{
|
||||
|
||||
@@ -15,6 +15,9 @@ $ID_KEY = 'APC_UPLOAD_PROGRESS';
|
||||
* Returns upload status.
|
||||
*
|
||||
* This is implementation for APC extension.
|
||||
*
|
||||
* @param string $id
|
||||
* @return array|null
|
||||
*/
|
||||
function PMA_getUploadStatus($id)
|
||||
{
|
||||
@@ -22,7 +25,7 @@ function PMA_getUploadStatus($id)
|
||||
global $ID_KEY;
|
||||
|
||||
if (trim($id) == "") {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
if (! array_key_exists($id, $_SESSION[$SESSION_KEY])) {
|
||||
$_SESSION[$SESSION_KEY][$id] = array(
|
||||
|
||||
@@ -15,6 +15,9 @@ $ID_KEY = 'noplugin';
|
||||
* Returns upload status.
|
||||
*
|
||||
* This is implementation when no webserver support exists, so it returns just zeroes.
|
||||
*
|
||||
* @param string $id
|
||||
* @return array|null
|
||||
*/
|
||||
function PMA_getUploadStatus($id)
|
||||
{
|
||||
@@ -22,7 +25,7 @@ function PMA_getUploadStatus($id)
|
||||
global $ID_KEY;
|
||||
|
||||
if (trim($id) == "") {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
if (! array_key_exists($id, $_SESSION[$SESSION_KEY])) {
|
||||
$_SESSION[$SESSION_KEY][$id] = array(
|
||||
|
||||
@@ -14,6 +14,9 @@ $ID_KEY = "UPLOAD_IDENTIFIER";
|
||||
* Returns upload status.
|
||||
*
|
||||
* This is implementation for uploadprogress extension.
|
||||
*
|
||||
* @param string $id
|
||||
* @return array|null
|
||||
*/
|
||||
function PMA_getUploadStatus($id)
|
||||
{
|
||||
@@ -21,7 +24,7 @@ function PMA_getUploadStatus($id)
|
||||
global $ID_KEY;
|
||||
|
||||
if (trim($id) == "") {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
if (! array_key_exists($id, $_SESSION[$SESSION_KEY])) {
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
/**
|
||||
* Tries to detect MIME type of content.
|
||||
*
|
||||
* @param string &$test
|
||||
* @return string
|
||||
*/
|
||||
function PMA_detectMIME(&$test)
|
||||
{
|
||||
|
||||
@@ -144,7 +144,7 @@ class PMA_Schema_PDF extends PMA_PDF
|
||||
/**
|
||||
* Sets the scaled line width
|
||||
*
|
||||
* @param float width The line width
|
||||
* @param float $width The line width
|
||||
* @access public
|
||||
* @see TCPDF::SetLineWidth()
|
||||
*/
|
||||
@@ -224,6 +224,10 @@ class PMA_Schema_PDF extends PMA_PDF
|
||||
|
||||
/**
|
||||
* Compute number of lines used by a multicell of width w
|
||||
*
|
||||
* @param int $w
|
||||
* @param string $txt
|
||||
* @return int
|
||||
*/
|
||||
function NbLines($w, $txt)
|
||||
{
|
||||
@@ -386,7 +390,7 @@ class Table_Stats
|
||||
* Returns title of the current table,
|
||||
* title can have the dimensions of the table
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
private function _getTitle()
|
||||
{
|
||||
@@ -401,7 +405,7 @@ class Table_Stats
|
||||
* @access private
|
||||
* @see PMA_Schema_PDF
|
||||
*/
|
||||
function _setWidth($fontSize)
|
||||
private function _setWidth($fontSize)
|
||||
{
|
||||
global $pdf;
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@ class Table_Stats
|
||||
* @access private
|
||||
* @see PMA_SVG
|
||||
*/
|
||||
function _setWidthTable($font,$fontSize)
|
||||
private function _setWidthTable($font,$fontSize)
|
||||
{
|
||||
global $svg;
|
||||
|
||||
|
||||
@@ -280,13 +280,12 @@ class Table_Stats
|
||||
/**
|
||||
* Sets the width of the table
|
||||
*
|
||||
* @param string font The font name
|
||||
* @param integer fontSize The font size
|
||||
* @param string $font font name
|
||||
* @param integer $fontSize font size
|
||||
* @global object The current Visio XML document
|
||||
* @access private
|
||||
* @see PMA_VISIO
|
||||
*/
|
||||
function _setWidthTable($font,$fontSize)
|
||||
private function _setWidthTable($font,$fontSize)
|
||||
{
|
||||
global $visio;
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ if (! defined('PHPMYADMIN')) {
|
||||
|
||||
/**
|
||||
* Returns language name
|
||||
*
|
||||
* @param string $tmplang
|
||||
* @return string
|
||||
*/
|
||||
function PMA_langName($tmplang)
|
||||
{
|
||||
@@ -182,6 +185,8 @@ function PMA_langDetect($str, $envType)
|
||||
* traditional) must be detected before 'zh' (chinese simplified) for
|
||||
* example.
|
||||
*
|
||||
* @param string $lang
|
||||
* @return array
|
||||
*/
|
||||
function PMA_langDetails($lang)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
* @package phpMyAdmin
|
||||
*/
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function getSysInfo()
|
||||
{
|
||||
$supported = array('Linux','WINNT');
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
* This function returns username and password.
|
||||
*
|
||||
* It can optionally use configured username as parameter.
|
||||
*
|
||||
* @param string $user
|
||||
* @return array
|
||||
*/
|
||||
function get_login_credentials($user)
|
||||
{
|
||||
|
||||
@@ -59,6 +59,8 @@ class PMA_expandUserString_test extends PHPUnit_Extensions_OutputTestCase
|
||||
|
||||
/**
|
||||
* Data provider
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provider()
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ class PMA_extractFieldSpec_test extends PHPUnit_Extensions_OutputTestCase
|
||||
|
||||
/**
|
||||
* Data provider
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provider()
|
||||
{
|
||||
|
||||
@@ -17,6 +17,8 @@ class PMA_foreignKeySupported_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* data provider for foreign key supported test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function foreignkeySupportedDataProvider() {
|
||||
return array(
|
||||
|
||||
@@ -47,8 +47,9 @@ class PMA_formatNumberByteDown_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* format number data provider
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function formatNumberDataProvider() {
|
||||
return array(
|
||||
array(10, 2, 2, '10 '),
|
||||
@@ -72,6 +73,8 @@ class PMA_formatNumberByteDown_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* format byte down data provider
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function formatByteDownDataProvider() {
|
||||
return array(
|
||||
|
||||
@@ -54,6 +54,8 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for localised date test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function localisedDateDataProvider() {
|
||||
return array(
|
||||
@@ -72,8 +74,9 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for localised timestamp test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function timespanFormatDataProvider() {
|
||||
return array(
|
||||
array(1258, '0 days, 0 hours, 20 minutes and 58 seconds'),
|
||||
|
||||
@@ -18,8 +18,9 @@ class PMA_printableBitValue_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for printable bit value test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function printableBitValueDataProvider() {
|
||||
return array(
|
||||
array('testtest', 64, '0111010001100101011100110111010001110100011001010111001101110100'),
|
||||
|
||||
@@ -35,6 +35,8 @@ class PMA_quoting_slashing_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for unQuote test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function unQuoteProvider() {
|
||||
return array(
|
||||
@@ -55,6 +57,8 @@ class PMA_quoting_slashing_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for unQuote test with chosen quote
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function unQuoteSelectedProvider() {
|
||||
return array(
|
||||
@@ -75,6 +79,8 @@ class PMA_quoting_slashing_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for backquote test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function backquoteDataProvider() {
|
||||
return array(
|
||||
|
||||
@@ -41,8 +41,9 @@ class PMA_stringOperations_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for flipstring test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function flipStringDataProvider() {
|
||||
return array(
|
||||
array('test', "t<br />\ne<br />\ns<br />\nt"),
|
||||
@@ -61,8 +62,9 @@ class PMA_stringOperations_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for userDir test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function userDirDataProvider() {
|
||||
return array(
|
||||
array('/var/pma_tmp/%u/', "/var/pma_tmp/root/"),
|
||||
@@ -83,8 +85,9 @@ class PMA_stringOperations_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for replace binary content test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function replaceBinaryContentsDataProvider() {
|
||||
return array(
|
||||
array("\x000", '\00'),
|
||||
@@ -104,8 +107,9 @@ class PMA_stringOperations_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* data provider for duplicate first newline test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function duplicateFirstNewlineDataProvider() {
|
||||
return array(
|
||||
array('test', 'test'),
|
||||
|
||||
Reference in New Issue
Block a user