Skip to content

Commit

Permalink
Merge pull request #14846 from Tithugues/feature/replace-if-return-by…
Browse files Browse the repository at this point in the history
…-return

Replace if+return by return
  • Loading branch information
MauricioFauth committed Jan 12, 2019
2 parents 65d2693 + 5b19bb6 commit 8c8d570
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
13 changes: 4 additions & 9 deletions libraries/classes/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,11 @@ public function gzencodeNeeded(): bool
$chromeAndGreaterThan43 = PMA_USR_BROWSER_AGENT == 'CHROME'
&& PMA_USR_BROWSER_VER >= 43; // see bug #4942

if (function_exists('gzencode')
return function_exists('gzencode')
&& ((! ini_get('zlib.output_compression')
&& ! $this->isGzHandlerEnabled())
|| $GLOBALS['save_on_server']
|| $chromeAndGreaterThan43)
) {
return true;
}

return false;
&& ! $this->isGzHandlerEnabled())
|| $GLOBALS['save_on_server']
|| $chromeAndGreaterThan43);
}

/**
Expand Down
9 changes: 2 additions & 7 deletions libraries/classes/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2180,7 +2180,7 @@ public function getRelationsAndStatus($condition, $db, $table)
*/
public function arePmadbTablesDefined()
{
if (empty($GLOBALS['cfg']['Server']['bookmarktable'])
return ! (empty($GLOBALS['cfg']['Server']['bookmarktable'])
|| empty($GLOBALS['cfg']['Server']['relation'])
|| empty($GLOBALS['cfg']['Server']['table_info'])
|| empty($GLOBALS['cfg']['Server']['table_coords'])
Expand All @@ -2198,12 +2198,7 @@ public function arePmadbTablesDefined()
|| empty($GLOBALS['cfg']['Server']['savedsearches'])
|| empty($GLOBALS['cfg']['Server']['central_columns'])
|| empty($GLOBALS['cfg']['Server']['designer_settings'])
|| empty($GLOBALS['cfg']['Server']['export_templates'])
) {
return false;
}

return true;
|| empty($GLOBALS['cfg']['Server']['export_templates']));
}

/**
Expand Down

0 comments on commit 8c8d570

Please sign in to comment.