Exemplo n.º 1
0
 /**
  * Test for PMA_getTablePositions()
  *
  * @return void
  */
 public function testGetTablePositions()
 {
     $pg = 1;
     $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->at(0))->method('fetchResult')->with("\n        SELECT CONCAT_WS('.', `db_name`, `table_name`) AS `name`,\n            `x` AS `X`,\n            `y` AS `Y`,\n            1 AS `V`,\n            1 AS `H`\n        FROM `pmadb`.`table_coords`\n        WHERE pdf_page_number = " . $pg, 'name', null, 2, PMA_DatabaseInterface::QUERY_STORE);
     $GLOBALS['dbi'] = $dbi;
     PMA_getTablePositions($pg);
 }
Exemplo n.º 2
0
$classes_side_menu = PMA_returnClassNamesFromMenuButtons();
$display_page = -1;
$selected_page = null;
if (isset($_REQUEST['query'])) {
    $display_page = PMA_getDefaultPage($_REQUEST['db']);
} else {
    if (!empty($_REQUEST['page'])) {
        $display_page = $_REQUEST['page'];
    } else {
        $display_page = PMA_getLoadingPage($_REQUEST['db']);
    }
}
if ($display_page != -1) {
    $selected_page = PMA_getPageName($display_page);
}
$tab_pos = PMA_getTablePositions($display_page);
$script_contr = PMA_getScriptContr();
$params = array('lang' => $GLOBALS['lang']);
if (isset($_GET['db'])) {
    $params['db'] = $_GET['db'];
}
$response = PMA\libraries\Response::getInstance();
$response->getFooter()->setMinimal();
$header = $response->getHeader();
$header->setBodyId('pmd_body');
$scripts = $header->getScripts();
$scripts->addFile('jquery/jquery.fullscreen.js');
$scripts->addFile('pmd/designer_db.js');
$scripts->addFile('pmd/designer_objects.js');
$scripts->addFile('pmd/designer_page.js');
$scripts->addFile('pmd/history.js');