Replace own string export in pmd with generic one.
This commit is contained in:
@@ -16,7 +16,7 @@ header('Content-Type: text/javascript; charset=UTF-8');
|
|||||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
|
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
|
||||||
|
|
||||||
// Avoid loading the full common.inc.php because this would add many
|
// Avoid loading the full common.inc.php because this would add many
|
||||||
// non-js-compatible stuff like DOCTYPE
|
// non-js-compatible stuff like DOCTYPE
|
||||||
define('PMA_MINIMUM_COMMON', true);
|
define('PMA_MINIMUM_COMMON', true);
|
||||||
require_once './libraries/common.inc.php';
|
require_once './libraries/common.inc.php';
|
||||||
// But this one is needed for PMA_escapeJsString()
|
// But this one is needed for PMA_escapeJsString()
|
||||||
@@ -50,6 +50,16 @@ $js_messages['strPasswordNotSame'] = $GLOBALS['strPasswordNotSame'];
|
|||||||
$js_messages['strGo'] = __('Go');
|
$js_messages['strGo'] = __('Go');
|
||||||
$js_messages['strCancel'] = __('Cancel');
|
$js_messages['strCancel'] = __('Cancel');
|
||||||
|
|
||||||
|
/* Designer */
|
||||||
|
$js_messages['strModifications'] = $GLOBALS['strModifications'];
|
||||||
|
$js_messages['strRelationDeleted'] = $GLOBALS['strRelationDeleted'];
|
||||||
|
$js_messages['strForeignKeyRelationAdded'] = $GLOBALS['strForeignKeyRelationAdded'];
|
||||||
|
$js_messages['strInternalRelationAdded'] = $GLOBALS['strInternalRelationAdded'];
|
||||||
|
$js_messages['strErrorRelationAdded'] = $GLOBALS['strErrorRelationAdded'];
|
||||||
|
$js_messages['strErrorRelationExists'] = $GLOBALS['strErrorRelationExists'];
|
||||||
|
$js_messages['strErrorSaveTable'] = $GLOBALS['strErrorSaveTable'];
|
||||||
|
$js_messages['strGeneralRelationFeat:strDisabled'] = $GLOBALS['strGeneralRelationFeat'] . ': ' . $GLOBALS['strDisabled'];
|
||||||
|
|
||||||
echo "var PMA_messages = new Array();\n";
|
echo "var PMA_messages = new Array();\n";
|
||||||
foreach ($js_messages as $name => $js_message) {
|
foreach ($js_messages as $name => $js_message) {
|
||||||
echo "PMA_messages['" . $name . "'] = '" . PMA_escapeJsString($js_message) . "';\n";
|
echo "PMA_messages['" . $name . "'] = '" . PMA_escapeJsString($js_message) . "';\n";
|
||||||
|
@@ -104,17 +104,17 @@ function PrintXML()
|
|||||||
//xmldoc.getElementsByTagName('root')[0].getAttribute("act")
|
//xmldoc.getElementsByTagName('root')[0].getAttribute("act")
|
||||||
|
|
||||||
if (root.getAttribute('act') == 'save_pos') {
|
if (root.getAttribute('act') == 'save_pos') {
|
||||||
layer_alert(strLang[root.getAttribute('return')]);
|
layer_alert(PMA_messages[root.getAttribute('return')]);
|
||||||
}
|
}
|
||||||
if (root.getAttribute('act') == 'relation_upd') {
|
if (root.getAttribute('act') == 'relation_upd') {
|
||||||
layer_alert(strLang[root.getAttribute('return')]);
|
layer_alert(PMA_messages[root.getAttribute('return')]);
|
||||||
if (root.getAttribute('b') == '1') {
|
if (root.getAttribute('b') == '1') {
|
||||||
contr.splice(root.getAttribute('K'), 1);
|
contr.splice(root.getAttribute('K'), 1);
|
||||||
Re_load();
|
Re_load();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (root.getAttribute('act') == 'relation_new') {
|
if (root.getAttribute('act') == 'relation_new') {
|
||||||
layer_alert(strLang[root.getAttribute('return')]);
|
layer_alert(PMA_messages[root.getAttribute('return')]);
|
||||||
if (root.getAttribute('b') == '1') {
|
if (root.getAttribute('b') == '1') {
|
||||||
var i = contr.length;
|
var i = contr.length;
|
||||||
var t1 = root.getAttribute('DB1') + '.' + root.getAttribute('T1');
|
var t1 = root.getAttribute('DB1') + '.' + root.getAttribute('T1');
|
||||||
|
@@ -39,21 +39,18 @@ echo '
|
|||||||
var LangSelectForeignKey = "' . PMA_escapeJsString($strSelectForeignKey) . '";
|
var LangSelectForeignKey = "' . PMA_escapeJsString($strSelectForeignKey) . '";
|
||||||
var LangPleaseSelectPrimaryOrUniqueKey = "' . PMA_escapeJsString($strPleaseSelectPrimaryOrUniqueKey) . '";
|
var LangPleaseSelectPrimaryOrUniqueKey = "' . PMA_escapeJsString($strPleaseSelectPrimaryOrUniqueKey) . '";
|
||||||
var LangIEnotSupport = "' . PMA_escapeJsString($strIEUnsupported) . '";
|
var LangIEnotSupport = "' . PMA_escapeJsString($strIEUnsupported) . '";
|
||||||
var LangChangeDisplay = "' . PMA_escapeJsString($strChangeDisplay) . '";
|
var LangChangeDisplay = "' . PMA_escapeJsString($strChangeDisplay) . '";';
|
||||||
|
|
||||||
var strLang = Array();
|
|
||||||
strLang["strModifications"] = "' . PMA_escapeJsString($strModifications) . '";
|
|
||||||
strLang["strRelationDeleted"] = "' . PMA_escapeJsString($strRelationDeleted) . '";
|
|
||||||
strLang["strForeignKeyRelationAdded"] = "' . PMA_escapeJsString($strForeignKeyRelationAdded). '";
|
|
||||||
strLang["strGeneralRelationFeat:strDisabled"] = "' . PMA_escapeJsString($strGeneralRelationFeat . ' : ' . $strDisabled) . '";
|
|
||||||
strLang["strInternalRelationAdded"] = "' . PMA_escapeJsString($strInternalRelationAdded) . '";
|
|
||||||
strLang["strErrorRelationAdded"] = "' . PMA_escapeJsString($strErrorRelationAdded) . '";
|
|
||||||
strLang["strErrorRelationExists"] = "' . PMA_escapeJsString($strErrorRelationExists) . '";
|
|
||||||
strLang["strErrorSaveTable"] = "' . PMA_escapeJsString($strErrorSaveTable) . '";';
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
|
<?php
|
||||||
|
$params = array('lang' => $GLOBALS['lang']);
|
||||||
|
if (isset($GLOBALS['db'])) {
|
||||||
|
$params['db'] = $GLOBALS['db'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<script src="js/messages.php<?php echo PMA_generate_common_url($params); ?>" type="text/javascript"></script>
|
||||||
<script src="pmd/scripts/ajax.js" type="text/javascript"></script>
|
<script src="pmd/scripts/ajax.js" type="text/javascript"></script>
|
||||||
<script src="pmd/scripts/move.js" type="text/javascript"></script>
|
<script src="pmd/scripts/move.js" type="text/javascript"></script>
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
|
Reference in New Issue
Block a user