Sync token name, move it's definition to one place (bug #1569612).
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - ChangeLog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
|
||||||
|
2006-10-03 Michal Čihař <michal@cihar.com>
|
||||||
|
* scripts/setup.php: Sync token name, move it's definition to one place
|
||||||
|
(bug #1569612).
|
||||||
|
|
||||||
2006-10-01 Marc Delisle <lem9@users.sourceforge.net>
|
2006-10-01 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
### 2.9.0.1 released from MAINT_2_9_0
|
### 2.9.0.1 released from MAINT_2_9_0
|
||||||
* libraries/database_interface.lib.php: bug #1568341,
|
* libraries/database_interface.lib.php: bug #1568341,
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
* @version CVS: $Id$
|
* @version CVS: $Id$
|
||||||
*/
|
*/
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/* vim: expandtab sw=4 ts=4 sts=4: */
|
//vim: expandtab sw=4 ts=4 sts=4:
|
||||||
|
|
||||||
// Grab phpMyAdmin version and PMA_dl function
|
// Grab phpMyAdmin version and PMA_dl function
|
||||||
define( 'PMA_MINIMUM_COMMON', TRUE );
|
define( 'PMA_MINIMUM_COMMON', TRUE );
|
||||||
@@ -331,6 +331,15 @@ function get_hidden_cfg() {
|
|||||||
return '<input type="hidden" name="configuration" value="' . htmlspecialchars(serialize($configuration)) . '" />' . "\n";
|
return '<input type="hidden" name="configuration" value="' . htmlspecialchars(serialize($configuration)) . '" />' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns needed hidden input for forms.
|
||||||
|
*
|
||||||
|
* @return string HTML with hidden inputs
|
||||||
|
*/
|
||||||
|
function get_hidden_inputs() {
|
||||||
|
return '<input type="hidden" name="token" value="' . $_SESSION[' PMA_token '] . '" />';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates form for some action
|
* Creates form for some action
|
||||||
*
|
*
|
||||||
@@ -343,7 +352,7 @@ function get_hidden_cfg() {
|
|||||||
function get_action($name, $title, $added = '', $enabled = TRUE) {
|
function get_action($name, $title, $added = '', $enabled = TRUE) {
|
||||||
$ret = '';
|
$ret = '';
|
||||||
$ret .= '<form class="action" method="post" action="">';
|
$ret .= '<form class="action" method="post" action="">';
|
||||||
$ret .= '<input type="hidden" name="token" value="' . $_SESSION['PMA_token'] . '" />';
|
$ret .= get_hidden_inputs();
|
||||||
$ret .= '<input type="hidden" name="action" value="' . $name . '" />';
|
$ret .= '<input type="hidden" name="action" value="' . $name . '" />';
|
||||||
$ret .= $added;
|
$ret .= $added;
|
||||||
$ret .= '<input type="submit" value="' . $title . '"';
|
$ret .= '<input type="submit" value="' . $title . '"';
|
||||||
@@ -369,7 +378,7 @@ function get_action($name, $title, $added = '', $enabled = TRUE) {
|
|||||||
function get_url_action($url, $title, $params = array()) {
|
function get_url_action($url, $title, $params = array()) {
|
||||||
$ret = '';
|
$ret = '';
|
||||||
$ret .= '<form class="action" method="get" action="' . $url . '" target="_blank">';
|
$ret .= '<form class="action" method="get" action="' . $url . '" target="_blank">';
|
||||||
$ret .= '<input type="hidden" name="token" value="' . $_SESSION['PMA_token'] . '" />';
|
$ret .= get_hidden_inputs();
|
||||||
foreach ($params as $key => $val) {
|
foreach ($params as $key => $val) {
|
||||||
$ret .= '<input type="hidden" name="' . $key . '" value="' . $val . '" />';
|
$ret .= '<input type="hidden" name="' . $key . '" value="' . $val . '" />';
|
||||||
}
|
}
|
||||||
@@ -778,7 +787,7 @@ function show_config_form($list, $legend, $help, $defaults = array(), $save = ''
|
|||||||
function show_security_form($defaults = array()) {
|
function show_security_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="feat_security_real" />
|
<input type="hidden" name="action" value="feat_security_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -809,7 +818,7 @@ function show_security_form($defaults = array()) {
|
|||||||
function show_manual_form($defaults = array()) {
|
function show_manual_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="feat_manual_real" />
|
<input type="hidden" name="action" value="feat_manual_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -836,7 +845,7 @@ function show_charset_form($defaults = array()) {
|
|||||||
global $PMA_Config_Setup;
|
global $PMA_Config_Setup;
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="feat_charset_real" />
|
<input type="hidden" name="action" value="feat_charset_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -864,7 +873,7 @@ function show_charset_form($defaults = array()) {
|
|||||||
function show_extensions_form($defaults = array()) {
|
function show_extensions_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="feat_extensions_real" />
|
<input type="hidden" name="action" value="feat_extensions_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -890,7 +899,7 @@ function show_relation_form($defaults = array()) {
|
|||||||
global $PMA_Config_Setup;
|
global $PMA_Config_Setup;
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="feat_relation_real" />
|
<input type="hidden" name="action" value="feat_relation_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -918,7 +927,7 @@ function show_relation_form($defaults = array()) {
|
|||||||
function show_upload_form($defaults = array()) {
|
function show_upload_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="feat_upload_real" />
|
<input type="hidden" name="action" value="feat_upload_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -945,7 +954,7 @@ function show_upload_form($defaults = array()) {
|
|||||||
function show_server_form($defaults = array(), $number = FALSE) {
|
function show_server_form($defaults = array(), $number = FALSE) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="addserver_real" />
|
<input type="hidden" name="action" value="addserver_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -995,7 +1004,7 @@ function show_server_form($defaults = array(), $number = FALSE) {
|
|||||||
function show_left_form($defaults = array()) {
|
function show_left_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="lay_left_real" />
|
<input type="hidden" name="action" value="lay_left_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -1027,7 +1036,7 @@ function show_left_form($defaults = array()) {
|
|||||||
function show_tabs_form($defaults = array()) {
|
function show_tabs_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="lay_tabs_real" />
|
<input type="hidden" name="action" value="lay_tabs_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -1055,7 +1064,7 @@ function show_tabs_form($defaults = array()) {
|
|||||||
function show_icons_form($defaults = array()) {
|
function show_icons_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="lay_icons_real" />
|
<input type="hidden" name="action" value="lay_icons_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -1084,7 +1093,7 @@ function show_icons_form($defaults = array()) {
|
|||||||
function show_browse_form($defaults = array()) {
|
function show_browse_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="lay_browse_real" />
|
<input type="hidden" name="action" value="lay_browse_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -1114,7 +1123,7 @@ function show_browse_form($defaults = array()) {
|
|||||||
function show_edit_form($defaults = array()) {
|
function show_edit_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="lay_edit_real" />
|
<input type="hidden" name="action" value="lay_edit_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
@@ -1148,7 +1157,7 @@ function show_edit_form($defaults = array()) {
|
|||||||
function show_window_form($defaults = array()) {
|
function show_window_form($defaults = array()) {
|
||||||
?>
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['PMA_token']; ?>" />
|
<?php echo get_hidden_inputs();?>
|
||||||
<input type="hidden" name="action" value="lay_window_real" />
|
<input type="hidden" name="action" value="lay_window_real" />
|
||||||
<?php
|
<?php
|
||||||
echo get_hidden_cfg();
|
echo get_hidden_cfg();
|
||||||
|
Reference in New Issue
Block a user