Code Duplication    Length = 16-16 lines in 2 locations

src/records/index.php 1 location

@@ 41-56 (lines=16) @@
38
39
// process search mode, if one is specified
40
41
if (isset($_REQUEST['search']))
42
{
43
    debug_write_log(DEBUG_NOTICE, 'REQUEST["search"] is set.');
44
45
    $search_text = ustrcut($_REQUEST['search'], MAX_SEARCH_TEXT);
46
47
    if (ustrlen($search_text) == 0)
48
    {
49
        $_SESSION[VAR_SEARCH_MODE] = FALSE;
50
    }
51
    else
52
    {
53
        $_SESSION[VAR_SEARCH_MODE] = TRUE;
54
        $_SESSION[VAR_SEARCH_TEXT] = $search_text;
55
    }
56
}
57
58
// generate breadcrumbs and tabs
59

src/records/list.php 1 location

@@ 44-59 (lines=16) @@
41
42
// process search mode, if one is specified
43
44
if (isset($_REQUEST['search']))
45
{
46
    debug_write_log(DEBUG_NOTICE, 'REQUEST["search"] is set.');
47
48
    $search_text = ustrcut($_REQUEST['search'], MAX_SEARCH_TEXT);
49
50
    if (ustrlen($search_text) == 0)
51
    {
52
        $_SESSION[VAR_SEARCH_MODE] = FALSE;
53
    }
54
    else
55
    {
56
        $_SESSION[VAR_SEARCH_MODE] = TRUE;
57
        $_SESSION[VAR_SEARCH_TEXT] = $search_text;
58
    }
59
}
60
61
$tab = $_SESSION[VAR_SEARCH_MODE] ? 2 : 1;  // ID of this tab
62