These checks are redundant. <feature>work variables should always be defined unless in an upgrade
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
86e1510b9a
commit
ad49ae971e
@ -22,7 +22,7 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
$savedSearchList = array();
|
||||
$savedSearch = null;
|
||||
$currentSearchId = null;
|
||||
if (isset($cfgRelation['savedsearcheswork']) && $cfgRelation['savedsearcheswork']) {
|
||||
if ($cfgRelation['savedsearcheswork']) {
|
||||
include 'libraries/SavedSearches.class.php';
|
||||
$header = $response->getHeader();
|
||||
$scripts = $header->getScripts();
|
||||
|
||||
@ -129,7 +129,7 @@ class PMA_Menu
|
||||
{
|
||||
$allowedTabs = PMA_Util::getMenuTabList($level);
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (isset($cfgRelation['menuswork']) && $cfgRelation['menuswork']) {
|
||||
if ($cfgRelation['menuswork']) {
|
||||
$groupTable = PMA_Util::backquote($cfgRelation['db'])
|
||||
. "."
|
||||
. PMA_Util::backquote($cfgRelation['usergroups']);
|
||||
@ -500,7 +500,6 @@ class PMA_Menu
|
||||
}
|
||||
|
||||
if (! $db_is_system_schema
|
||||
&& isset($cfgRelation['centralcolumnswork'])
|
||||
&& $cfgRelation['centralcolumnswork']
|
||||
) {
|
||||
$tabs['central_columns']['text'] = __('Central columns');
|
||||
|
||||
@ -27,9 +27,7 @@ function PMA_centralColumnsGetParams()
|
||||
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
if (isset($cfgRelation['centralcolumnswork'])
|
||||
&& $cfgRelation['centralcolumnswork']
|
||||
) {
|
||||
if ($cfgRelation['centralcolumnswork']) {
|
||||
$cfgCentralColumns = array(
|
||||
'user' => $GLOBALS['cfg']['Server']['user'],
|
||||
'db' => $cfgRelation['db'],
|
||||
|
||||
@ -798,7 +798,7 @@ class Node
|
||||
public function getNavigationHidingData()
|
||||
{
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) {
|
||||
if ($cfgRelation['navwork']) {
|
||||
$navTable = PMA_Util::backquote($cfgRelation['db'])
|
||||
. "." . PMA_Util::backquote($cfgRelation['navigationhiding']);
|
||||
$sqlQuery = "SELECT `db_name`, COUNT(*) AS `count` FROM " . $navTable
|
||||
|
||||
@ -360,7 +360,7 @@ class Node_Database extends Node
|
||||
|
||||
// Remove hidden items so that they are not displayed in navigation tree
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) {
|
||||
if ($cfgRelation['navwork']) {
|
||||
$hiddenItems = $this->getHiddenItems(substr($type, 0, -1));
|
||||
foreach ($retval as $key => $item) {
|
||||
if (in_array($item, $hiddenItems)) {
|
||||
@ -648,7 +648,7 @@ class Node_Database extends Node
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) {
|
||||
if ($cfgRelation['navwork']) {
|
||||
if ($this->hiddenCount > 0) {
|
||||
$ret = '<span class="dbItemControls">'
|
||||
. '<a href="navigation.php'
|
||||
|
||||
@ -34,7 +34,7 @@ abstract class Node_DatabaseChild extends Node
|
||||
{
|
||||
$ret = '';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) {
|
||||
if ($cfgRelation['navwork']) {
|
||||
$db = $this->realParent()->real_name;
|
||||
$item = $this->real_name;
|
||||
$ret = '<span class="navItemControls">'
|
||||
|
||||
@ -203,9 +203,7 @@ function PMA_relationsCleanupDatabase($db)
|
||||
PMA_queryAsControlUser($remove_query);
|
||||
}
|
||||
|
||||
if (isset($cfgRelation['centralcolumnswork'])
|
||||
&& $cfgRelation['centralcolumnswork']
|
||||
) {
|
||||
if ($cfgRelation['centralcolumnswork']) {
|
||||
$remove_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db'])
|
||||
. '.' . PMA_Util::backquote($cfgRelation['central_columns'])
|
||||
. ' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\'';
|
||||
|
||||
@ -2630,7 +2630,7 @@ function PMA_getExtraDataForAjaxBehavior(
|
||||
. '</td>' . "\n";
|
||||
}
|
||||
|
||||
if (isset($cfgRelation['menuswork']) && $user_group_count > 0) {
|
||||
if ($cfgRelation['menuswork'] && $user_group_count > 0) {
|
||||
$new_user_string .= '<td>'
|
||||
. PMA_getUserGroupEditLink($username)
|
||||
. '</td>' . "\n";
|
||||
|
||||
@ -356,9 +356,7 @@ function PMA_getHtmlForCheckAllTables($pmaThemeImage, $text_dir,
|
||||
$html_output .= '</optgroup>';
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['cfgRelation']['centralcolumnswork'])
|
||||
&& $GLOBALS['cfgRelation']['centralcolumnswork']
|
||||
) {
|
||||
if ($GLOBALS['cfgRelation']['centralcolumnswork']) {
|
||||
$html_output .= '<optgroup label="' . __('Central columns') . '">';
|
||||
$html_output .= '<option value="sync_unique_columns_central_list" >'
|
||||
. __('Add columns to central list') . '</option>' . "\n";
|
||||
@ -1567,9 +1565,7 @@ function PMA_getHtmlForCheckAllTableColumn($pmaThemeImage, $text_dir,
|
||||
__('Fulltext'), 'b_ftext.png', 'ftext'
|
||||
);
|
||||
}
|
||||
if (isset($GLOBALS['cfgRelation']['centralcolumnswork'])
|
||||
&& $GLOBALS['cfgRelation']['centralcolumnswork']
|
||||
) {
|
||||
if ($GLOBALS['cfgRelation']['centralcolumnswork']) {
|
||||
$html_output .= PMA_Util::getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_central_columns_add',
|
||||
__('Add to central columns'), 'centralColumns_add.png',
|
||||
@ -2190,9 +2186,7 @@ function PMA_getHtmlForActionsInTableStructure($type, $tbl_storage_engine,
|
||||
);
|
||||
}
|
||||
$html_output .= PMA_getHtmlForDistinctValueAction($url_query, $row, $titles);
|
||||
if (isset($GLOBALS['cfgRelation']['centralcolumnswork'])
|
||||
&& $GLOBALS['cfgRelation']['centralcolumnswork']
|
||||
) {
|
||||
if ($GLOBALS['cfgRelation']['centralcolumnswork']) {
|
||||
$html_output .= '<li class="browse nowrap">';
|
||||
if ($isInCentralColumns) {
|
||||
$html_output .=
|
||||
|
||||
@ -29,7 +29,7 @@ if (isset($_REQUEST['getNaviSettings']) && $_REQUEST['getNaviSettings']) {
|
||||
}
|
||||
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
if (isset($cfgRelation['navwork']) && $cfgRelation['navwork']) {
|
||||
if ($cfgRelation['navwork']) {
|
||||
if (isset($_REQUEST['hideNavItem'])) {
|
||||
if (! empty($_REQUEST['itemName'])
|
||||
&& ! empty($_REQUEST['itemType'])
|
||||
|
||||
@ -29,7 +29,6 @@ $scripts->addFile('server_privileges.js');
|
||||
|
||||
if ((isset($_REQUEST['viewing_mode'])
|
||||
&& $_REQUEST['viewing_mode'] == 'server')
|
||||
&& isset($GLOBALS['cfgRelation']['menuswork'])
|
||||
&& $GLOBALS['cfgRelation']['menuswork']
|
||||
) {
|
||||
include_once 'libraries/server_users.lib.php';
|
||||
|
||||
@ -32,8 +32,7 @@ if (empty($title)) {
|
||||
value="<?php if (isset($columnMeta['Field']))
|
||||
echo htmlspecialchars($columnMeta['Field']); ?>" />
|
||||
|
||||
<?php if (isset($cfgRelation['centralcolumnswork'])
|
||||
&& $cfgRelation['centralcolumnswork']
|
||||
<?php if ($cfgRelation['centralcolumnswork']
|
||||
&& !(isset($columnMeta['column_status'])
|
||||
&& !$columnMeta['column_status']['isEditable'])
|
||||
): ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user