Replace if condition with a better code

Signed-off-by: Umair Khan <omerjerk@gmail.com>
This commit is contained in:
Umair Khan 2014-01-20 21:16:37 +05:30
parent 91548801bb
commit 0a5ea4dafb

View File

@ -30,11 +30,7 @@ class Node_Database_Container extends Node
$new = PMA_NodeFactory::getInstance(
'Node', _pgettext('Create new database', 'New')
);
if($GLOBALS['is_create_db_priv']) {
$new->isNew = true;
} else {
$new->isNew = false;
}
$new->isNew = $GLOBALS['is_create_db_priv'];
$new->icon = PMA_Util::getImage('b_newdb.png', '');
$new->links = array(
'text' => 'server_databases.php?server=' . $GLOBALS['server']