Code Duplication    Length = 5-5 lines in 2 locations

index.php 1 location

@@ 137-141 (lines=5) @@
134
                } else {
135
                    $country_name = '';
136
                }
137
                if (file_exists($flag)) {
138
                    $a_msg['country'] =
139
                        "<img src=\"" . XOOPS_URL . '/modules/xfguestbook/assets/images/flags/' . $onemsg->getVar('flagdir') . '/' . $onemsg->getVar('country') . ".gif\" alt=\"" . $country_name
140
                        . "\">";
141
                } else {
142
                    $a_msg['country'] = $country_name;
143
                }
144
                $a_msg['country'] = "<a href=\"index.php?op=show_country&param=" . $onemsg->getVar('flagdir') . '/' . $onemsg->getVar('country') . "\">" . $a_msg['country'] . '</a>';

xfcreate.php 1 location

@@ 122-126 (lines=5) @@
119
            $flag         = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/assets/images/flags/' . $xoopsModuleConfig['flagdir'] . '/' . $country . '.gif';
120
            $arr_country  = xfgb_getCountry("country_code ='" . $country . "'");
121
            $country_name = (count($arr_country) > 0) ? $arr_country[0]['country_name'] : '';
122
            if (file_exists($flag)) {
123
                $msgpost['country'] =
124
                    "<img src=\"" . XOOPS_URL . '/modules/xfguestbook/assets/images/flags/' . $xoopsModuleConfig['flagdir'] . '/' . $country . ".gif\" alt=\"" . $country_name . "\">";
125
            } else {
126
                $msgpost['country'] = $country_name;
127
            }
128
        }
129