Merge remote branch 'upstream/master'
This commit is contained in:
commit
e1cda73996
@ -49,6 +49,7 @@ VerboseMultiSubmit, ReplaceHelpImg
|
||||
- bug #3534979 [interface] Copy Database Ajax feedback vanishes long before copying is done
|
||||
- bug #3527531 [interface] GC-maxlifetime warning incorrectly displayed
|
||||
- bug #3526916 [interface] Search fails with JS error when tooltips disabled
|
||||
- bug #3544366 [interface] Event comments not saved
|
||||
|
||||
3.5.2.0 (2012-07-07)
|
||||
- bug #3521416 [interface] JS error when editing index
|
||||
|
||||
@ -24,6 +24,12 @@
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="phpunit-nocoverage" description="Run unit tests using PHPUnit and generates junit.xml">
|
||||
<exec executable="phpunit">
|
||||
<arg line="--configuration phpunit.xml.nocoverage"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="pdepend" description="Generate jdepend.xml and software metrics charts using PHP_Depend">
|
||||
<exec executable="pdepend">
|
||||
<arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
|
||||
|
||||
@ -317,14 +317,14 @@ class Advisor
|
||||
|
||||
// Actually evaluate the code
|
||||
ob_start();
|
||||
eval('$value = '.$expr.';');
|
||||
eval('$value = ' . $expr . ';');
|
||||
$err = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// Error handling
|
||||
if ($err) {
|
||||
throw new Exception(
|
||||
strip_tags($err) . '<br />Executed code: $value = ' . $expr . ';'
|
||||
strip_tags($err) . '<br />Executed code: $value = ' . htmlspecialchars($expr) . ';'
|
||||
);
|
||||
}
|
||||
return $value;
|
||||
@ -418,7 +418,7 @@ class Advisor
|
||||
}
|
||||
}
|
||||
|
||||
function PMA_bytime($num, $precision)
|
||||
function ADVISOR_bytime($num, $precision)
|
||||
{
|
||||
$per = '';
|
||||
if ($num >= 1) { // per second
|
||||
@ -443,4 +443,14 @@ function PMA_bytime($num, $precision)
|
||||
return "$num $per";
|
||||
}
|
||||
|
||||
function ADVISOR_timespanFormat($val)
|
||||
{
|
||||
return PMA_CommonFunctions::getInstance()->timespanFormat($val);
|
||||
}
|
||||
|
||||
function ADVISOR_formatByteDown($value, $limes = 6, $comma = 0)
|
||||
{
|
||||
return PMA_CommonFunctions::getInstance()->formatByteDown($value, $limes, $comma);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -9,12 +9,12 @@
|
||||
|
||||
/**
|
||||
* Misc functions used all over the scripts.
|
||||
*
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
class PMA_CommonFunctions
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* PMA_CommonFunctions instance
|
||||
*
|
||||
@ -23,8 +23,8 @@ class PMA_CommonFunctions
|
||||
* @var object
|
||||
*/
|
||||
private static $_instance;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new class instance
|
||||
*
|
||||
@ -33,8 +33,8 @@ class PMA_CommonFunctions
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the singleton PMA_CommonFunctions object
|
||||
*
|
||||
@ -47,7 +47,7 @@ class PMA_CommonFunctions
|
||||
}
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Detects which function to use for pow.
|
||||
@ -168,6 +168,10 @@ class PMA_CommonFunctions
|
||||
public function getImage($image, $alternate = '', $attributes = array())
|
||||
{
|
||||
static $sprites; // cached list of available sprites (if any)
|
||||
if (defined('TESTSUITE')) {
|
||||
// prevent caching in testsuite
|
||||
unset($sprites);
|
||||
}
|
||||
|
||||
$url = '';
|
||||
$is_sprite = false;
|
||||
@ -1306,10 +1310,10 @@ class PMA_CommonFunctions
|
||||
$php_link = ' [' . $this->linkOrButton($php_link, $_message) . ']';
|
||||
|
||||
if (isset($GLOBALS['show_as_php'])) {
|
||||
|
||||
|
||||
$runquery_link = 'import.php'
|
||||
. PMA_generate_common_url($url_params);
|
||||
|
||||
|
||||
$php_link .= ' ['
|
||||
. $this->linkOrButton($runquery_link, __('Submit Query'))
|
||||
. ']';
|
||||
@ -2172,7 +2176,7 @@ class PMA_CommonFunctions
|
||||
* would have to check if the error message file is always available
|
||||
*
|
||||
* @param array $params The names of the parameters needed by the calling script
|
||||
* @param bool $request Whether to include this list in checking for
|
||||
* @param bool $request Whether to include this list in checking for
|
||||
* special params
|
||||
*
|
||||
* @return void
|
||||
@ -2348,19 +2352,19 @@ class PMA_CommonFunctions
|
||||
} else {
|
||||
$con_val = '= \''
|
||||
. $this->sqlAddSlashes($row[$i], false, true) . '\'';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($con_val != null) {
|
||||
|
||||
$condition .= $con_val . ' AND';
|
||||
|
||||
if ($meta->primary_key > 0) {
|
||||
if ($meta->primary_key > 0) {
|
||||
$primary_key .= $condition;
|
||||
$primary_key_array[$con_key] = $con_val;
|
||||
} elseif ($meta->unique_key > 0) {
|
||||
$primary_key_array[$con_key] = $con_val;
|
||||
} elseif ($meta->unique_key > 0) {
|
||||
$unique_key .= $condition;
|
||||
$unique_key_array[$con_key] = $con_val;
|
||||
$unique_key_array[$con_key] = $con_val;
|
||||
}
|
||||
|
||||
$nonprimary_condition .= $condition;
|
||||
@ -2373,18 +2377,18 @@ class PMA_CommonFunctions
|
||||
// but use conjunction of all values if no primary key
|
||||
$clause_is_unique = true;
|
||||
|
||||
if ($primary_key) {
|
||||
if ($primary_key) {
|
||||
$preferred_condition = $primary_key;
|
||||
$condition_array = $primary_key_array;
|
||||
|
||||
} elseif ($unique_key) {
|
||||
} elseif ($unique_key) {
|
||||
$preferred_condition = $unique_key;
|
||||
$condition_array = $unique_key_array;
|
||||
|
||||
} elseif (! $force_unique) {
|
||||
} elseif (! $force_unique) {
|
||||
$preferred_condition = $nonprimary_condition;
|
||||
$condition_array = $nonprimary_condition_array;
|
||||
$clause_is_unique = false;
|
||||
$clause_is_unique = false;
|
||||
}
|
||||
|
||||
$where_clause = trim(preg_replace('|\s?AND$|', '', $preferred_condition));
|
||||
@ -2636,7 +2640,7 @@ class PMA_CommonFunctions
|
||||
. PMA_generate_common_url($_url_params) . '" target="'
|
||||
. $frame . '">' . $caption1 . '</a>';
|
||||
|
||||
$_url_params['pos'] = $pos - $max_count;
|
||||
$_url_params['pos'] = $pos - $max_count;
|
||||
$list_navigator_html .= '<a' . $title2 . ' href="' . $script
|
||||
. PMA_generate_common_url($_url_params) . '" target="'
|
||||
. $frame . '">' . $caption2 . '</a>';
|
||||
@ -2758,8 +2762,8 @@ class PMA_CommonFunctions
|
||||
*/
|
||||
public function getExternalBug(
|
||||
$functionality, $component, $minimum_version, $bugref
|
||||
) {
|
||||
$ext_but_html = '';
|
||||
) {
|
||||
$ext_but_html = '';
|
||||
if (($component == 'mysql') && (PMA_MYSQL_INT_VERSION < $minimum_version)) {
|
||||
$ext_but_html .= $this->showHint(
|
||||
sprintf(
|
||||
@ -2768,7 +2772,7 @@ class PMA_CommonFunctions
|
||||
PMA_linkURL('http://bugs.mysql.com/') . $bugref
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
return $ext_but_html;
|
||||
}
|
||||
|
||||
@ -3447,7 +3451,7 @@ class PMA_CommonFunctions
|
||||
|
||||
/* Optional escaping */
|
||||
if (! is_null($escape)) {
|
||||
foreach ($replace as $key => $val) {
|
||||
foreach ($replace as $key => $val) {
|
||||
$replace[$key] = ($escape == 'backquote')
|
||||
? $this->$escape($val)
|
||||
: $escape($val);
|
||||
@ -4199,7 +4203,7 @@ class PMA_CommonFunctions
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -51,7 +51,7 @@ rule 'Uptime below one day'
|
||||
value < 86400
|
||||
Uptime is less than 1 day, performance tuning may not be accurate.
|
||||
To have more accurate averages it is recommended to let the server run for longer than a day before running this analyzer
|
||||
The uptime is only %s | PMA_timespanFormat(Uptime)
|
||||
The uptime is only %s | ADVISOR_timespanFormat(Uptime)
|
||||
|
||||
rule 'Questions below 1,000'
|
||||
Questions
|
||||
@ -72,7 +72,7 @@ rule 'Slow query rate' [Questions > 0]
|
||||
value * 60 * 60 > 1
|
||||
There is a high percentage of slow queries compared to the server uptime.
|
||||
You might want to increase {long_query_time} or optimize the queries listed in the slow query log
|
||||
You have a slow query rate of %s per hour, you should have less than 1% per hour. | PMA_bytime(value,2)
|
||||
You have a slow query rate of %s per hour, you should have less than 1% per hour. | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Long query time' [!PMA_DRIZZLE]
|
||||
long_query_time
|
||||
@ -137,7 +137,7 @@ rule 'MySQL Architecture'
|
||||
value > 3072*1024 && !preg_match('/64/',version_compile_machine) && !preg_match('/64/',version_compile_os)
|
||||
MySQL is not compiled as a 64-bit package.
|
||||
Your memory capacity is above 3 GiB (assuming the Server is on localhost), so MySQL might not be able to access all of your memory. You might want to consider installing the 64-bit version of MySQL.
|
||||
Available memory on this host: %s | implode(' ',PMA_formatByteDown(value*1024, 2, 2))
|
||||
Available memory on this host: %s | implode(' ',ADVISOR_formatByteDown(value*1024, 2, 2))
|
||||
|
||||
#
|
||||
# Query cache
|
||||
@ -190,7 +190,7 @@ rule 'Query cache max size' [!fired('Query cache disabled')]
|
||||
value > 1024 * 128
|
||||
The query cache size is above 128 MiB. Big query caches may cause significant overhead that is required to maintain the cache.
|
||||
Depending on your environment, it might be performance increasing to reduce this value.
|
||||
Current query cache size: %s | implode(' ',PMA_formatByteDown(value, 2, 2))
|
||||
Current query cache size: %s | implode(' ',ADVISOR_formatByteDown(value, 2, 2))
|
||||
|
||||
rule 'Query cache min result size' [!fired('Query cache disabled')]
|
||||
value == 1024*1024
|
||||
@ -213,14 +213,14 @@ rule 'Rate of sorts that cause temporary tables'
|
||||
value * 60 * 60 > 1
|
||||
Too many sorts are causing temporary tables.
|
||||
Consider increasing sort_buffer_size and/or read_rnd_buffer_size, depending on your system memory limits
|
||||
Temporary tables average: %s, this value should be less than 1 per hour. | PMA_bytime(value,2)
|
||||
Temporary tables average: %s, this value should be less than 1 per hour. | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Sort rows'
|
||||
Sort_rows / Uptime
|
||||
value * 60 >= 1
|
||||
There are lots of rows being sorted.
|
||||
While there is nothing wrong with a high amount of row sorting, you might want to make sure that the queries which require a lot of sorting use indexed columns in the ORDER BY clause, as this will result in much faster sorting
|
||||
Sorted rows average: %s | PMA_bytime(value,2)
|
||||
Sorted rows average: %s | ADVISOR_bytime(value,2)
|
||||
|
||||
# Joins, scans
|
||||
rule 'Rate of joins without indexes'
|
||||
@ -228,28 +228,28 @@ rule 'Rate of joins without indexes'
|
||||
value * 60 * 60 > 1
|
||||
There are too many joins without indexes.
|
||||
This means that joins are doing full table scans. Adding indexes for the columns being used in the join conditions will greatly speed up table joins
|
||||
Table joins average: %s, this value should be less than 1 per hour | PMA_bytime(value,2)
|
||||
Table joins average: %s, this value should be less than 1 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Rate of reading first index entry'
|
||||
Handler_read_first / Uptime
|
||||
value * 60 * 60 > 1
|
||||
The rate of reading the first index entry is high.
|
||||
This usually indicates frequent full index scans. Full index scans are faster than table scans but require lots of CPU cycles in big tables, if those tables that have or had high volumes of UPDATEs and DELETEs, running 'OPTIMIZE TABLE' might reduce the amount of and/or speed up full index scans. Other than that full index scans can only be reduced by rewriting queries.
|
||||
Index scans average: %s, this value should be less than 1 per hour | PMA_bytime(value,2)
|
||||
Index scans average: %s, this value should be less than 1 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Rate of reading fixed position'
|
||||
Handler_read_rnd / Uptime
|
||||
value * 60 * 60 > 1
|
||||
The rate of reading data from a fixed position is high.
|
||||
This indicates that many queries need to sort results and/or do a full table scan, including join queries that do not use indexes. Add indexes where applicable.
|
||||
Rate of reading fixed position average: %s, this value should be less than 1 per hour | PMA_bytime(value,2)
|
||||
Rate of reading fixed position average: %s, this value should be less than 1 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Rate of reading next table row'
|
||||
Handler_read_rnd_next / Uptime
|
||||
value * 60 * 60 > 1
|
||||
The rate of reading the next table row is high.
|
||||
This indicates that many queries are doing full table scans. Add indexes where applicable.
|
||||
Rate of reading next table row: %s, this value should be less than 1 per hour | PMA_bytime(value,2)
|
||||
Rate of reading next table row: %s, this value should be less than 1 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
# temp tables
|
||||
rule 'tmp_table_size vs. max_heap_table_size'
|
||||
@ -257,7 +257,7 @@ rule 'tmp_table_size vs. max_heap_table_size'
|
||||
value !=0
|
||||
tmp_table_size and max_heap_table_size are not the same.
|
||||
If you have deliberately changed one of either: The server uses the lower value of either to determine the maximum size of in-memory tables. So if you wish to increase the in-memory table limit you will have to increase the other value as well.
|
||||
Current values are tmp_table_size: %s, max_heap_table_size: %s | implode(' ',PMA_formatByteDown(tmp_table_size, 2, 2)), implode(' ',PMA_formatByteDown(max_heap_table_size, 2, 2))
|
||||
Current values are tmp_table_size: %s, max_heap_table_size: %s | implode(' ',ADVISOR_formatByteDown(tmp_table_size, 2, 2)), implode(' ',ADVISOR_formatByteDown(max_heap_table_size, 2, 2))
|
||||
|
||||
rule 'Percentage of temp tables on disk' [Created_tmp_tables + Created_tmp_disk_tables > 0]
|
||||
Created_tmp_disk_tables / (Created_tmp_tables + Created_tmp_disk_tables) * 100
|
||||
@ -271,7 +271,7 @@ rule 'Temp disk rate' [!fired('Percentage of temp tables on disk')]
|
||||
value * 60 * 60 > 1
|
||||
Many temporary tables are being written to disk instead of being kept in memory.
|
||||
Increasing {max_heap_table_size} and {tmp_table_size} might help. However some temporary tables are always being written to disk, independent of the value of these variables. To eliminate these you will have to rewrite your queries to avoid those conditions (Within a temporary table: Presence of a BLOB or TEXT column or presence of a column bigger than 512 bytes) as mentioned in the <a href="http://dev.mysql.com/doc/refman/5.5/en/internal-temporary-tables.html">MySQL Documentation</a>
|
||||
Rate of temporary tables being written to disk: %s, this value should be less than 1 per hour | PMA_bytime(value,2)
|
||||
Rate of temporary tables being written to disk: %s, this value should be less than 1 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
# I couldn't find any source on the internet that suggests a direct relation between high counts of temporary tables and any of these variables.
|
||||
# Several independent Blog entries suggest (http://ronaldbradford.com/blog/more-on-understanding-sort_buffer_size-2010-05-10/ and http://www.xaprb.com/blog/2010/05/09/how-to-tune-mysqls-sort_buffer_size/)
|
||||
@ -322,7 +322,7 @@ rule 'Rate of table open' [!PMA_DRIZZLE]
|
||||
value*60*60 > 10
|
||||
The rate of opening tables is high.
|
||||
Opening tables requires disk I/O which is costly. Increasing {table_open_cache} might avoid this.
|
||||
Opened table rate: %s, this value should be less than 10 per hour | PMA_bytime(value,2)
|
||||
Opened table rate: %s, this value should be less than 10 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Percentage of used open files limit' [!PMA_DRIZZLE]
|
||||
Open_files / open_files_limit * 100
|
||||
@ -336,7 +336,7 @@ rule 'Rate of open files' [!PMA_DRIZZLE]
|
||||
value * 60 * 60 > 5
|
||||
The rate of opening files is high.
|
||||
Consider increasing {open_files_limit}, and check the error log when restarting after changing open_files_limit.
|
||||
Opened files rate: %s, this value should be less than 5 per hour | PMA_bytime(value,2)
|
||||
Opened files rate: %s, this value should be less than 5 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Immediate table locks %' [Table_locks_waited + Table_locks_immediate > 0]
|
||||
Table_locks_immediate / (Table_locks_waited + Table_locks_immediate) * 100
|
||||
@ -350,7 +350,7 @@ rule 'Table lock wait rate'
|
||||
value * 60 * 60 > 1
|
||||
Too many table locks were not granted immediately.
|
||||
Optimize queries and/or use InnoDB to reduce lock wait.
|
||||
Table lock wait rate: %s, this value should be less than 1 per hour | PMA_bytime(value,2)
|
||||
Table lock wait rate: %s, this value should be less than 1 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Thread cache' [!PMA_DRIZZLE]
|
||||
thread_cache_size
|
||||
@ -401,7 +401,7 @@ rule 'Rate of aborted connections'
|
||||
value * 60 * 60 > 1
|
||||
Too many connections are aborted.
|
||||
Connections are usually aborted when they cannot be authorized. <a href="http://www.mysqlperformanceblog.com/2008/08/23/how-to-track-down-the-source-of-aborted_connects/">This article</a> might help you track down the source.
|
||||
Aborted connections rate is at %s, this value should be less than 1 per hour | PMA_bytime(value,2)
|
||||
Aborted connections rate is at %s, this value should be less than 1 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
rule 'Percentage of aborted clients'
|
||||
Aborted_clients / Connections * 100
|
||||
@ -415,7 +415,7 @@ rule 'Rate of aborted clients'
|
||||
value * 60 * 60 > 1
|
||||
Too many clients are aborted.
|
||||
Clients are usually aborted when they did not close their connection to MySQL properly. This can be due to network issues or code not closing a database handler properly. Check your network and code.
|
||||
Aborted client rate is at %s, this value should be less than 1 per hour | PMA_bytime(value,2)
|
||||
Aborted client rate is at %s, this value should be less than 1 per hour | ADVISOR_bytime(value,2)
|
||||
|
||||
#
|
||||
# InnoDB
|
||||
|
||||
@ -53,7 +53,7 @@ function PMA_Bookmark_getParams()
|
||||
function PMA_Bookmark_getList($db)
|
||||
{
|
||||
global $controllink;
|
||||
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$cfgBookmark = PMA_Bookmark_getParams();
|
||||
|
||||
@ -132,7 +132,7 @@ function PMA_Bookmark_get($db, $id, $id_field = 'id', $action_bookmark_all = fal
|
||||
$query .= ')';
|
||||
}
|
||||
|
||||
$query .= ' AND ' . PMA_CommonFunctions::getInstance()->backquote($id_field) . ' = ' . $id;
|
||||
$query .= ' AND ' . $common_functions->backquote($id_field) . ' = ' . $id;
|
||||
|
||||
return PMA_DBI_fetch_value($query, 0, 0, $controllink);
|
||||
} // end of the 'PMA_Bookmark_get()' function
|
||||
|
||||
@ -575,6 +575,11 @@ function PMA_EVN_getQueryFromRequest()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! empty($_REQUEST['item_comment'])) {
|
||||
$query .= "COMMENT '" . $common_functions->sqlAddslashes(
|
||||
$_REQUEST['item_comment']
|
||||
) . "' ";
|
||||
}
|
||||
$query .= 'DO ';
|
||||
if (! empty($_REQUEST['item_definition'])) {
|
||||
$query .= $_REQUEST['item_definition'];
|
||||
|
||||
46
phpunit.xml.nocoverage
Normal file
46
phpunit.xml.nocoverage
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit bootstrap="test/bootstrap-dist.php"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
strict="true"
|
||||
verbose="true">
|
||||
|
||||
<selenium>
|
||||
<browser name="Firefox on localhost"
|
||||
browser="*firefox"
|
||||
host="127.0.0.1"
|
||||
port="4444"
|
||||
timeout="30000"/>
|
||||
</selenium>
|
||||
|
||||
<php>
|
||||
<const name="TESTSUITE_SERVER" value="localhost"/>
|
||||
<const name="TESTSUITE_USER" value="root"/>
|
||||
<const name="TESTSUITE_PASSWORD" value=""/>
|
||||
<const name="TESTSUITE_DATABASE" value="test"/>
|
||||
<const name="TESTSUITE_PHPMYADMIN_HOST" value="http://localhost" />
|
||||
<const name="TESTSUITE_PHPMYADMIN_URL" value="/phpmyadmin" />
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Classes">
|
||||
<directory suffix="_test.php">test/classes</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Unit">
|
||||
<file>test/Environment_test.php</file>
|
||||
<directory suffix="_test.php">test/libraries/core</directory>
|
||||
<directory suffix="_test.php">test/libraries/common</directory>
|
||||
<directory suffix="_test.php">test/libraries/rte</directory>
|
||||
<directory suffix="_test.php">test/libraries</directory>
|
||||
</testsuite>
|
||||
<!--<testsuite name="Selenium">-->
|
||||
<!--<directory suffix="Test.php">test/selenium</directory>-->
|
||||
<!--</testsuite>-->
|
||||
</testsuites>
|
||||
|
||||
<logging>
|
||||
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
|
||||
</logging>
|
||||
|
||||
</phpunit>
|
||||
|
||||
1000
po/be@latin.po
1000
po/be@latin.po
File diff suppressed because it is too large
Load Diff
978
po/en_GB.po
978
po/en_GB.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1174
po/pt_BR.po
1174
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
996
po/sr@latin.po
996
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
998
po/uz@latin.po
998
po/uz@latin.po
File diff suppressed because it is too large
Load Diff
978
po/zh_CN.po
978
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
982
po/zh_TW.po
982
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@ -39,6 +39,8 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'PMA_DisplayResults',
|
||||
array('as', '','','')
|
||||
);
|
||||
$SESSION[' PMA_Token '] = 'token';
|
||||
$GLOBALS['lang'] = 'en';
|
||||
|
||||
}
|
||||
|
||||
@ -86,7 +88,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSetDisplayModeCase1($the_disp_mode, $the_total, $output)
|
||||
{
|
||||
|
||||
|
||||
if (!isset($GLOBALS['fields_meta'])) {
|
||||
$fields_meta = array();
|
||||
$fields_meta[0] = new stdClass();
|
||||
@ -94,7 +96,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
} else {
|
||||
$fields_meta = $GLOBALS['fields_meta'];
|
||||
}
|
||||
|
||||
|
||||
$this->object->setProperties(
|
||||
null, $fields_meta, true, null, null,
|
||||
null, null, null, null, null, null,
|
||||
@ -102,11 +104,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_setDisplayMode',
|
||||
array(&$the_disp_mode, &$the_total)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -163,7 +165,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSetDisplayModeCase2($the_disp_mode, $the_total, $output)
|
||||
{
|
||||
|
||||
|
||||
if (!isset($GLOBALS['fields_meta'])) {
|
||||
$fields_meta = array();
|
||||
$fields_meta[0] = new stdClass();
|
||||
@ -171,21 +173,21 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
} else {
|
||||
$fields_meta = $GLOBALS['fields_meta'];
|
||||
}
|
||||
|
||||
|
||||
$this->object->setProperties(
|
||||
1, $fields_meta, false, null, null,
|
||||
false, null, null, null, null, null,
|
||||
false, false, true, null, null, null
|
||||
);
|
||||
|
||||
|
||||
$this->object->__set('_sql_query', 'SELECT * FROM `pma_bookmark` WHERE 1');
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_setDisplayMode',
|
||||
array(&$the_disp_mode, &$the_total)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -242,7 +244,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSetDisplayModeCase3($the_disp_mode, $the_total, $output)
|
||||
{
|
||||
|
||||
|
||||
if (!isset($GLOBALS['fields_meta'])) {
|
||||
$fields_meta = array();
|
||||
$fields_meta[0] = new stdClass();
|
||||
@ -250,7 +252,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
} else {
|
||||
$fields_meta = $GLOBALS['fields_meta'];
|
||||
}
|
||||
|
||||
|
||||
$this->object->setProperties(
|
||||
1, $fields_meta, false, null, null,
|
||||
false, null, null, null, null, null,
|
||||
@ -258,11 +260,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_setDisplayMode',
|
||||
array(&$the_disp_mode, &$the_total)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -340,11 +342,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$_SESSION[' PMA_token '] = 'token';
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getTableNavigationButton',
|
||||
array(&$caption, $title, $pos, $html_sql_query)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -359,7 +361,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'Submit',
|
||||
1,
|
||||
'SELECT * FROM `pma_bookmark` WHERE 1',
|
||||
'<td><form action="sql.php" method="post" ><input type="hidden" name="db" value="as" /><input type="hidden" name="token" value="token" /><input type="hidden" name="sql_query" value="SELECT * FROM `pma_bookmark` WHERE 1" /><input type="hidden" name="pos" value="1" /><input type="hidden" name="goto" value="" /><input type="submit" name="navig" class="ajax" value="btn" title="Submit" /></form></td>'
|
||||
'<td><form action="sql.php" method="post" ><input type="hidden" name="db" value="as" /><input type="hidden" name="lang" value="en" /><input type="hidden" name="token" value="token" /><input type="hidden" name="sql_query" value="SELECT * FROM `pma_bookmark` WHERE 1" /><input type="hidden" name="pos" value="1" /><input type="hidden" name="goto" value="" /><input type="submit" name="navig" class="ajax" value="btn" title="Submit" /></form></td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -389,6 +391,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$_SESSION['tmp_user_values']['disp_direction'] = '1';
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
str_word_count(
|
||||
$this->_callPrivateFunction(
|
||||
'_getTableNavigation',
|
||||
@ -396,8 +399,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$pos_next, $pos_prev, $id_for_direction_dropdown, $is_innodb
|
||||
)
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -412,7 +414,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
41,
|
||||
'123',
|
||||
false,
|
||||
'309'
|
||||
'330'
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -454,21 +456,21 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$grid_edit_class, $not_null_class, $relation_class,
|
||||
$hide_class, $field_type_class, $row_no, $output
|
||||
) {
|
||||
|
||||
|
||||
$GLOBALS['cfg']['BrowsePointerEnable'] = true;
|
||||
$GLOBALS['cfg']['BrowseMarkerEnable'] = true;
|
||||
$_SESSION['tmp_user_values']['disp_direction']
|
||||
= PMA_DisplayResults::DISP_DIR_VERTICAL;
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getResettedClassForInlineEdit',
|
||||
array(
|
||||
$grid_edit_class, $not_null_class, $relation_class,
|
||||
$hide_class, $field_type_class, $row_no
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -478,11 +480,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetClassForDateTimeRelatedFieldsCase1()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'datetimefield',
|
||||
$this->_callPrivateFunction(
|
||||
'_getClassForDateTimeRelatedFields',
|
||||
array(PMA_DisplayResults::DATETIME_FIELD)
|
||||
),
|
||||
'datetimefield'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -492,11 +494,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetClassForDateTimeRelatedFieldsCase2()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'datefield',
|
||||
$this->_callPrivateFunction(
|
||||
'_getClassForDateTimeRelatedFields',
|
||||
array(PMA_DisplayResults::DATE_FIELD)
|
||||
),
|
||||
'datefield'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -506,11 +508,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetClassForDateTimeRelatedFieldsCase3()
|
||||
{
|
||||
$this->assertEquals(
|
||||
'',
|
||||
$this->_callPrivateFunction(
|
||||
'_getClassForDateTimeRelatedFields',
|
||||
array(PMA_DisplayResults::STRING_FIELD)
|
||||
),
|
||||
''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -542,7 +544,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetOperationLinksForVerticleTableCase1(
|
||||
$operation, $output
|
||||
) {
|
||||
|
||||
|
||||
$vertical_display = array(
|
||||
'row_delete' => array(),
|
||||
'textbtn' => '<th rowspan="4" class="vmiddle">\n \n </th>\n',
|
||||
@ -556,15 +558,15 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'<td class="even row_1 vpointer vmarker center" >\n<a href="sql.php?db=Data&table=cars&sql_query=DELETE+FROM+%60Data%60.%60cars%60+WHERE+%60cars%60.%60id%60+%3D+9&message_to_show=The+row+has+been+deleted&goto=sql.php%3Fdb%3DData%26table%3Dcars%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560cars%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3D466f137b5f4556e43103245a086fc001&token=466f137b5f4556e43103245a086fc001" onclick="return confirmLink(this'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$this->object->__set('_vertical_display', $vertical_display);
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getOperationLinksForVerticleTable',
|
||||
array($operation)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -576,7 +578,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function dataProviderForTestGetOperationLinksForVerticleTableCase2()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
array(
|
||||
'copy',
|
||||
'<tr>
|
||||
<td class="odd row_0 vpointer vmarker center" ><span class="nowrap">\n<a href="tbl_change.php?db=Data&table=cars&where_clause=%60cars%60.%60id%60+%3D+3&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60cars%60&goto=sql.php&default_action=insert&token=466f137b5f4556e43103245a086fc001" ><span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span></a>\n<input type="hidden" class="where_clause" value="%60cars%60.%60id%60+%3D+3" /></spa<td class="even row_1 vpointer vmarker center" ><span class="nowrap">\n<a href="tbl_change.php?db=Data&table=cars&where_clause=%60cars%60.%60id%60+%3D+9&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60cars%60&goto=sql.php&default_action=insert&token=466f137b5f4556e43103245a086fc001" ><span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span></a>\n<input type="hidden" class="where_clause" value="%60cars%60.%60id%60+%3D+9" /></sp</tr>
|
||||
@ -596,7 +598,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetOperationLinksForVerticleTableCase2(
|
||||
$operation, $output
|
||||
) {
|
||||
|
||||
|
||||
$vertical_display = array(
|
||||
'row_delete' => array(),
|
||||
'textbtn' => '<th rowspan="4" class="vmiddle">\n \n </th>\n',
|
||||
@ -610,15 +612,15 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'<td class="even row_1 vpointer vmarker center" >\n<a href="sql.php?db=Data&table=cars&sql_query=DELETE+FROM+%60Data%60.%60cars%60+WHERE+%60cars%60.%60id%60+%3D+9&message_to_show=The+row+has+been+deleted&goto=sql.php%3Fdb%3DData%26table%3Dcars%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560cars%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3D466f137b5f4556e43103245a086fc001&token=466f137b5f4556e43103245a086fc001" onclick="return confirmLink(this'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$this->object->__set('_vertical_display', $vertical_display);
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getOperationLinksForVerticleTable',
|
||||
array($operation)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -651,7 +653,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetOperationLinksForVerticleTableCase3(
|
||||
$operation, $output
|
||||
) {
|
||||
|
||||
|
||||
$vertical_display = array(
|
||||
'row_delete' => array(),
|
||||
'textbtn' => '<th rowspan="4" class="vmiddle">\n \n </th>\n',
|
||||
@ -665,15 +667,15 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'<td class="even row_1 vpointer vmarker center" >\n<a href="sql.php?db=Data&table=cars&sql_query=DELETE+FROM+%60Data%60.%60cars%60+WHERE+%60cars%60.%60id%60+%3D+9&message_to_show=The+row+has+been+deleted&goto=sql.php%3Fdb%3DData%26table%3Dcars%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560cars%2560%26message_to_show%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3D466f137b5f4556e43103245a086fc001&token=466f137b5f4556e43103245a086fc001" onclick="return confirmLink(this'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$this->object->__set('_vertical_display', $vertical_display);
|
||||
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getOperationLinksForVerticleTable',
|
||||
array($operation)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -704,23 +706,23 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetCheckBoxesForMultipleRowOperations(
|
||||
$dir, $output
|
||||
) {
|
||||
|
||||
|
||||
$vertical_display = array(
|
||||
'row_delete' => array(
|
||||
'<td class="odd row_0 vpointer vmarker" class="center"><input type="checkbox" id="id_rows_to_delete0[%_PMA_CHECKBOX_DIR_%]" name="rows_to_delete[0]" class="multi_checkbox" value="%60cars%60.%60id%60+%3D+3" /><input type="hidden" class="condition_array" value="{"`cars`.`id`":"= 3"}" /> </td>',
|
||||
'<td class="even row_1 vpointer vmarker" class="center"><input type="checkbox" id="id_rows_to_delete1[%_PMA_CHECKBOX_DIR_%]" name="rows_to_delete[1]" class="multi_checkbox" value="%60cars%60.%60id%60+%3D+9" /><input type="hidden" class="condition_array" value="{"`cars`.`id`":"= 9"}" /> </td>'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$this->object->__set('_vertical_display', $vertical_display);
|
||||
|
||||
|
||||
$_SESSION['tmp_user_values']['repeat_cells'] = 0;
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getCheckBoxesForMultipleRowOperations',
|
||||
array($dir)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -731,8 +733,8 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$_SESSION['tmp_user_values']['max_rows'] = PMA_DisplayResults::ALL_ROWS;
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction('_getOffsets', array()),
|
||||
array(0, 0)
|
||||
array(0, 0),
|
||||
$this->_callPrivateFunction('_getOffsets', array())
|
||||
);
|
||||
}
|
||||
|
||||
@ -744,8 +746,8 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$_SESSION['tmp_user_values']['max_rows'] = 5;
|
||||
$_SESSION['tmp_user_values']['pos'] = 4;
|
||||
$this->assertEquals(
|
||||
$this->_callPrivateFunction('_getOffsets', array()),
|
||||
array(9, 0)
|
||||
array(9, 0),
|
||||
$this->_callPrivateFunction('_getOffsets', array())
|
||||
);
|
||||
}
|
||||
|
||||
@ -772,10 +774,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetSortParamsCase1($order_by_clause, $output)
|
||||
{
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getSortParams', array($order_by_clause)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -809,10 +811,10 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetSortParamsCase2($order_by_clause, $output)
|
||||
{
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getSortParams', array($order_by_clause)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -869,14 +871,14 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$del_query, $id_suffix, $class, $output
|
||||
) {
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getCheckboxForMultiRowSubmissions',
|
||||
array(
|
||||
$del_url, $is_display, $row_no, $where_clause_html,
|
||||
$condition_array, $del_query, $id_suffix, $class
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -921,13 +923,13 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getEditLink',
|
||||
array(
|
||||
$edit_url, $class, $edit_str, $where_clause, $where_clause_html
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
@ -973,13 +975,13 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getCopyLink',
|
||||
array(
|
||||
$copy_url, $copy_str, $where_clause, $where_clause_html, $class
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1022,13 +1024,13 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getDeleteLink',
|
||||
array(
|
||||
$del_url, $del_str, $js_conf, $class
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1110,6 +1112,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
) {
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getCheckboxAndLinks',
|
||||
array(
|
||||
@ -1118,8 +1121,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$id_suffix, $edit_url, $copy_url, $class, $edit_str,
|
||||
$copy_str, $del_str, $js_conf
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1201,6 +1203,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
) {
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getCheckboxAndLinks',
|
||||
array(
|
||||
@ -1209,8 +1212,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$id_suffix, $edit_url, $copy_url, $class, $edit_str,
|
||||
$copy_str, $del_str, $js_conf
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1286,6 +1288,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
) {
|
||||
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getCheckboxAndLinks',
|
||||
array(
|
||||
@ -1294,8 +1297,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$id_suffix, $edit_url, $copy_url, $class, $edit_str,
|
||||
$copy_str, $del_str, $js_conf
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1305,11 +1307,11 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
public function testMimeDefaultFunction()
|
||||
{
|
||||
$this->assertEquals(
|
||||
"A 'quote' is <b>bold</b>",
|
||||
$this->_callPrivateFunction(
|
||||
'_mimeDefaultFunction',
|
||||
array("A 'quote' is <b>bold</b>")
|
||||
),
|
||||
"A 'quote' is <b>bold</b>"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -1383,6 +1385,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf, $output
|
||||
) {
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->_callPrivateFunction(
|
||||
'_getPlacedLinks',
|
||||
array(
|
||||
@ -1391,8 +1394,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
$dir_letter, $edit_url, $copy_url, $edit_anchor_class,
|
||||
$edit_str, $copy_str, $del_str, $js_conf
|
||||
)
|
||||
),
|
||||
$output
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,10 @@ class PMA_Error_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = $this->getMockForAbstractClass('PMA_Error', array('2', 'Compile Error', 'error.txt', 15));
|
||||
$this->object = $this->getMockForAbstractClass(
|
||||
'PMA_Error',
|
||||
array('2', 'Compile Error', 'error.txt', 15)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -47,59 +50,76 @@ class PMA_Error_test extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Test for setBacktrace
|
||||
*/
|
||||
public function testSetBacktrace(){
|
||||
public function testSetBacktrace()
|
||||
{
|
||||
$this->object->setBacktrace(array('bt1','bt2'));
|
||||
$this->assertEquals($this->object->getBacktrace(),array('bt1','bt2'));
|
||||
$this->assertEquals(array('bt1','bt2'), $this->object->getBacktrace());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for setLine
|
||||
*/
|
||||
public function testSetLine(){
|
||||
public function testSetLine()
|
||||
{
|
||||
$this->object->setLine(15);
|
||||
$this->assertEquals($this->object->getLine(),15);
|
||||
$this->assertEquals(15, $this->object->getLine());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for setFile
|
||||
*/
|
||||
public function testSetFile(){
|
||||
$this->object->setFile('/var/www/pma.txt');
|
||||
$this->assertEquals($this->object->getFile(),'./../../..');
|
||||
public function testSetFile()
|
||||
{
|
||||
$this->object->setFile('./pma.txt');
|
||||
$this->assertStringStartsWith('./../../', $this->object->getFile());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for getHash
|
||||
*/
|
||||
public function testGetHash(){
|
||||
$this->assertEquals(1, preg_match('/^([a-z0-9]*)$/', $this->object->getHash()));
|
||||
public function testGetHash()
|
||||
{
|
||||
$this->assertEquals(
|
||||
1,
|
||||
preg_match('/^([a-z0-9]*)$/', $this->object->getHash())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for getBacktraceDisplay
|
||||
*/
|
||||
public function testGetBacktraceDisplay(){
|
||||
$this->assertTrue((strpos($this->object->getBacktraceDisplay(),'/usr/share/php/PHPUnit/Framework/TestCase.php#751: PHPUnit_Framework_TestResult->run(object)<br />') !== false));
|
||||
public function testGetBacktraceDisplay()
|
||||
{
|
||||
$this->assertContains(
|
||||
'PHPUnit/Framework/TestCase.php#751: PHPUnit_Framework_TestResult->run(object)<br />',
|
||||
$this->object->getBacktraceDisplay()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for getDisplay
|
||||
*/
|
||||
public function testGetDisplay(){
|
||||
$this->assertTrue((strpos($this->object->getDisplay(),'<div class="error"><strong>Warning</strong>') !== false));
|
||||
public function testGetDisplay()
|
||||
{
|
||||
$this->assertContains(
|
||||
'<div class="error"><strong>Warning</strong>',
|
||||
$this->object->getDisplay()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for getHtmlTitle
|
||||
*/
|
||||
public function testGetHtmlTitle(){
|
||||
$this->assertEquals($this->object->getHtmlTitle(),'Warning: Compile Error');
|
||||
public function testGetHtmlTitle()
|
||||
{
|
||||
$this->assertEquals('Warning: Compile Error', $this->object->getHtmlTitle());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for getTitle
|
||||
*/
|
||||
public function testGetTitle(){
|
||||
$this->assertEquals($this->object->getTitle(),'Warning: Compile Error');
|
||||
public function testGetTitle()
|
||||
{
|
||||
$this->assertEquals('Warning: Compile Error', $this->object->getTitle());
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,6 +78,8 @@ class PMA_Footer_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Test for _getDebugMessage
|
||||
*
|
||||
* @group medium
|
||||
*/
|
||||
public function testGetDebugMessage(){
|
||||
|
||||
|
||||
@ -329,6 +329,7 @@ class PMA_Message_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['lang'] = 'en';
|
||||
$_SESSION[' PMA_token '] = 'token';
|
||||
unset($GLOBALS['server']);
|
||||
unset($GLOBALS['collation_connection']);
|
||||
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
|
||||
}
|
||||
|
||||
|
||||
@ -12,13 +12,16 @@
|
||||
require_once 'libraries/CommonFunctions.class.php';
|
||||
require_once 'libraries/PDF.class.php';
|
||||
require_once 'libraries/php-gettext/gettext.inc';
|
||||
|
||||
if (!defined('PMA_VERSION')) {
|
||||
define('PMA_VERSION', 'TEST');
|
||||
}
|
||||
require_once 'libraries/core.lib.php';
|
||||
require_once 'libraries/Config.class.php';
|
||||
|
||||
class PMA_PDF_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['PMA_Config'] = new PMA_Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
}
|
||||
/**
|
||||
* @group large
|
||||
*/
|
||||
|
||||
@ -111,12 +111,12 @@ class PMA_Scripts_test extends PHPUnit_Framework_TestCase
|
||||
$this->object->addFile('common.js');
|
||||
$this->object->addEvent('onClick', 'doSomething');
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getDisplay(),
|
||||
'<script src="js/common.js?ts=1339744334" type="text/javascript"></script>
|
||||
<script type="text/javascript">// <![CDATA[
|
||||
$(window.parent).bind(\'onClick\', doSomething);
|
||||
// ]]></script>'
|
||||
$this->assertRegExp(
|
||||
'@<script src="js/common.js\\?ts=[0-9]*" type="text/javascript"></script>
|
||||
<script type="text/javascript">// <!\\[CDATA\\[
|
||||
\\$\\(window.parent\\).bind\\(\'onClick\', doSomething\\);
|
||||
// ]]></script>@',
|
||||
$this->object->getDisplay()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -71,6 +71,8 @@ class PMA_StorageEngine_test extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Test for getHtmlSelect
|
||||
*
|
||||
* @group medium
|
||||
*/
|
||||
public function testGetHtmlSelect(){
|
||||
|
||||
|
||||
@ -26,8 +26,10 @@ class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['ThemeDefault'] = 'pmahomme';
|
||||
$GLOBALS['cfg']['ServerDefault'] = 0;
|
||||
$GLOBALS['server'] = 99;
|
||||
$GLOBALS['lang'] = 'en';
|
||||
$_SESSION[' PMA_token '] = 'token';
|
||||
$GLOBALS['PMA_Config'] = new PMA_Config();
|
||||
$GLOBALS['collation_connection'] = 'utf8_general_ci';
|
||||
}
|
||||
|
||||
public function testCookieName()
|
||||
@ -89,8 +91,8 @@ class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase
|
||||
public function testGetPrintPreviews(){
|
||||
$tm = new PMA_Theme_Manager();
|
||||
$this->assertEquals(
|
||||
$tm->getPrintPreviews(),
|
||||
'<div class="theme_preview"><h2>Original (2.9) </h2><p><a target="_top" class="take_theme" name="original" href="index.php?set_theme=original&server=99&token=token"><img src="./themes/original/screen.png" border="1" alt="Original" title="Original" /><br />[ <strong>take it</strong> ]</a></p></div><div class="theme_preview"><h2>pmahomme (1.1) </h2><p><a target="_top" class="take_theme" name="pmahomme" href="index.php?set_theme=pmahomme&server=99&token=token"><img src="./themes/pmahomme/screen.png" border="1" alt="pmahomme" title="pmahomme" /><br />[ <strong>take it</strong> ]</a></p></div>'
|
||||
'<div class="theme_preview"><h2>Original (2.9) </h2><p><a target="_top" class="take_theme" name="original" href="index.php?set_theme=original&server=99&lang=en&collation_connection=utf8_general_ci&token=token"><img src="./themes/original/screen.png" border="1" alt="Original" title="Original" /><br />[ <strong>take it</strong> ]</a></p></div><div class="theme_preview"><h2>pmahomme (1.1) </h2><p><a target="_top" class="take_theme" name="pmahomme" href="index.php?set_theme=pmahomme&server=99&lang=en&collation_connection=utf8_general_ci&token=token"><img src="./themes/pmahomme/screen.png" border="1" alt="pmahomme" title="pmahomme" /><br />[ <strong>take it</strong> ]</a></p></div>',
|
||||
$tm->getPrintPreviews()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -267,8 +267,8 @@ class PMA_Types_MySQL_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getFunctionsClass($class),
|
||||
$output
|
||||
$output,
|
||||
$this->object->getFunctionsClass($class)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -49,15 +49,19 @@ class PMA_GIS_Geometrycollection_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for scaleRow
|
||||
*
|
||||
* @param type $spatial
|
||||
* @param string $spatial string to parse
|
||||
* @param array $output expected parsed output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider providerForScaleRow
|
||||
*/
|
||||
public function testScaleRow($spatial, $output)
|
||||
{
|
||||
|
||||
$this->assertEquals($this->object->scaleRow($spatial), $output);
|
||||
$this->assertEquals($output, $this->object->scaleRow($spatial));
|
||||
}
|
||||
|
||||
public function providerForScaleRow()
|
||||
@ -77,18 +81,24 @@ class PMA_GIS_Geometrycollection_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for generateWkt
|
||||
*
|
||||
* @param type $gis_data
|
||||
* @param type $index
|
||||
* @param string $empty
|
||||
* @param type $output
|
||||
* @param array $gis_data array of GIS data
|
||||
* @param integer $index index in $gis_data
|
||||
* @param string $empty empty parameter
|
||||
* @param string $output expected output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider providerForGenerateWkt
|
||||
*/
|
||||
public function testGenerateWkt($gis_data, $index, $empty, $output)
|
||||
{
|
||||
|
||||
$this->assertEquals($this->object->generateWkt($gis_data, $index, $empty = ''), $output);
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->object->generateWkt($gis_data, $index, $empty = '')
|
||||
);
|
||||
}
|
||||
|
||||
public function providerForGenerateWkt()
|
||||
@ -116,15 +126,19 @@ class PMA_GIS_Geometrycollection_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
* @param $output
|
||||
* Test for generateParams
|
||||
*
|
||||
* @param string $value string to parse
|
||||
* @param array $output expected parsed output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider providerForGenerateParams
|
||||
*/
|
||||
public function testGenerateParams($value, $output)
|
||||
{
|
||||
|
||||
$this->assertEquals($this->object->generateParams($value), $output);
|
||||
$this->assertEquals($output, $this->object->generateParams($value));
|
||||
}
|
||||
|
||||
public function providerForGenerateParams()
|
||||
@ -158,21 +172,28 @@ class PMA_GIS_Geometrycollection_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for prepareRowAsPng
|
||||
*
|
||||
* @param type $spatial
|
||||
* @param type $label
|
||||
* @param type $line_color
|
||||
* @param type $scale_data
|
||||
* @param type $image
|
||||
* @param type $output
|
||||
* @param string $spatial string to parse
|
||||
* @param string $label field label
|
||||
* @param string $line_color line color
|
||||
* @param array $scale_data scaling parameters
|
||||
* @param resource $image initial image
|
||||
* @param string $output expected output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider providerForPrepareRowAsPng
|
||||
*/
|
||||
public function testPrepareRowAsPng($spatial, $label, $line_color, $scale_data, $image, $output)
|
||||
{
|
||||
public function testPrepareRowAsPng(
|
||||
$spatial, $label, $line_color, $scale_data, $image, $output
|
||||
) {
|
||||
|
||||
$return = $this->object->prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image);
|
||||
$this->assertTrue(true);
|
||||
$return = $this->object->prepareRowAsPng(
|
||||
$spatial, $label, $line_color, $scale_data, $image
|
||||
);
|
||||
$this->assertEquals(120, imagesx($return));
|
||||
$this->assertEquals(150, imagesy($return));
|
||||
}
|
||||
|
||||
public function providerForPrepareRowAsPng()
|
||||
@ -196,19 +217,25 @@ class PMA_GIS_Geometrycollection_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for prepareRowAsPdf
|
||||
*
|
||||
* @param type $spatial
|
||||
* @param type $label
|
||||
* @param type $line_color
|
||||
* @param type $scale_data
|
||||
* @param type $pdf
|
||||
* @param string $spatial string to parse
|
||||
* @param string $label field label
|
||||
* @param string $line_color line color
|
||||
* @param array $scale_data scaling parameters
|
||||
* @param string $pdf expected output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider providerForPrepareRowAsPdf
|
||||
*/
|
||||
public function testPrepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
|
||||
{
|
||||
public function testPrepareRowAsPdf(
|
||||
$spatial, $label, $line_color, $scale_data, $pdf
|
||||
) {
|
||||
|
||||
$return = $this->object->prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
|
||||
$return = $this->object->prepareRowAsPdf(
|
||||
$spatial, $label, $line_color, $scale_data, $pdf
|
||||
);
|
||||
$this->assertTrue($return instanceof TCPDF);
|
||||
}
|
||||
|
||||
@ -232,21 +259,32 @@ class PMA_GIS_Geometrycollection_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for prepareRowAsSvg
|
||||
*
|
||||
* @param type $spatial
|
||||
* @param type $label
|
||||
* @param type $line_color
|
||||
* @param type $scale_data
|
||||
* @param type $output
|
||||
* @param string $spatial string to parse
|
||||
* @param string $label field label
|
||||
* @param string $line_color line color
|
||||
* @param array $scale_data scaling parameters
|
||||
* @param string $output expected output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider providerForPrepareRowAsSvg
|
||||
*/
|
||||
public function testPrepareRowAsSvg($spatial, $label, $line_color, $scale_data, $output)
|
||||
{
|
||||
public function testPrepareRowAsSvg(
|
||||
$spatial, $label, $line_color, $scale_data, $output
|
||||
) {
|
||||
|
||||
$string = $this->object->prepareRowAsSvg($spatial, $label, $line_color, $scale_data);
|
||||
$string = $this->object->prepareRowAsSvg(
|
||||
$spatial, $label, $line_color, $scale_data
|
||||
);
|
||||
$this->assertEquals(1, preg_match($output, $string));
|
||||
// $this->assertEquals($this->object->prepareRowAsSvg($spatial, $label, $line_color, $scale_data) , $output);
|
||||
$this->assertRegExp(
|
||||
$output,
|
||||
$this->object->prepareRowAsSvg(
|
||||
$spatial, $label, $line_color, $scale_data
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function providerForPrepareRowAsSvg()
|
||||
@ -269,20 +307,29 @@ class PMA_GIS_Geometrycollection_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for prepareRowAsOl
|
||||
*
|
||||
* @param type $spatial
|
||||
* @param type $srid
|
||||
* @param type $label
|
||||
* @param type $line_color
|
||||
* @param type $scale_data
|
||||
* @param type $output
|
||||
* @param string $spatial string to parse
|
||||
* @param integer $srid SRID
|
||||
* @param string $label field label
|
||||
* @param string $line_color line color
|
||||
* @param array $scale_data scaling parameters
|
||||
* @param string $output expected output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider providerForPrepareRowAsOl
|
||||
*/
|
||||
public function testPrepareRowAsOl($spatial, $srid, $label, $line_color, $scale_data, $output)
|
||||
{
|
||||
public function testPrepareRowAsOl(
|
||||
$spatial, $srid, $label, $line_color, $scale_data, $output
|
||||
) {
|
||||
|
||||
$this->assertEquals($this->object->prepareRowAsOl($spatial, $srid, $label, $line_color, $scale_data), $output);
|
||||
$this->assertEquals(
|
||||
$output,
|
||||
$this->object->prepareRowAsOl(
|
||||
$spatial, $srid, $label, $line_color, $scale_data
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function providerForPrepareRowAsOl()
|
||||
|
||||
@ -15,9 +15,10 @@ class PMA_SQL_parser_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
private function assertParser($sql, $expected, $error = '')
|
||||
{
|
||||
PMA_SQP_resetError();
|
||||
$parsed_sql = PMA_SQP_parse($sql);
|
||||
$this->assertEquals(PMA_SQP_getErrorString(), $error);
|
||||
$this->assertEquals($parsed_sql, $expected);
|
||||
$this->assertEquals($error, PMA_SQP_getErrorString());
|
||||
$this->assertEquals($expected, $parsed_sql);
|
||||
}
|
||||
|
||||
public function testParse_1()
|
||||
@ -124,6 +125,10 @@ class PMA_SQL_parser_test extends PHPUnit_Framework_TestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @group medium
|
||||
*/
|
||||
public function testParse_4()
|
||||
{
|
||||
$GLOBALS['is_ajax_request'] = true;
|
||||
|
||||
@ -6,39 +6,16 @@
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
|
||||
$match = array();
|
||||
preg_match(
|
||||
'@^([0-9]{1,2})(?:.([0-9]{1,2})(?:.([0-9]{1,2}))?)?@',
|
||||
phpversion(),
|
||||
$match
|
||||
);
|
||||
if (isset($match) && ! empty($match[1])) {
|
||||
if (! isset($match[2])) {
|
||||
$match[2] = 0;
|
||||
}
|
||||
if (! isset($match[3])) {
|
||||
$match[3] = 0;
|
||||
}
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define(
|
||||
'PMA_PHP_INT_VERSION',
|
||||
(int)sprintf('%d%02d%02d', $match[1], $match[2], $match[3])
|
||||
);
|
||||
} else {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PMA_PHP_INT_VERSION', 0);
|
||||
}
|
||||
|
||||
require_once 'libraries/string.lib.php';
|
||||
|
||||
class PMA_STR_sub_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testMultiByte()
|
||||
{
|
||||
/* The PDF testing seems to set mb encoding to ASCII */
|
||||
if (function_exists('mb_internal_encoding')) {
|
||||
mb_internal_encoding('utf-8');
|
||||
}
|
||||
$this->assertEquals(
|
||||
'čšě',
|
||||
PMA_substr('čšěčščěš', 0, 3)
|
||||
|
||||
@ -53,12 +53,12 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
|
||||
public function testPMA_Bookmark_getParams(){
|
||||
|
||||
$this->assertEquals(
|
||||
PMA_Bookmark_getParams(),
|
||||
array(
|
||||
'user' => 'root',
|
||||
'db' => 'phpmyadmin',
|
||||
'table'=> 'pma_bookmark'
|
||||
)
|
||||
),
|
||||
PMA_Bookmark_getParams()
|
||||
);
|
||||
}
|
||||
|
||||
@ -67,11 +67,11 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testPMA_Bookmark_getList(){
|
||||
$this->assertEquals(
|
||||
PMA_Bookmark_getList('phpmyadmin'),
|
||||
array(
|
||||
'id' => 'id (shared)',
|
||||
'label' => 'label (shared)'
|
||||
)
|
||||
),
|
||||
PMA_Bookmark_getList('phpmyadmin')
|
||||
);
|
||||
}
|
||||
|
||||
@ -86,8 +86,8 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
}
|
||||
$this->assertEquals(
|
||||
PMA_Bookmark_get('phpmyadmin', '1'),
|
||||
"SELECT query FROM `phpmyadmin`.`pma_bookmark` WHERE dbase = 'phpmyadmin' AND (user = 'root' OR user = '') AND `id` = 1"
|
||||
"SELECT query FROM `phpmyadmin`.`pma_bookmark` WHERE dbase = 'phpmyadmin' AND (user = 'root' OR user = '') AND `id` = 1",
|
||||
PMA_Bookmark_get('phpmyadmin', '1')
|
||||
);
|
||||
}
|
||||
|
||||
@ -101,14 +101,13 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->assertEquals(
|
||||
$this->assertTrue(
|
||||
PMA_Bookmark_save(array(
|
||||
'dbase' => 'phpmyadmin',
|
||||
'user' => 'phpmyadmin',
|
||||
'query' => 'SELECT "phpmyadmin"',
|
||||
'label' => 'phpmyadmin',
|
||||
)),
|
||||
true
|
||||
))
|
||||
);
|
||||
}
|
||||
|
||||
@ -122,9 +121,8 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->assertEquals(
|
||||
PMA_Bookmark_delete('phpmyadmin', '1'),
|
||||
true
|
||||
$this->assertTrue(
|
||||
PMA_Bookmark_delete('phpmyadmin', '1')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,6 +86,8 @@ class PMA_build_html_for_db_test extends PHPUnit_Framework_TestCase
|
||||
* @param $output
|
||||
*
|
||||
* @dataProvider providerForTestPMA_buildHtmlForDb
|
||||
*
|
||||
* @group medium
|
||||
*/
|
||||
public function testPMA_buildHtmlForDb($current, $is_superuser, $checkall, $url_query,$column_order, $replication_types, $replication_info, $output){
|
||||
|
||||
|
||||
@ -12,22 +12,25 @@
|
||||
*/
|
||||
require_once 'libraries/core.lib.php';
|
||||
require_once 'libraries/CommonFunctions.class.php';
|
||||
|
||||
if (!defined('PMA_VERSION')) {
|
||||
define('PMA_VERSION', 'TEST');
|
||||
}
|
||||
require_once 'libraries/Config.class.php';
|
||||
|
||||
/**
|
||||
* Test for PMA_CommonFunctions::expandUserString function.
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup variables needed by test.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['PMA_Config'] = new PMA_Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['cfg'] = array(
|
||||
'Server' => array(
|
||||
'host' => 'host&',
|
||||
@ -40,10 +43,16 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Test case for expanding strings
|
||||
*
|
||||
* @param string $in string to evaluate
|
||||
* @param string $out expected output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider provider
|
||||
*/
|
||||
public function testExpand($in, $out)
|
||||
{
|
||||
$out = str_replace('PMA_VERSION', PMA_VERSION, $out);
|
||||
$this->assertEquals(
|
||||
$out, PMA_CommonFunctions::getInstance()->expandUserString($in)
|
||||
);
|
||||
@ -52,14 +61,21 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Test case for expanding strings with escaping
|
||||
*
|
||||
* @param string $in string to evaluate
|
||||
* @param string $out expected output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider provider
|
||||
*/
|
||||
public function testExpandEscape($in, $out)
|
||||
{
|
||||
$out = str_replace('PMA_VERSION', PMA_VERSION, $out);
|
||||
$this->assertEquals(
|
||||
htmlspecialchars($out),
|
||||
PMA_CommonFunctions::getInstance()
|
||||
->expandUserString($in, 'htmlspecialchars')
|
||||
PMA_CommonFunctions::getInstance()->expandUserString(
|
||||
$in, 'htmlspecialchars'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -76,7 +92,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
array('@DATABASE@', 'database'),
|
||||
array('@TABLE@', 'table'),
|
||||
array('@IGNORE@', '@IGNORE@'),
|
||||
array('@PHPMYADMIN@', 'phpMyAdmin ' . PMA_VERSION),
|
||||
array('@PHPMYADMIN@', 'phpMyAdmin PMA_VERSION'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ require_once 'libraries/url_generating.lib.php';
|
||||
require_once 'libraries/Theme.class.php';
|
||||
require_once 'libraries/Table.class.php';
|
||||
require_once 'libraries/php-gettext/gettext.inc';
|
||||
require_once 'libraries/Response.class.php';
|
||||
|
||||
/**
|
||||
* Test function sending headers.
|
||||
@ -286,10 +287,10 @@ class PMA_headerLocation_test extends PHPUnit_Framework_TestCase
|
||||
$url = './navigation.php?'.PMA_generate_common_url($GLOBALS['db'], '', '&');
|
||||
$write = '<script type="text/javascript">' . PHP_EOL .
|
||||
'//<![CDATA[' . PHP_EOL .
|
||||
'if (typeof(window.parent) != \'undefined\'' . PHP_EOL .
|
||||
' && typeof(window.parent.frame_navigation) != \'undefined\'' . PHP_EOL .
|
||||
'if (typeof(window.parent) != "undefined"' . PHP_EOL .
|
||||
' && typeof(window.parent.frame_navigation) != "undefined"' . PHP_EOL .
|
||||
' && window.parent.goTo) {' . PHP_EOL .
|
||||
' window.parent.goTo(\'' . $url . '\');' . PHP_EOL .
|
||||
' window.parent.goTo("' . $url . '");' . PHP_EOL .
|
||||
'}' . PHP_EOL .
|
||||
'//]]>' . PHP_EOL .
|
||||
'</script>' . PHP_EOL;
|
||||
@ -10,12 +10,38 @@
|
||||
/*
|
||||
* Include to test.
|
||||
*/
|
||||
require_once 'libraries/vendor_config.php';
|
||||
require_once 'libraries/core.lib.php';
|
||||
require_once 'libraries/select_lang.lib.php';
|
||||
require_once 'libraries/Config.class.php';
|
||||
require_once 'libraries/Theme.class.php';
|
||||
require_once 'libraries/CommonFunctions.class.php';
|
||||
require_once 'libraries/js_escape.lib.php';
|
||||
require_once 'libraries/sanitizing.lib.php';
|
||||
|
||||
class PMA_warnMissingExtension_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
$GLOBALS['lang'] = 'en';
|
||||
$GLOBALS['PMA_Config'] = new PMA_Config();
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['cfg']['Server'] = array(
|
||||
'host' => 'host',
|
||||
'verbose' => 'verbose',
|
||||
);
|
||||
$GLOBALS['cfg']['OBGzip'] = false;
|
||||
$_SESSION['PMA_Theme'] = new PMA_Theme();
|
||||
$_SESSION[' PMA_token '] = 'token';
|
||||
$GLOBALS['pmaThemeImage'] = 'theme/';
|
||||
$GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['db'] = '';
|
||||
$GLOBALS['table'] = '';
|
||||
|
||||
function testMissingExtention()
|
||||
}
|
||||
|
||||
function testMissingExtension()
|
||||
{
|
||||
$ext = 'php_ext';
|
||||
$this->setExpectedException(
|
||||
@ -25,7 +51,7 @@ class PMA_warnMissingExtension_test extends PHPUnit_Framework_TestCase
|
||||
PMA_warnMissingExtension($ext);
|
||||
}
|
||||
|
||||
function testMissingExtentionFatal()
|
||||
function testMissingExtensionFatal()
|
||||
{
|
||||
$ext = 'php_ext';
|
||||
$warn = 'The <a href="' . PMA_getPHPDocLink('book.' . $ext . '.php') . '" target="Documentation"><em>'.$ext.'</em></a> extension is missing. Please check your PHP configuration.';
|
||||
@ -38,7 +64,7 @@ class PMA_warnMissingExtension_test extends PHPUnit_Framework_TestCase
|
||||
$this->assertGreaterThan(0, strpos($printed, $warn));
|
||||
}
|
||||
|
||||
function testMissingExtentionFatalWithExtra()
|
||||
function testMissingExtensionFatalWithExtra()
|
||||
{
|
||||
$ext = 'php_ext';
|
||||
$extra = 'Appended Extra String';
|
||||
@ -53,7 +79,7 @@ class PMA_warnMissingExtension_test extends PHPUnit_Framework_TestCase
|
||||
$this->assertGreaterThan(0, strpos($printed, $warn));
|
||||
}
|
||||
|
||||
function testMissingExtentionWithExtra()
|
||||
function testMissingExtensionWithExtra()
|
||||
{
|
||||
$ext = 'php_ext';
|
||||
$extra = 'Appended Extra String';
|
||||
|
||||
@ -475,7 +475,7 @@ div.error {
|
||||
h1.success,
|
||||
div.success {
|
||||
border-color: #00FF00;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_success.png);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_success.png');?>);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
|
||||
background-position: 5px 50%;
|
||||
@ -496,7 +496,7 @@ div.success {
|
||||
h1.notice,
|
||||
div.notice {
|
||||
border-color: #FFD700;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_notice.png);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_notice.png');?>);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
|
||||
background-position: 5px 50%;
|
||||
@ -518,7 +518,7 @@ div.notice {
|
||||
h1.error,
|
||||
div.error {
|
||||
border-color: #ff0000;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_error.png);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_error.png');?>);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
|
||||
background-position: 5px 50%;
|
||||
@ -542,7 +542,7 @@ fieldset.confirmation legend {
|
||||
border-left: 0.1em solid #FF0000;
|
||||
border-right: 0.1em solid #FF0000;
|
||||
font-weight: bold;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_really.png);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_really.png');?>);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
|
||||
background-position: 5px 50%;
|
||||
@ -830,7 +830,7 @@ ul#topmenu > li.active {
|
||||
/* disabled tabs */
|
||||
ul#topmenu span.tab,
|
||||
a.error {
|
||||
cursor: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>error.ico), default;
|
||||
cursor: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('error.ico');?>), default;
|
||||
}
|
||||
/* end topmenu */
|
||||
|
||||
@ -1244,7 +1244,7 @@ div#queryboxcontainer div#bookmarkoptions {
|
||||
|
||||
/* main page */
|
||||
#maincontainer {
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>logo_right.png);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('logo_right.png');?>);
|
||||
background-position: <?php echo $right; ?> bottom;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@ -1268,83 +1268,83 @@ div#queryboxcontainer div#bookmarkoptions {
|
||||
|
||||
/* iconic view for ul items */
|
||||
li#li_create_database {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_newdb.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_newdb.png');?>);
|
||||
}
|
||||
|
||||
li#li_select_lang {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_lang.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_lang.png');?>);
|
||||
}
|
||||
|
||||
li#li_select_mysql_collation {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_asci.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_asci.png');?>);
|
||||
}
|
||||
|
||||
li#li_select_theme {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_theme.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_theme.png');?>);
|
||||
}
|
||||
|
||||
li#li_user_info {
|
||||
/* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png); */
|
||||
/* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_rights.png');?>); */
|
||||
}
|
||||
|
||||
li#li_mysql_status {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_status.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_status.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_variables {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_vars.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_vars.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_processes {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_process.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_process.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_collations {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_asci.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_asci.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_engines {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_engine.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_engine.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_binlogs {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_tbl.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_tbl.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_databases {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_db.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_db.png');?>);
|
||||
}
|
||||
|
||||
li#li_export {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_export.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_export.png');?>);
|
||||
}
|
||||
|
||||
li#li_import {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_import.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_import.png');?>);
|
||||
}
|
||||
|
||||
li#li_change_password {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_passwd.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_passwd.png');?>);
|
||||
}
|
||||
|
||||
li#li_log_out {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_loggoff.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_loggoff.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_privilegs {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_rights.png');?>);
|
||||
}
|
||||
|
||||
li#li_switch_dbstats {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_dbstatistics.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_dbstatistics.png');?>);
|
||||
}
|
||||
|
||||
li#li_flush_privileges {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_reload.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_reload.png');?>);
|
||||
}
|
||||
|
||||
li#li_user_preferences {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_tblops.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_tblops.png');?>);
|
||||
}
|
||||
/* END iconic view for ul items */
|
||||
|
||||
@ -1476,7 +1476,7 @@ textarea#partitiondefinition {
|
||||
}
|
||||
|
||||
#li_select_server {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_host.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_host.png');?>);
|
||||
}
|
||||
|
||||
#list_server {
|
||||
@ -1563,7 +1563,7 @@ input[type=text].invalid_value,
|
||||
display: block;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>ajax_clock_small.gif);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('ajax_clock_small.gif');?>);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 2%;
|
||||
}
|
||||
@ -2165,7 +2165,7 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.cPointer {
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_pointer.png);
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('col_pointer.png');?>);
|
||||
height: 20px;
|
||||
margin-left: -5px; /* must be minus half of its width */
|
||||
margin-top: -10px;
|
||||
@ -2199,7 +2199,7 @@ fieldset .disabled-field td {
|
||||
width: 100%;
|
||||
}
|
||||
.cHide {
|
||||
background: #D3DCE3 url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_hide.png);
|
||||
background: #D3DCE3 url(<?php echo $_SESSION['PMA_Theme']->getImgPath('col_hide.png');?>);
|
||||
color: #CCC;
|
||||
cursor: pointer;
|
||||
height: 16px;
|
||||
@ -2220,7 +2220,7 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.coldrop {
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_drop.png);
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('col_drop.png');?>);
|
||||
cursor: pointer;
|
||||
height: 16px;
|
||||
margin-left: 0.5em;
|
||||
@ -2344,12 +2344,12 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.cEdit .edit_box_posting {
|
||||
background: #FFF url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>ajax_clock_small.gif) no-repeat right center;
|
||||
background: #FFF url(<?php echo $_SESSION['PMA_Theme']->getImgPath('ajax_clock_small.gif');?>) no-repeat right center;
|
||||
padding-right: 1.5em;
|
||||
}
|
||||
|
||||
.cEdit .edit_area_loading {
|
||||
background: #FFF url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>ajax_clock_small.gif) no-repeat center;
|
||||
background: #FFF url(<?php echo $_SESSION['PMA_Theme']->getImgPath('ajax_clock_small.gif');?>) no-repeat center;
|
||||
height: 10em;
|
||||
}
|
||||
|
||||
@ -2360,7 +2360,7 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.saving_edited_data {
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>ajax_clock_small.gif) no-repeat left;
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('ajax_clock_small.gif');?>) no-repeat left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
@ -709,7 +709,7 @@ div.error {
|
||||
h1.success,
|
||||
div.success {
|
||||
border-color: #a2d246;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_success.png);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_success.png');?>);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
|
||||
background-position: 5px 50%;
|
||||
@ -729,7 +729,7 @@ div.success {
|
||||
h1.notice,
|
||||
div.notice {
|
||||
border-color: #3a6c7e;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_notice.png);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_notice.png');?>);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
|
||||
background-position: 5px 50%;
|
||||
@ -751,7 +751,7 @@ div.notice {
|
||||
h1.error,
|
||||
div.error {
|
||||
border-color: #333;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_error.png);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_error.png');?>);
|
||||
background-repeat: no-repeat;
|
||||
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
|
||||
background-position: 5px 50%;
|
||||
@ -1076,7 +1076,7 @@ ul#topmenu > li.active {
|
||||
/* disabled tabs */
|
||||
ul#topmenu span.tab,
|
||||
a.error {
|
||||
cursor: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>error.ico), default;
|
||||
cursor: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('error.ico');?>), default;
|
||||
color: #ccc;
|
||||
}
|
||||
/* end topmenu */
|
||||
@ -1610,7 +1610,7 @@ div#queryboxcontainer div#bookmarkoptions {
|
||||
|
||||
/* main page */
|
||||
#maincontainer {
|
||||
/* background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>logo_right.png); */
|
||||
/* background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('logo_right.png');?>); */
|
||||
/* background-position: <?php echo $right; ?> bottom; */
|
||||
/* background-repeat: no-repeat; */
|
||||
}
|
||||
@ -1634,83 +1634,83 @@ div#queryboxcontainer div#bookmarkoptions {
|
||||
|
||||
/* iconic view for ul items */
|
||||
li#li_create_database {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_newdb.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_newdb.png');?>);
|
||||
}
|
||||
|
||||
li#li_select_lang {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_lang.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_lang.png');?>);
|
||||
}
|
||||
|
||||
li#li_select_mysql_collation {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_asci.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_asci.png');?>);
|
||||
}
|
||||
|
||||
li#li_select_theme {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_theme.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_theme.png');?>);
|
||||
}
|
||||
|
||||
li#li_user_info {
|
||||
/* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png); */
|
||||
/* list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_rights.png');?>); */
|
||||
}
|
||||
|
||||
li#li_mysql_status {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_status.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_status.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_variables {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_vars.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_vars.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_processes {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_process.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_process.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_collations {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_asci.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_asci.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_engines {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_engine.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_engine.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_binlogs {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_tbl.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_tbl.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_databases {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_db.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_db.png');?>);
|
||||
}
|
||||
|
||||
li#li_export {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_export.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_export.png');?>);
|
||||
}
|
||||
|
||||
li#li_import {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_import.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_import.png');?>);
|
||||
}
|
||||
|
||||
li#li_change_password {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_passwd.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_passwd.png');?>);
|
||||
}
|
||||
|
||||
li#li_log_out {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_loggoff.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_loggoff.png');?>);
|
||||
}
|
||||
|
||||
li#li_mysql_privilegs {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_rights.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_rights.png');?>);
|
||||
}
|
||||
|
||||
li#li_switch_dbstats {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_dbstatistics.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_dbstatistics.png');?>);
|
||||
}
|
||||
|
||||
li#li_flush_privileges {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_reload.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_reload.png');?>);
|
||||
}
|
||||
|
||||
li#li_user_preferences {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>b_tblops.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('b_tblops.png');?>);
|
||||
}
|
||||
/* END iconic view for ul items */
|
||||
|
||||
@ -1858,7 +1858,7 @@ textarea#partitiondefinition {
|
||||
}
|
||||
|
||||
#li_select_server {
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>s_host.png);
|
||||
list-style-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('s_host.png');?>);
|
||||
}
|
||||
|
||||
#list_server {
|
||||
@ -1945,7 +1945,7 @@ input[type=text].invalid_value,
|
||||
display: inline;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>ajax_clock_small.gif);
|
||||
background-image: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('ajax_clock_small.gif');?>);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 2%;
|
||||
border: 1px solid #e2b709;
|
||||
@ -2630,7 +2630,7 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.cPointer {
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_pointer.png);
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('col_pointer.png');?>);
|
||||
height: 20px;
|
||||
margin-left: -5px; /* must be minus half of its width */
|
||||
margin-top: -10px;
|
||||
@ -2660,7 +2660,7 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.cHide {
|
||||
background: #EEE url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_hide.png);
|
||||
background: #EEE url(<?php echo $_SESSION['PMA_Theme']->getImgPath('col_hide.png');?>);
|
||||
color: #CCC;
|
||||
cursor: pointer;
|
||||
height: 16px;
|
||||
@ -2681,7 +2681,7 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.coldrop {
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_drop.png);
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('col_drop.png');?>);
|
||||
cursor: pointer;
|
||||
height: 16px;
|
||||
margin-left: .3em;
|
||||
@ -2820,12 +2820,12 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.cEdit .edit_box_posting {
|
||||
background: #FFF url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>ajax_clock_small.gif) no-repeat right center;
|
||||
background: #FFF url(<?php echo $_SESSION['PMA_Theme']->getImgPath('ajax_clock_small.gif');?>) no-repeat right center;
|
||||
padding-right: 1.5em;
|
||||
}
|
||||
|
||||
.cEdit .edit_area_loading {
|
||||
background: #FFF url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>ajax_clock_small.gif) no-repeat center;
|
||||
background: #FFF url(<?php echo $_SESSION['PMA_Theme']->getImgPath('ajax_clock_small.gif');?>) no-repeat center;
|
||||
height: 10em;
|
||||
}
|
||||
|
||||
@ -2836,7 +2836,7 @@ fieldset .disabled-field td {
|
||||
}
|
||||
|
||||
.saving_edited_data {
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>ajax_clock_small.gif) no-repeat left;
|
||||
background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath('ajax_clock_small.gif');?>) no-repeat left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user