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/transformations.lib.php';
12 require_once 'libraries/browse_foreigners.lib.php';
15 * Sets globals from $_REQUEST
17 $request_params = array(
22 foreach ($request_params as $one_request_param) {
23 if (isset($_REQUEST[$one_request_param])) {
24 $GLOBALS[$one_request_param] = $_REQUEST[$one_request_param];
28 PMA\libraries\Util
::checkParameters(array('db', 'table', 'field'));
30 $response = Response
::getInstance();
31 $response->getFooter()->setMinimal();
32 $header = $response->getHeader();
33 $header->disableMenuAndConsole();
34 $header->setBodyId('body_browse_foreigners');
40 $foreigners = PMA_getForeigners($db, $table);
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,
51 true // for getting value in $foreignData['the_total']
55 $html = PMA_getHtmlForRelationalFieldSelection(
56 $db, $table, $_REQUEST['field'], $foreignData,
57 isset($fieldkey) ?
$fieldkey : null,
58 isset($data) ?
$data : null
61 $response->addHtml($html);