예제 #1
0
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';
}
$ListView->initNewXTemplate($bean_list_template_path, $focus->merge_bean_strings);
$ListView->setHeaderTitle($focus->merge_bean->name);
//leaving in dependency that there is a name column, needs to be changed
예제 #2
0
 public function testgenerate_where_statement()
 {
     $mergeRecord = new MergeRecord();
     $clauses = array("contacts.id='1'", "contacts.name='test'", "contacts.id !=''");
     $expected = "contacts.id='1' AND contacts.name='test' AND contacts.id !=''";
     $actual = $mergeRecord->generate_where_statement($clauses);
     $this->assertSame($expected, $actual);
     //error_reporting(E_ALL);
 }