bug #1724217 [Create PHP Code] doesn't include newlines for text fields

This commit is contained in:
Sebastian Mendel
2007-12-14 10:09:42 +00:00
parent 899c69facd
commit b420984a06
2 changed files with 15 additions and 16 deletions

View File

@@ -24,7 +24,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
+ rfe #1741101, patch #1798184 UUID default for CHAR(36) PRIMARY KEY,
thanks to Gert Palok - gert_p
- bug #1664240 [GUI] css height makes cfg TextareaRows useless
- bug #1724217 [Create PHP Code] doesn't include newlines for text fields
2.11.4.0 (not yet released)
- bug #1843428 [GUI] Space issue with DROP/DELETE/ALTER TABLE
@@ -33,7 +33,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1843463 [GUI] DROP PROCEDURE does not show alert
- bug #1835904 [GUI] Back link after a SQL error forgets the query
- bug #1835654 [core] wrong escaping when using double quotes
- bug #1817612 [cookies] Wrong cookie path on IIS with PHP-CGI,
- bug #1817612 [cookies] Wrong cookie path on IIS with PHP-CGI,
thanks to Carsten Wiedmann
2.11.3.0 (2007-12-08)

View File

@@ -1030,11 +1030,10 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice')
/* SQL-Parser-Analyzer */
if (! empty($GLOBALS['show_as_php'])) {
$new_line = '\'<br />' . "\n" . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;. \' ';
/* SQL-Parser-Analyzer */
$query_base = PMA_sqlAddslashes(htmlspecialchars($sql_query), false, false, true);
/* SQL-Parser-Analyzer */
$query_base = preg_replace("@((\015\012)|(\015)|(\012))+@", $new_line, $query_base);
$new_line = '\\n"<br />' . "\n"
. '&nbsp;&nbsp;&nbsp;&nbsp;. "';
$query_base = htmlspecialchars(addslashes($sql_query));
$query_base = preg_replace('/((\015\012)|(\015)|(\012))/', $new_line, $query_base);
} else {
$query_base = $sql_query;
}
@@ -1082,7 +1081,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice')
}
if (! empty($GLOBALS['show_as_php'])) {
$query_base = '$sql = \'' . $query_base;
$query_base = '$sql = "' . $query_base;
} elseif (! empty($GLOBALS['validatequery'])) {
$query_base = PMA_validateSQL($query_base);
} elseif (isset($parsed_sql)) {
@@ -1210,7 +1209,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice')
//Clean up the end of the PHP
if (! empty($GLOBALS['show_as_php'])) {
echo '\';';
echo '";';
}
echo ' </div>';
echo '</fieldset>' . "\n";
@@ -1224,12 +1223,12 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice')
} // end of the 'PMA_showMessage()' function
/**
* Verifies if current MySQL server supports profiling
* Verifies if current MySQL server supports profiling
*
* @access public
* @return boolean whether profiling is supported
* @return boolean whether profiling is supported
*
* @author Marc Delisle
* @author Marc Delisle
*/
function PMA_profilingSupported() {
// 5.0.37 has profiling but for example, 5.1.20 does not
@@ -2311,13 +2310,13 @@ function PMA_externalBug($functionality, $component, $minimum_version, $bugref)
/**
* Generates a set of radio HTML fields
* Generates a set of radio HTML fields
*
* @uses htmlspecialchars()
* @param string $html_field_name the radio HTML field
* @param array $choices the choices values and labels
* @param string $checked_choice the choice to check by default
* @param boolean $line_break whether to add an HTML line break after a choice
* @param array $choices the choices values and labels
* @param string $checked_choice the choice to check by default
* @param boolean $line_break whether to add an HTML line break after a choice
*/
function PMA_generate_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true) {
foreach ($choices as $choice_value => $choice_label) {