diff options
author | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-08-23 02:47:28 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-08-23 02:51:27 +0300 |
commit | e2c83b954b9aa58d3ada9ff0c857af0115618cdf (patch) | |
tree | 08c59269958f74021c6ed7d94dccece04d61c6c3 /tbl_relation.php | |
parent | 8256945ec2f79155f8dae765118efe1201d1436c (diff) |
Refactor relation functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'tbl_relation.php')
-rw-r--r-- | tbl_relation.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tbl_relation.php b/tbl_relation.php index 1782198563..33d1cc61a5 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -16,6 +16,7 @@ use PhpMyAdmin\Controllers\Table\TableRelationController; use PhpMyAdmin\Di\Container; +use PhpMyAdmin\Relation; use PhpMyAdmin\Response; use PhpMyAdmin\Table; use PhpMyAdmin\Util; @@ -41,7 +42,7 @@ $options_array = array( 'NO_ACTION' => 'NO ACTION', 'RESTRICT' => 'RESTRICT', ); -$cfgRelation = PMA_getRelationsParam(); +$cfgRelation = Relation::getRelationsParam(); $tbl_storage_engine = mb_strtoupper( $dbi->getTable($db, $table)->getStatusInfo('Engine') ); @@ -54,17 +55,17 @@ $dependency_definitions = array( "upd_query" => $upd_query ); if ($cfgRelation['relwork']) { - $dependency_definitions['existrel'] = PMA_getForeigners( + $dependency_definitions['existrel'] = Relation::getForeigners( $db, $table, '', 'internal' ); } if (Util::isForeignKeySupported($tbl_storage_engine)) { - $dependency_definitions['existrel_foreign'] = PMA_getForeigners( + $dependency_definitions['existrel_foreign'] = Relation::getForeigners( $db, $table, '', 'foreign' ); } if ($cfgRelation['displaywork']) { - $dependency_definitions['disp'] = PMA_getDisplayField($db, $table); + $dependency_definitions['disp'] = Relation::getDisplayField($db, $table); } else { $dependency_definitions['disp'] = 'asas'; } |