Skip to content

Commit

Permalink
Resolve conflict in tbl_zoom_select.php
Browse files Browse the repository at this point in the history
  • Loading branch information
atul516 committed Jun 15, 2012
2 parents 14922e2 + 69bdaed commit 1bff879
Show file tree
Hide file tree
Showing 150 changed files with 2,935 additions and 2,860 deletions.
5 changes: 2 additions & 3 deletions Documentation.html
Expand Up @@ -2700,9 +2700,8 @@ <h4 id="faq1_6">

<p> This seems to be a PWS bug. Filippo Simoncini found a workaround (at this
time there is no better fix): remove or comment the <code>DOCTYPE</code>
declarations (2 lines) from the scripts <em>libraries/header.inc.php</em>,
<em>libraries/header_printview.inc.php</em>, <em>index.php</em>,
<em>navigation.php</em> and <em>libraries/common.lib.php</em>.</p>
declarations (2 lines) from the scripts <em>libraries/Header.class.php</em>
and <em>index.php</em>.</p>

<h4 id="faq1_7">
<a href="#faq1_7">1.7 How can I GZip or Bzip a dump or a
Expand Down
166 changes: 74 additions & 92 deletions browse_foreigners.php
Expand Up @@ -6,24 +6,23 @@
* @package PhpMyAdmin
*/

/**
* Gets a core script and starts output buffering work
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/transformations.lib.php';

$field = $_REQUEST['field'];

PMA_checkParameters(array('db', 'table', 'field'));

require_once 'libraries/ob.lib.php';
PMA_outBufferPre();

require_once 'libraries/header_http.inc.php';
$response = PMA_Response::getInstance();
$response->getFooter()->setMinimal();
$header = $response->getHeader();
$header->disableMenu();
$header->setBodyId('body_browse_foreigners');

/**
* Displays the frame
*/
require_once 'libraries/transformations.lib.php'; // Transformations

$cfgRelation = PMA_getRelationsParam();
$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : false);

Expand Down Expand Up @@ -79,93 +78,79 @@
);
}
}
?>
<?php
$current_language = $available_languages[$lang][1];
?>
<!DOCTYPE HTML>
<html lang="<?php echo $current_language; ?>" dir="<?php echo $text_dir; ?>">

<head>
<title>phpMyAdmin</title>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css"
href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
<?php
// includes everything asked for by libraries/common.inc.php
require_once 'libraries/header_scripts.inc.php';
?>
<script type="text/javascript">
//<![CDATA[
self.focus();
function formupdate(fieldmd5, key) {
var $inline = window.opener.jQuery('.browse_foreign_clicked');
if ($inline.length != 0) {
$inline.removeClass('browse_foreign_clicked')
// for grid editing,
// puts new value in the previous element which is
// a span with class curr_value
.prev('.curr_value').text(key);
// for zoom-search editing, puts new value in the previous
// element which is an input field
$inline.prev('input[type=text]').val(key);
self.close();
return false;
}

if (opener && opener.document && opener.document.insertForm) {
var field = 'fields';
var field_null = 'fields_null';

<?php
if (isset($rownumber)) {
?>
var element_name = field + '[multi_edit][<?php echo htmlspecialchars($rownumber); ?>][' + fieldmd5 + ']';
var null_name = field_null + '[multi_edit][<?php echo htmlspecialchars($rownumber); ?>][' + fieldmd5 + ']';
<?php
} else {
?>
var element_name = field + '[]';
<?php
}
?>

<?php
if (isset($fieldkey) && is_numeric($fieldkey)) {
?>
var element_name_alt = field + '[<?php echo $fieldkey; ?>]';
<?php
} else {
?>
var element_name_alt = field + '[0]';
<?php
}
?>

if (opener.document.insertForm.elements[element_name]) {
// Edit/Insert form
opener.document.insertForm.elements[element_name].value = key;
if (opener.document.insertForm.elements[null_name]) {
opener.document.insertForm.elements[null_name].checked = false;
}
self.close();
return false;
} else if (opener.document.insertForm.elements[element_name_alt]) {
// Search form
opener.document.insertForm.elements[element_name_alt].value = key;
self.close();
return false;


if (isset($rownumber)) {
$element_name = " var element_name = field + '[multi_edit]["
. htmlspecialchars($rownumber) . "][' + fieldmd5 + ']';\n"
. " var null_name = field_null + '[multi_edit]["
. htmlspecialchars($rownumber) . "][' + fieldmd5 + ']';\n";
} else {
$element_name = "var element_name = field + '[]'";
}
$error = PMA_jsFormat(
__(
'The target browser window could not be updated. '
. 'Maybe you have closed the parent window, or '
. 'your browser\'s security settings are '
. 'configured to block cross-window updates.'
)
);


if (! isset($fieldkey) || ! is_numeric($fieldkey)) {
$fieldkey = 0;
}

$code = <<<EOC
self.focus();
function formupdate(fieldmd5, key) {
var \$inline = window.opener.jQuery('.browse_foreign_clicked');
if (\$inline.length != 0) {
\$inline.removeClass('browse_foreign_clicked')
// for grid editing,
// puts new value in the previous element which is
// a span with class curr_value
.prev('.curr_value').text(key);
// for zoom-search editing, puts new value in the previous
// element which is an input field
\$inline.prev('input[type=text]').val(key);
self.close();
return false;
}
if (opener && opener.document && opener.document.insertForm) {
var field = 'fields';
var field_null = 'fields_null';
$element_name
var element_name_alt = field + '[$fieldkey]';
if (opener.document.insertForm.elements[element_name]) {
// Edit/Insert form
opener.document.insertForm.elements[element_name].value = key;
if (opener.document.insertForm.elements[null_name]) {
opener.document.insertForm.elements[null_name].checked = false;
}
self.close();
return false;
} else if (opener.document.insertForm.elements[element_name_alt]) {
// Search form
opener.document.insertForm.elements[element_name_alt].value = key;
self.close();
return false;
}

alert('<?php echo PMA_jsFormat(__('The target browser window could not be updated. Maybe you have closed the parent window, or your browser\'s security settings are configured to block cross-window updates.')); ?>');
}
//]]>
</script>
</head>
<body id="body_browse_foreigners">
alert('$error');
}
EOC;

$header->getScripts()->addCode($code);

?>
<form action="browse_foreigners.php" method="post">
<fieldset>
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
Expand Down Expand Up @@ -337,6 +322,3 @@ function formupdate(fieldmd5, key) {
?>
</tbody>
</table>

</body>
</html>
19 changes: 4 additions & 15 deletions chk_rel.php
Expand Up @@ -6,21 +6,10 @@
* @package PhpMyAdmin
*/

/**
* Gets some core libraries
*/
require_once 'libraries/common.inc.php';
require_once 'libraries/header.inc.php';

$response = PMA_Response::getInstance();
$response->addHTML(
PMA_getRelationsParamDiagnostic(PMA_getRelationsParam())
);

/**
* Gets the relation settings
*/
$cfgRelation = PMA_getRelationsParam(true);


/**
* Displays the footer
*/
require 'libraries/footer.inc.php';
?>
32 changes: 12 additions & 20 deletions db_create.php
Expand Up @@ -9,7 +9,6 @@
* Gets some core libraries
*/
require_once 'libraries/common.inc.php';
$GLOBALS['js_include'][] = 'functions.js';

require_once 'libraries/mysql_charsets.lib.php';
if (! PMA_DRIZZLE) {
Expand Down Expand Up @@ -62,14 +61,15 @@
$GLOBALS['table'] = '';

/**
* If in an Ajax request, just display the message with {@link PMA_ajaxResponse}
* If in an Ajax request, just display the message with {@link PMA_Response}
*/
if ($GLOBALS['is_ajax_request'] == true) {
PMA_ajaxResponse($message, false);
$response = PMA_Response::getInstance();
$response->isSuccess(false);
$response->addJSON('message', $message);
} else {
include_once 'main.php';
}

include_once 'libraries/header.inc.php';
include_once 'main.php';
} else {
$message = PMA_Message::success(__('Database %1$s has been created.'));
$message->addParam($new_db);
Expand All @@ -79,14 +79,6 @@
* If in an Ajax request, build the output and send it
*/
if ($GLOBALS['is_ajax_request'] == true) {

/**
* String containing the SQL Query formatted in pretty HTML
* @global array $GLOBALS['extra_data']
* @name $extra_data
*/
$extra_data['sql_query'] = PMA_getMessage(null, $sql_query, 'success');

//Construct the html for the new database, so that it can be appended to
// the list of databases on server_databases.php

Expand Down Expand Up @@ -140,12 +132,12 @@

$new_db_string .= '</tr>';

$extra_data['new_db_string'] = $new_db_string;

PMA_ajaxResponse($message, true, $extra_data);
$response = PMA_Response::getInstance();
$response->addJSON('message', $message);
$response->addJSON('new_db_string', $new_db_string);
$response->addJSON('sql_query', PMA_getMessage(null, $sql_query, 'success'));
} else {
include_once '' . $cfg['DefaultTabDatabase'];
}

include_once 'libraries/header.inc.php';
include_once '' . $cfg['DefaultTabDatabase'];
}
?>
1 change: 0 additions & 1 deletion db_datadict.php
Expand Up @@ -283,5 +283,4 @@
*/
PMA_printButton();

require 'libraries/footer.inc.php';
?>
9 changes: 6 additions & 3 deletions db_events.php
Expand Up @@ -15,9 +15,12 @@
/**
* Include JavaScript libraries
*/
$GLOBALS['js_include'][] = 'jquery/timepicker.js';
$GLOBALS['js_include'][] = 'rte/common.js';
$GLOBALS['js_include'][] = 'rte/events.js';
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('jquery/timepicker.js');
$scripts->addFile('rte/common.js');
$scripts->addFile('rte/events.js');

/**
* Include all other files
Expand Down
10 changes: 4 additions & 6 deletions db_export.php
Expand Up @@ -11,7 +11,10 @@
*/
require_once 'libraries/common.inc.php';

$GLOBALS['js_include'][] = 'export.js';
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('export.js');

// $sub_part is also used in db_info.inc.php to see if we are coming from
// db_export.php, in which case we don't obey $cfg['MaxTableList']
Expand All @@ -28,7 +31,6 @@
// exit if no tables in db found
if ($num_tables < 1) {
PMA_Message::error(__('No tables found in database.'))->display();
include 'libraries/footer.inc.php';
exit;
} // end if

Expand Down Expand Up @@ -81,8 +83,4 @@
$export_type = 'database';
require_once 'libraries/display_export.lib.php';

/**
* Displays the footer
*/
require 'libraries/footer.inc.php';
?>
9 changes: 4 additions & 5 deletions db_import.php
Expand Up @@ -10,7 +10,10 @@
*/
require_once 'libraries/common.inc.php';

$GLOBALS['js_include'][] = 'import.js';
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('import.js');

/**
* Gets tables informations and displays top links
Expand All @@ -21,9 +24,5 @@
$import_type = 'database';
require 'libraries/display_import.lib.php';

/**
* Displays the footer
*/
require 'libraries/footer.inc.php';
?>

0 comments on commit 1bff879

Please sign in to comment.