Various coding style improvements
This commit is contained in:
parent
19ab7995f8
commit
cf3b086e7e
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Output buffering wrapper
|
||||
*
|
||||
@ -50,8 +49,8 @@ class PMA_OutputBuffering
|
||||
} elseif (function_exists('ob_get_level') && ob_get_level() > 0) {
|
||||
// If output buffering is enabled in php.ini it's not possible to
|
||||
// add the ob_gzhandler without a warning message from php 4.3.0.
|
||||
// Being better safe than sorry, check for any existing output handler
|
||||
// instead of just checking the 'output_buffering' setting.
|
||||
// Being better safe than sorry, check for any existing output
|
||||
// handler instead of just checking the 'output_buffering' setting.
|
||||
$mode = 0;
|
||||
} else {
|
||||
$mode = 1;
|
||||
|
||||
@ -11,6 +11,8 @@ if (! defined('PHPMYADMIN')) {
|
||||
|
||||
/**
|
||||
* Represents a database node in the navigation tree
|
||||
*
|
||||
* @package PhpMyAdmin-Navigation
|
||||
*/
|
||||
class Node_Database extends Node
|
||||
{
|
||||
|
||||
@ -33,7 +33,9 @@ class Node_Event_Container extends Node
|
||||
);
|
||||
$this->real_name = 'events';
|
||||
|
||||
$new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new event', 'New'));
|
||||
$new = PMA_NodeFactory::getInstance(
|
||||
'Node', _pgettext('Create new event', 'New')
|
||||
);
|
||||
$new->isNew = true;
|
||||
$new->icon = PMA_Util::getImage('b_event_add.png', '');
|
||||
$new->links = array(
|
||||
|
||||
@ -33,7 +33,9 @@ class Node_Function_Container extends Node
|
||||
);
|
||||
$this->real_name = 'functions';
|
||||
|
||||
$new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new function', 'New'));
|
||||
$new = PMA_NodeFactory::getInstance(
|
||||
'Node', _pgettext('Create new function', 'New')
|
||||
);
|
||||
$new->isNew = true;
|
||||
$new->icon = PMA_Util::getImage('b_routine_add.png', '');
|
||||
$new->links = array(
|
||||
|
||||
@ -35,7 +35,9 @@ class Node_Index_Container extends Node
|
||||
);
|
||||
$this->real_name = 'indexes';
|
||||
|
||||
$new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new index', 'New'));
|
||||
$new = PMA_NodeFactory::getInstance(
|
||||
'Node', _pgettext('Create new index', 'New')
|
||||
);
|
||||
$new->isNew = true;
|
||||
$new->icon = PMA_Util::getImage('b_index_add.png', '');
|
||||
$new->links = array(
|
||||
|
||||
@ -33,7 +33,9 @@ class Node_Procedure_Container extends Node
|
||||
);
|
||||
$this->real_name = 'procedures';
|
||||
|
||||
$new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new procedure', 'New'));
|
||||
$new = PMA_NodeFactory::getInstance(
|
||||
'Node', _pgettext('Create new procedure', 'New')
|
||||
);
|
||||
$new->isNew = true;
|
||||
$new->icon = PMA_Util::getImage('b_routine_add.png', '');
|
||||
$new->links = array(
|
||||
|
||||
@ -33,7 +33,9 @@ class Node_Trigger_Container extends Node
|
||||
);
|
||||
$this->real_name = 'triggers';
|
||||
|
||||
$new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new trigger', 'New'));
|
||||
$new = PMA_NodeFactory::getInstance(
|
||||
'Node', _pgettext('Create new trigger', 'New')
|
||||
);
|
||||
$new->isNew = true;
|
||||
$new->icon = PMA_Util::getImage('b_trigger_add.png', '');
|
||||
$new->links = array(
|
||||
|
||||
@ -33,7 +33,9 @@ class Node_View_Container extends Node
|
||||
);
|
||||
$this->real_name = 'views';
|
||||
|
||||
$new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new view', 'New'));
|
||||
$new = PMA_NodeFactory::getInstance(
|
||||
'Node', _pgettext('Create new view', 'New')
|
||||
);
|
||||
$new->isNew = true;
|
||||
$new->icon = PMA_Util::getImage('b_view_add.png', '');
|
||||
$new->links = array(
|
||||
|
||||
@ -44,6 +44,8 @@ abstract class TransformationsPlugin extends PluginObserver
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
abstract public function applyTransformation($buffer, $options = array(), $meta = '');
|
||||
abstract public function applyTransformation(
|
||||
$buffer, $options = array(), $meta = ''
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
@ -26,7 +26,7 @@ function PMA_RTE_getFooterLinks($docu, $priv, $name)
|
||||
$retval = "";
|
||||
$retval .= "<!-- ADD " . $name . " FORM START -->\n";
|
||||
$retval .= "<fieldset class='left'>\n";
|
||||
$retval .= " <legend>" . _pgettext('Create new procedure', 'New') . "</legend>\n";
|
||||
$retval .= "<legend>" . _pgettext('Create new procedure', 'New') . "</legend>\n";
|
||||
$retval .= " <div class='wrap'>\n";
|
||||
if (PMA_Util::currentUserHasPrivilege($priv, $db)) {
|
||||
$retval .= " <a {$ajax_class['add']} ";
|
||||
|
||||
@ -93,8 +93,8 @@ function PMA_TRI_handleEditor()
|
||||
)
|
||||
. '<br />'
|
||||
. __('MySQL said: ') . PMA_DBI_getError(null);
|
||||
// We dropped the old item, but were unable to create the new one
|
||||
// Try to restore the backup query
|
||||
// We dropped the old item, but were unable to create the
|
||||
// new one. Try to restore the backup query.
|
||||
$result = PMA_DBI_try_query($create_item);
|
||||
if (! $result) {
|
||||
// OMG, this is really bad! We dropped the query,
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Helper functions for RTE
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Shared code for server pages
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
|
||||
@ -89,7 +89,11 @@ if (! isset($_COOKIE[$session_name])) {
|
||||
* Session initialization is done before selecting language, so we
|
||||
* can not use translations here.
|
||||
*/
|
||||
PMA_fatalError('Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.');
|
||||
PMA_fatalError(
|
||||
'Cannot start session without errors, please check errors given '
|
||||
. 'in your PHP and/or webserver log file and configure your PHP '
|
||||
. 'installation properly.'
|
||||
);
|
||||
}
|
||||
unset($orig_error_count);
|
||||
} else {
|
||||
|
||||
@ -67,7 +67,8 @@ function PMA_validateSQL($sql)
|
||||
) {
|
||||
$str = sprintf(
|
||||
__('The SQL validator could not be initialized. Please check if you have installed the necessary PHP extensions as described in the %sdocumentation%s.'),
|
||||
'<a href="' . PMA_Util::getDocuLink('faq', 'faqsqlvalidator') . '" target="documentation">',
|
||||
'<a href="' . PMA_Util::getDocuLink('faq', 'faqsqlvalidator')
|
||||
. '" target="documentation">',
|
||||
'</a>'
|
||||
);
|
||||
} else {
|
||||
|
||||
@ -105,7 +105,7 @@ if (empty($_REQUEST['engine'])
|
||||
$html .= ' <a href="server_engines.php'
|
||||
. PMA_generate_common_url(
|
||||
array('engine' => $_REQUEST['engine'], 'page' => $current)
|
||||
)
|
||||
)
|
||||
. '">' . htmlspecialchars($label) . '</a>' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,8 @@ $server_exists = !empty($id) && $cf->get("Servers/$id") !== null;
|
||||
|
||||
if ($mode == 'edit' && $server_exists) {
|
||||
$page_title = __('Edit server')
|
||||
. ' ' . $id . ' <small>(' . htmlspecialchars($cf->getServerDSN($id)) . ')</small>';
|
||||
. ' ' . $id
|
||||
. ' <small>(' . htmlspecialchars($cf->getServerDSN($id)) . ')</small>';
|
||||
} elseif ($mode == 'remove' && $server_exists) {
|
||||
$cf->removeServer($id);
|
||||
header('Location: index.php');
|
||||
|
||||
@ -19,7 +19,7 @@ require_once 'libraries/Config.class.php';
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
|
||||
class PMA_expandUserString_Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
|
||||
@ -151,7 +151,8 @@ if (! defined('PMA_MINIMUM_COMMON') && ! defined('TESTSUITE')) {
|
||||
#pma_navigation_tree div.block i.first { /* Removes top segment */
|
||||
border-<?php echo $left; ?>: 0;
|
||||
}
|
||||
#pma_navigation_tree div.block b { /* Bottom segment for the tree element connections */
|
||||
/* Bottom segment for the tree element connections */
|
||||
#pma_navigation_tree div.block b {
|
||||
display: block;
|
||||
height: 0.75em;
|
||||
bottom: 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user