Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxmujay <xmujay@gmail.com>2013-04-14 18:37:44 +0400
committerxmujay <xmujay@gmail.com>2013-04-14 18:37:44 +0400
commit99e6b13ba1af9ac361449ff0cca7d1baf897ef20 (patch)
tree0d768daf7c293ee8fa61541a931619d5ee243b29 /server_engines.php
parent1871c9007218fd3f407bc44859a8bddb04b35194 (diff)
refactor server_engines.php
Diffstat (limited to 'server_engines.php')
-rw-r--r--server_engines.php99
1 files changed, 51 insertions, 48 deletions
diff --git a/server_engines.php b/server_engines.php
index 7ca28d10aa..c4f28b6e81 100644
--- a/server_engines.php
+++ b/server_engines.php
@@ -1,7 +1,7 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
- * display list of server engines and additonal information about them
+ * display list of server engines and additional information about them
*
* @package PhpMyAdmin
*/
@@ -20,6 +20,7 @@ require 'libraries/StorageEngine.class.php';
/**
* Did the user request information about a certain storage engine?
*/
+$html = '';
if (empty($_REQUEST['engine'])
|| ! PMA_StorageEngine::isValid($_REQUEST['engine'])
) {
@@ -27,22 +28,22 @@ if (empty($_REQUEST['engine'])
/**
* Displays the sub-page heading
*/
- echo '<h2>' . "\n"
- . PMA_Util::getImage('b_engine.png')
- . "\n" . __('Storage Engines') . "\n"
- . '</h2>' . "\n";
+ $html .= '<h2>' . "\n"
+ . PMA_Util::getImage('b_engine.png')
+ . "\n" . __('Storage Engines') . "\n"
+ . '</h2>' . "\n";
/**
* Displays the table header
*/
- echo '<table class="noclick">' . "\n"
- . '<thead>' . "\n"
- . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
- . ' <th>' . __('Description') . '</th>' . "\n"
- . '</tr>' . "\n"
- . '</thead>' . "\n"
- . '<tbody>' . "\n";
+ $html .= '<table class="noclick">' . "\n"
+ . '<thead>' . "\n"
+ . '<tr><th>' . __('Storage Engine') . '</th>' . "\n"
+ . ' <th>' . __('Description') . '</th>' . "\n"
+ . '</tr>' . "\n"
+ . '</thead>' . "\n"
+ . '<tbody>' . "\n";
/**
@@ -50,24 +51,23 @@ if (empty($_REQUEST['engine'])
*/
$odd_row = true;
foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
- echo '<tr class="'
- . ($odd_row ? 'odd' : 'even')
- . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
- ? ' disabled'
- : '')
- . '">' . "\n"
- . ' <td><a rel="newpage" href="server_engines.php'
- . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
- . ' ' . htmlspecialchars($details['Engine']) . "\n"
- . ' </a></td>' . "\n"
- . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
- . '</tr>' . "\n";
+ $html .= '<tr class="'
+ . ($odd_row ? 'odd' : 'even')
+ . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
+ ? ' disabled' : '')
+ . '">' . "\n"
+ . ' <td><a rel="newpage" href="server_engines.php'
+ . PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
+ . ' ' . htmlspecialchars($details['Engine']) . "\n"
+ . ' </a></td>' . "\n"
+ . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
+ . '</tr>' . "\n";
$odd_row = !$odd_row;
}
unset($odd_row, $engine, $details);
- echo '</tbody>' . "\n"
- . '</table>' . "\n";
+ $html .= '</tbody>' . "\n"
+ . '</table>' . "\n";
} else {
@@ -76,54 +76,57 @@ if (empty($_REQUEST['engine'])
*/
$engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
- echo '<h2>' . "\n"
- . PMA_Util::getImage('b_engine.png')
- . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
- . ' ' . PMA_Util::showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
- . '</h2>' . "\n\n";
- echo '<p>' . "\n"
- . ' <em>' . "\n"
- . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
- . ' </em>' . "\n"
- . '</p>' . "\n\n";
+ $html .= '<h2>' . "\n"
+ . PMA_Util::getImage('b_engine.png')
+ . ' ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
+ . ' ' . PMA_Util::showMySQLDocu('', $engine_plugin->getMysqlHelpPage())
+ . "\n" . '</h2>' . "\n\n";
+ $html .= '<p>' . "\n"
+ . ' <em>' . "\n"
+ . ' ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
+ . ' </em>' . "\n"
+ . '</p>' . "\n\n";
$infoPages = $engine_plugin->getInfoPages();
if (! empty($infoPages) && is_array($infoPages)) {
- echo '<p>' . "\n"
- . ' <strong>[</strong>' . "\n";
+ $html .= '<p>' . "\n"
+ . ' <strong>[</strong>' . "\n";
if (empty($_REQUEST['page'])) {
- echo ' <strong>' . __('Variables') . '</strong>' . "\n";
+ $html .= ' <strong>' . __('Variables') . '</strong>' . "\n";
} else {
- echo ' <a href="server_engines.php'
+ $html .= ' <a href="server_engines.php'
. PMA_generate_common_url(array('engine' => $_REQUEST['engine']))
. '">' . __('Variables') . '</a>' . "\n";
}
foreach ($infoPages as $current => $label) {
- echo ' <strong>|</strong>' . "\n";
+ $html .= ' <strong>|</strong>' . "\n";
if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
- echo ' <strong>' . $label . '</strong>' . "\n";
+ $html .= ' <strong>' . $label . '</strong>' . "\n";
} else {
- echo ' <a href="server_engines.php'
+ $html .= ' <a href="server_engines.php'
. PMA_generate_common_url(
array('engine' => $_REQUEST['engine'], 'page' => $current)
- )
+ )
. '">' . htmlspecialchars($label) . '</a>' . "\n";
}
}
unset($current, $label);
- echo ' <strong>]</strong>' . "\n"
- . '</p>' . "\n\n";
+ $html .= ' <strong>]</strong>' . "\n"
+ . '</p>' . "\n\n";
}
unset($infoPages, $page_output);
if (! empty($_REQUEST['page'])) {
$page_output = $engine_plugin->getPage($_REQUEST['page']);
}
if (! empty($page_output)) {
- echo $page_output;
+ $html .= $page_output;
} else {
- echo '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
+ $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n"
. '</p>' . "\n"
. $engine_plugin->getHtmlVariables();
}
}
+$response = PMA_Response::getInstance();
+$response->addHTML($html);
+
?>