本文整理汇总了PHP中PMA_isInsertRow函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_isInsertRow函数的具体用法?PHP PMA_isInsertRow怎么用?PHP PMA_isInsertRow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_isInsertRow函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_isInsertRow
PMA_Util::checkParameters(array('db', 'table', 'goto'));
$GLOBALS['dbi']->selectDb($GLOBALS['db']);
/**
* Initializes some variables
*/
$goto_include = false;
$response = PMA_Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('makegrid.js');
// Needed for generation of Inline Edit anchors
$scripts->addFile('sql.js');
$scripts->addFile('indexes.js');
$scripts->addFile('gis_data_editor.js');
// check whether insert row mode, if so include tbl_change.php
PMA_isInsertRow();
$after_insert_actions = array('new_insert', 'same_insert', 'edit_next');
if (isset($_REQUEST['after_insert']) && in_array($_REQUEST['after_insert'], $after_insert_actions)) {
$url_params['after_insert'] = $_REQUEST['after_insert'];
if (isset($_REQUEST['where_clause'])) {
foreach ($_REQUEST['where_clause'] as $one_where_clause) {
if ($_REQUEST['after_insert'] == 'same_insert') {
$url_params['where_clause'][] = $one_where_clause;
} elseif ($_REQUEST['after_insert'] == 'edit_next') {
PMA_setSessionForEditNext($one_where_clause);
}
}
}
}
//get $goto_include for different cases
$goto_include = PMA_getGotoInclude($goto_include);
示例2: testIsInsertRow
/**
* Test for PMA_isInsertRow
*
* @return void
*/
public function testIsInsertRow()
{
$_REQUEST['insert_rows'] = 5;
$GLOBALS['cfg']['InsertRows'] = 2;
$scriptsMock = $this->getMockBuilder('PMA_Scripts')->disableOriginalConstructor()->setMethods(array('addFile'))->getMock();
$scriptsMock->expects($this->once())->method('addFile');
$headerMock = $this->getMockBuilder('PMA_Header')->disableOriginalConstructor()->setMethods(array('getScripts'))->getMock();
$headerMock->expects($this->once())->method('getScripts')->will($this->returnValue($scriptsMock));
$responseMock = $this->getMockBuilder('PMA_Response')->disableOriginalConstructor()->setMethods(array('getHeader'))->getMock();
$responseMock->expects($this->once())->method('getHeader')->will($this->returnValue($headerMock));
$response = new ReflectionProperty('PMA_Response', '_instance');
$response->setAccessible(true);
$response->setValue(null, $responseMock);
PMA_isInsertRow();
$this->assertEquals(5, $GLOBALS['cfg']['InsertRows']);
}