You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-29 21:24:44 +03:00
oop: fix ExportLatex
This commit is contained in:
@@ -3460,6 +3460,10 @@ class PMA_CommonFunctions
|
||||
*
|
||||
* @param string $string Text where to do expansion.
|
||||
* @param function $escape Function to call for escaping variable values.
|
||||
* Can also be an array of:
|
||||
* - the escape method name
|
||||
* - the class that contains the method
|
||||
* - location of the class (for inclusion)
|
||||
* @param array $updates Array with overrides for default parameters
|
||||
* (obtained from GLOBALS).
|
||||
*
|
||||
@@ -3507,10 +3511,19 @@ class PMA_CommonFunctions
|
||||
|
||||
/* Optional escaping */
|
||||
if (! is_null($escape)) {
|
||||
if (is_array($escape)) {
|
||||
require_once $escape[2];
|
||||
$escape_class = new $escape[1];
|
||||
$escape_method = $escape[0];
|
||||
}
|
||||
foreach ($replace as $key => $val) {
|
||||
$replace[$key] = ($escape == 'backquote')
|
||||
? $this->$escape($val)
|
||||
: $escape($val);
|
||||
if (is_array($escape)) {
|
||||
$replace[$key] = $escape_class->$escape_method($val);
|
||||
} else {
|
||||
$replace[$key] = ($escape == 'backquote')
|
||||
? $this->$escape($val)
|
||||
: $escape($val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -311,7 +311,11 @@ class ExportLatex extends ExportPlugin
|
||||
$buffer .= ' \\caption{'
|
||||
. $common_functions->expandUserString(
|
||||
$GLOBALS['latex_data_caption'],
|
||||
get_class($this) . '->texEscape',
|
||||
array(
|
||||
'texEscape',
|
||||
get_class($this),
|
||||
'libraries/plugins/export/' . get_class($this) . ".class.php"
|
||||
),
|
||||
array('table' => $table, 'database' => $db)
|
||||
)
|
||||
. '} \\label{'
|
||||
@@ -343,7 +347,11 @@ class ExportLatex extends ExportPlugin
|
||||
'\\caption{'
|
||||
. $common_functions->expandUserString(
|
||||
$GLOBALS['latex_data_continued_caption'],
|
||||
get_class($this) . '->texEscape',
|
||||
array(
|
||||
'texEscape',
|
||||
get_class($this),
|
||||
'libraries/plugins/export/' . get_class($this) . ".class.php"
|
||||
),
|
||||
array('table' => $table, 'database' => $db)
|
||||
)
|
||||
. '} \\\\ '
|
||||
@@ -513,7 +521,11 @@ class ExportLatex extends ExportPlugin
|
||||
$buffer .= ' \\caption{'
|
||||
. $common_functions->expandUserString(
|
||||
$GLOBALS['latex_structure_caption'],
|
||||
get_class($this) . '->texEscape',
|
||||
array(
|
||||
'texEscape',
|
||||
get_class($this),
|
||||
'libraries/plugins/export/' . get_class($this) . ".class.php"
|
||||
),
|
||||
array('table' => $table, 'database' => $db)
|
||||
)
|
||||
. '} \\label{'
|
||||
@@ -531,7 +543,11 @@ class ExportLatex extends ExportPlugin
|
||||
$buffer .= ' \\caption{'
|
||||
. $common_functions->expandUserString(
|
||||
$GLOBALS['latex_structure_continued_caption'],
|
||||
get_class($this) . '->texEscape',
|
||||
array(
|
||||
'texEscape',
|
||||
get_class($this),
|
||||
'libraries/plugins/export/' . get_class($this) . ".class.php"
|
||||
),
|
||||
array('table' => $table, 'database' => $db)
|
||||
)
|
||||
. '} \\\\ ' . $crlf;
|
||||
|
||||
Reference in New Issue
Block a user