Merge branch 'QA_4_6'
This commit is contained in:
commit
f904df8698
@ -23,6 +23,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #12118 Fixed setting mixed case languages
|
||||
- issue #12229 Avoid storing objects in session when debugging SQL
|
||||
- issue #12249 Fix cookie path on IIS
|
||||
- issue #11705 Fix occassional 200 errors on Windows
|
||||
|
||||
4.6.1 (2016-05-02)
|
||||
- issue #12120 PMA_Util not found in insert_edit.lib.php
|
||||
|
||||
@ -698,11 +698,7 @@ class Index
|
||||
$r .= '<th>' . __('Unique') . '</th>';
|
||||
$r .= '<th>' . __('Packed') . '</th>';
|
||||
$r .= '<th>' . __('Column') . '</th>';
|
||||
/**
|
||||
* The htmlentities is there to workaround PHP bug on Windows
|
||||
* see https://github.com/phpmyadmin/phpmyadmin/issues/11705
|
||||
*/
|
||||
$r .= '<th>' . htmlentities(__('Cardinality')) . '</th>';
|
||||
$r .= '<th>' . __('Cardinality') . '</th>';
|
||||
$r .= '<th>' . __('Collation') . '</th>';
|
||||
$r .= '<th>' . __('Null') . '</th>';
|
||||
$r .= '<th>' . __('Comment') . '</th>';
|
||||
|
||||
@ -61,20 +61,6 @@ class Template
|
||||
return new Template($name, $data, $helperFunctions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove whitespaces between tags and innerHTML
|
||||
*
|
||||
* @param string $content HTML to perform the trim method
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function trim($content)
|
||||
{
|
||||
$regexp = '/(<[^\/][^>]+>)\s+|\s+(<\/)/';
|
||||
|
||||
return preg_replace($regexp, "$1$2", $content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds more entries to the data for this template
|
||||
*
|
||||
@ -147,7 +133,7 @@ class Template
|
||||
* Render template
|
||||
*
|
||||
* @param array $data Variables to be provided to the template
|
||||
* @param bool $trim Trim content
|
||||
* @param bool $trim Trim content (does nothing, removed in future)
|
||||
* @param array $helperFunctions Helper functions to be used by template
|
||||
*
|
||||
* @return string
|
||||
@ -170,11 +156,7 @@ class Template
|
||||
'The template "' . $template . '" not found.'
|
||||
);
|
||||
}
|
||||
if ($trim) {
|
||||
$content = Template::trim(ob_get_clean());
|
||||
} else {
|
||||
$content = ob_get_clean();
|
||||
}
|
||||
$content = ob_get_clean();
|
||||
|
||||
return $content;
|
||||
} catch (\LogicException $e) {
|
||||
|
||||
@ -82,19 +82,4 @@ class TemplateTest extends PMATestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for trim
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testTrim()
|
||||
{
|
||||
$html = file_get_contents(PMA\libraries\Template::BASE_PATH . 'test/trim.phtml');
|
||||
|
||||
$this->assertEquals(
|
||||
'outer <element>value</element> value',
|
||||
PMA\libraries\Template::trim($html)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ class TableIndexesControllerTest extends PMATestCase
|
||||
|
||||
// generateIndexSelector
|
||||
$this->assertContains(
|
||||
PMA\libraries\Template::trim($index->generateIndexChoiceSelector(false)),
|
||||
$index->generateIndexChoiceSelector(false),
|
||||
$html
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user