PMA\libraries\navigation\nodes\Node::_getDatabasesToSearch PHP Method

_getDatabasesToSearch() private method

If a search clause is set it gets the highest priority while only_db gets the next priority. In case both are empty list of databases determined by GRANTs are used
private _getDatabasesToSearch ( string $searchClause ) : array
$searchClause string search clause
return array array of databases
    private function _getDatabasesToSearch($searchClause)
    {
        if (!empty($searchClause)) {
            $databases = array("%" . $GLOBALS['dbi']->escapeString($searchClause, true) . "%");
        } elseif (!empty($GLOBALS['cfg']['Server']['only_db'])) {
            $databases = $GLOBALS['cfg']['Server']['only_db'];
        } elseif (!empty($GLOBALS['dbs_to_test'])) {
            $databases = $GLOBALS['dbs_to_test'];
        }
        sort($databases);
        return $databases;
    }