2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * display selection for relational field values
8 use PMA\libraries\Response
;
10 require_once 'libraries/common.inc.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\libraries\Util
::checkParameters(array('db', 'table', 'field'));
29 $response = Response
::getInstance();
30 $response->getFooter()->setMinimal();
31 $header = $response->getHeader();
32 $header->disableMenuAndConsole();
33 $header->setBodyId('body_browse_foreigners');
39 $foreigners = PMA_getForeigners($db, $table);
40 $foreign_limit = PMA_getForeignLimit(
41 isset($_REQUEST['foreign_showAll']) ?
$_REQUEST['foreign_showAll'] : null
44 $foreignData = PMA_getForeignData(
45 $foreigners, $_REQUEST['field'], true,
46 isset($_REQUEST['foreign_filter'])
47 ?
$_REQUEST['foreign_filter']
49 isset($foreign_limit) ?
$foreign_limit : null,
50 true // for getting value in $foreignData['the_total']
54 $html = PMA_getHtmlForRelationalFieldSelection(
55 $db, $table, $_REQUEST['field'], $foreignData,
56 isset($fieldkey) ?
$fieldkey : null,
57 isset($data) ?
$data : null
60 $response->addHtml($html);