Merged branch official/master. Resolved merge conflicts introduced due to merging of Piotr and Martynas's branches
This commit is contained in:
3
setup/frames/.htaccess
Normal file
3
setup/frames/.htaccess
Normal file
@@ -0,0 +1,3 @@
|
||||
# This folder does not require access over HTTP
|
||||
# (the following directive denies access by default)
|
||||
Order allow,deny
|
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Config file view and save screen
|
||||
*
|
||||
* @package phpMyAdmin-setup
|
||||
* @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
|
||||
* @version $Id$
|
||||
* @package phpMyAdmin-setup
|
||||
*/
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
@@ -14,8 +13,9 @@ if (!defined('PHPMYADMIN')) {
|
||||
/**
|
||||
* Core libraries.
|
||||
*/
|
||||
require_once './setup/lib/FormDisplay.class.php';
|
||||
require_once './libraries/config/FormDisplay.class.php';
|
||||
require_once './setup/lib/index.lib.php';
|
||||
require_once './setup/lib/ConfigGenerator.class.php';
|
||||
|
||||
$config_readable = false;
|
||||
$config_writable = false;
|
||||
@@ -29,7 +29,7 @@ check_config_rw($config_readable, $config_writable, $config_exists);
|
||||
<tr>
|
||||
<td>
|
||||
<textarea cols="50" rows="20" name="textconfig" id="textconfig" spellcheck="false"><?php
|
||||
echo htmlspecialchars(ConfigFile::getInstance()->getConfigFile())
|
||||
echo htmlspecialchars(ConfigGenerator::getConfigFile())
|
||||
?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Form edit view
|
||||
*
|
||||
* @package phpMyAdmin-setup
|
||||
* @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
|
||||
* @version $Id$
|
||||
* @package phpMyAdmin-setup
|
||||
*/
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
@@ -14,36 +13,24 @@ if (!defined('PHPMYADMIN')) {
|
||||
/**
|
||||
* Core libraries.
|
||||
*/
|
||||
require_once './setup/lib/Form.class.php';
|
||||
require_once './setup/lib/FormDisplay.class.php';
|
||||
require_once './libraries/config/Form.class.php';
|
||||
require_once './libraries/config/FormDisplay.class.php';
|
||||
require_once './setup/lib/form_processing.lib.php';
|
||||
|
||||
$formsets = array(
|
||||
'features' => array(
|
||||
'forms' => array('Import_export', 'Security', 'Sql_queries', 'Other_core_settings')),
|
||||
'left_frame' => array(
|
||||
'forms' => array('Left_frame', 'Left_servers', 'Left_databases', 'Left_tables')),
|
||||
'main_frame' => array(
|
||||
'forms' => array('Startup', 'Browse', 'Edit', 'Tabs', 'Sql_box')),
|
||||
'import' => array(
|
||||
'forms' => array('Import_defaults')),
|
||||
'export' => array(
|
||||
'forms' => array('Export_defaults'))
|
||||
);
|
||||
require './libraries/config/setup.forms.php';
|
||||
|
||||
$formset_id = filter_input(INPUT_GET, 'formset');
|
||||
$mode = filter_input(INPUT_GET, 'mode');
|
||||
if (!isset($formsets[$formset_id])) {
|
||||
if (!isset($forms[$formset_id])) {
|
||||
die('Incorrect formset, check $formsets array in setup/frames/form.inc.php');
|
||||
}
|
||||
|
||||
$formset = $formsets[$formset_id];
|
||||
if (isset($GLOBALS['strSetupFormset_' . $formset_id])) {
|
||||
echo '<h2>' . $GLOBALS['strSetupFormset_' . $formset_id] . '</h2>';
|
||||
if (isset($GLOBALS['strConfigFormset_' . $formset_id])) {
|
||||
echo '<h2>' . $GLOBALS['strConfigFormset_' . $formset_id] . '</h2>';
|
||||
}
|
||||
$form_display = new FormDisplay();
|
||||
foreach ($formset['forms'] as $form_name) {
|
||||
$form_display->registerForm($form_name);
|
||||
foreach ($forms[$formset_id] as $form_name => $form) {
|
||||
$form_display->registerForm($form_name, $form);
|
||||
}
|
||||
process_formset($form_display);
|
||||
?>
|
||||
?>
|
@@ -2,9 +2,7 @@
|
||||
/**
|
||||
* Overview (main page)
|
||||
*
|
||||
* @package phpMyAdmin-setup
|
||||
* @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
|
||||
* @version $Id$
|
||||
* @package phpMyAdmin-setup
|
||||
*/
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
@@ -15,7 +13,7 @@ if (!defined('PHPMYADMIN')) {
|
||||
* Core libraries.
|
||||
*/
|
||||
require_once './libraries/display_select_lang.lib.php';
|
||||
require_once './setup/lib/FormDisplay.class.php';
|
||||
require_once './libraries/config/FormDisplay.class.php';
|
||||
require_once './setup/lib/index.lib.php';
|
||||
|
||||
// prepare unfiltered language list
|
||||
@@ -48,7 +46,8 @@ $config_writable = false;
|
||||
$config_exists = false;
|
||||
check_config_rw($config_readable, $config_writable, $config_exists);
|
||||
if (!$config_writable || !$config_readable) {
|
||||
messages_set('error', 'config_rw', 'CannotLoadConfig', PMA_lang('CannotLoadConfigMsg'));
|
||||
messages_set('error', 'config_rw', __('Cannot load or save configuration'),
|
||||
PMA_lang(__('Please create web server writable folder [em]config[/em] in phpMyAdmin top level directory as described in [a@Documentation.html#setup_script]documentation[/a]. Otherwise you will be only able to download or display it.')));
|
||||
}
|
||||
//
|
||||
// Check https connection
|
||||
@@ -56,11 +55,13 @@ if (!$config_writable || !$config_readable) {
|
||||
$is_https = !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
|
||||
if (!$is_https) {
|
||||
$text = __('You are not using a secure connection; all data (including potentially sensitive information, like passwords) is transferred unencrypted!');
|
||||
|
||||
if (!empty($_SERVER['REQUEST_URI']) && !empty($_SERVER['HTTP_HOST'])) {
|
||||
$text .= ' ' . PMA_lang('InsecureConnectionMsg2',
|
||||
$strInsecureConnectionMsg2 = __('If your server is also configured to accept HTTPS requests follow [a@%s]this link[/a] to use a secure connection.');
|
||||
$text .= ' ' . PMA_lang($strInsecureConnectionMsg2,
|
||||
'https://' . htmlspecialchars($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
|
||||
}
|
||||
messages_set('warning', 'no_https', 'InsecureConnection', $text);
|
||||
messages_set('warning', 'no_https', __('Insecure connection'), $text);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -110,10 +111,10 @@ display_form_top('index.php', 'get', array(
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th><?php echo __('Name') ?></th>
|
||||
<th>Authentication type</th>
|
||||
<th><?php echo __('Authentication type') ?></th>
|
||||
<th colspan="2">DSN</th>
|
||||
</tr>
|
||||
<?php foreach ($_SESSION['ConfigFile']['Servers'] as $id => $server): ?>
|
||||
<?php foreach ($cf->getServers() as $id => $server): ?>
|
||||
<tr>
|
||||
<td><?php echo $id ?></td>
|
||||
<td><?php echo $cf->getServerName($id) ?></td>
|
||||
@@ -186,7 +187,7 @@ if ($cf->getServerCount() > 0) {
|
||||
}
|
||||
$opts['values_disabled'][] = '-';
|
||||
|
||||
foreach ($_SESSION['ConfigFile']['Servers'] as $id => $server) {
|
||||
foreach ($cf->getServers() as $id => $server) {
|
||||
$opts['values'][(string)$id] = $cf->getServerName($id) . " [$id]";
|
||||
}
|
||||
} else {
|
||||
|
@@ -2,9 +2,7 @@
|
||||
/**
|
||||
* Menu items
|
||||
*
|
||||
* @package phpMyAdmin-setup
|
||||
* @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
|
||||
* @version $Id$
|
||||
* @package phpMyAdmin-setup
|
||||
*/
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
@@ -15,9 +13,10 @@ $separator = PMA_get_arg_separator('html');
|
||||
?>
|
||||
<ul>
|
||||
<li><a href="index.php"><?php echo __('Overview') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=features"><?php echo __('Features') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=left_frame"><?php echo __('Navigation frame') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=main_frame"><?php echo __('Main frame') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=import"><?php echo __('Import') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=export"><?php echo __('Export') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=Features"><?php echo __('Features') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=Sql_queries"><?php echo __('SQL queries') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=Left_frame"><?php echo __('Navigation frame') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=Main_frame"><?php echo __('Main frame') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=Import"><?php echo __('Import') ?></a></li>
|
||||
<li><a href="?page=form<?php echo $separator ?>formset=Export"><?php echo __('Export') ?></a></li>
|
||||
</ul>
|
||||
|
@@ -2,9 +2,7 @@
|
||||
/**
|
||||
* Server create and edit view
|
||||
*
|
||||
* @package phpMyAdmin-setup
|
||||
* @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
|
||||
* @version $Id$
|
||||
* @package phpMyAdmin-setup
|
||||
*/
|
||||
|
||||
if (!defined('PHPMYADMIN')) {
|
||||
@@ -14,10 +12,12 @@ if (!defined('PHPMYADMIN')) {
|
||||
/**
|
||||
* Core libraries.
|
||||
*/
|
||||
require_once './setup/lib/Form.class.php';
|
||||
require_once './setup/lib/FormDisplay.class.php';
|
||||
require_once './libraries/config/Form.class.php';
|
||||
require_once './libraries/config/FormDisplay.class.php';
|
||||
require_once './setup/lib/form_processing.lib.php';
|
||||
|
||||
require './libraries/config/setup.forms.php';
|
||||
|
||||
$mode = filter_input(INPUT_GET, 'mode');
|
||||
$id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
|
||||
|
||||
@@ -41,10 +41,8 @@ if (isset($page_title)) {
|
||||
echo '<h2>' . $page_title . '</h2>';
|
||||
}
|
||||
$form_display = new FormDisplay();
|
||||
$form_display->registerForm('Server', $id);
|
||||
$form_display->registerForm('Server_login_options', $id);
|
||||
$form_display->registerForm('Server_config', $id);
|
||||
$form_display->registerForm('Server_pmadb', $id);
|
||||
$form_display->registerForm('Server_tracking', $id);
|
||||
foreach ($forms['Servers'] as $form_name => $form) {
|
||||
$form_display->registerForm($form_name, $form, $id);
|
||||
}
|
||||
process_formset($form_display);
|
||||
?>
|
||||
?>
|
Reference in New Issue
Block a user