2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * display selection for relational field values
9 require_once 'libraries/common.inc.php';
10 require_once 'libraries/transformations.lib.php';
11 require_once 'libraries/browse_foreigners.lib.php';
14 * Sets globals from $_REQUEST
16 $request_params = array(
21 foreach ($request_params as $one_request_param) {
22 if (isset($_REQUEST[$one_request_param])) {
23 $GLOBALS[$one_request_param] = $_REQUEST[$one_request_param];
27 PMA_Util
::checkParameters(array('db', 'table', 'field'));
29 $response = PMA_Response
::getInstance();
30 $response->getFooter()->setMinimal();
31 $header = $response->getHeader();
32 $header->disableMenuAndConsole();
33 $header->setBodyId('body_browse_foreigners');
39 $cfgRelation = PMA_getRelationsParam();
40 $foreigners = ($cfgRelation['relwork'] ?
PMA_getForeigners($db, $table) : false);
41 $foreign_limit = PMA_getForeignLimit(
42 isset($_REQUEST['foreign_showAll']) ?
$_REQUEST['foreign_showAll'] : null
45 $foreignData = PMA_getForeignData(
46 $foreigners, $_REQUEST['field'], true,
47 isset($_REQUEST['foreign_filter'])
48 ?
$_REQUEST['foreign_filter']
50 isset($foreign_limit) ?
$foreign_limit : null
54 $html = PMA_getHtmlForRelationalFieldSelection(
55 $db, $table, $_REQUEST['field'], $foreignData,
56 isset($fieldkey) ?
$fieldkey : null,
57 isset($data) ?
$data : null
60 $response->addHtml($html);