require_once 'themes/' . $theme . '/layout_utils.php'; require_once 'log4php/LoggerManager.php'; require_once 'include/ListView/ListView.php'; global $app_strings; global $app_list_strings; global $current_language; global $urlPrefix; global $currentModule; global $theme; $current_module_strings = return_module_language($current_language, 'MergeRecords'); $focus = new MergeRecord(); $focus->load_merge_bean($_REQUEST['merge_module'], true, $_REQUEST['record']); echo "\n<p>\n"; echo get_module_title($mod_strings['LBL_MODULE_NAME'], $current_module_strings['LBL_STEP2_FORM_TITLE'] . ' ' . $focus->merge_bean->name, true); echo "\n</p>\n"; $focus->populate_search_params($_REQUEST); $where_clauses = array(); $where_clauses = $focus->create_where_statement(); $where = $focus->generate_where_statement($where_clauses); $ListView = new ListView(); $ListView->force_mass_update = true; $ListView->show_mass_update_form = false; $ListView->show_export_button = false; $ListView->keep_mass_update_form_open = true; $bean_list_template_path = 'modules/' . $focus->merge_bean->module_dir . '/ListView.html'; $bean_list_template_var = strtoupper($app_list_strings['moduleListSingular'][$focus->merge_module]); // Bug 7706: bean_list_template_var is being mapped to BUG TRACKER from the app_list_strings // and it should be BUG to accommodate for the ListView if ($bean_list_template_var == 'BUG TRACKER') { $bean_list_template_var = 'BUG'; }
public function testcreate_where_statement() { //unset and reconnect Db to resolve mysqli fetch exeception global $db; unset($db->database); $db->checkConnection(); $mergeRecord = new MergeRecord(); $mergeRecord->load_merge_bean('Contacts'); $mergeRecord->populate_search_params(array('nameSearchField' => 'test', 'idSearchField' => '1')); $expected = array("contacts.id='1'", "contacts.name='test'", "contacts.id !=''"); $actual = $mergeRecord->create_where_statement(); $this->assertSame($expected, $actual); }