Code Duplication    Length = 8-8 lines in 2 locations

search.php 2 locations

@@ 152-159 (lines=8) @@
149
            }
150
            $xoops->tpl()->assign('in_category', '');
151
            $xoops->tpl()->assign('cat_name', '');
152
            if (!empty($by_cat)) {
153
                $cat_name                  = '';
154
                $alumni_categories_Handler = $xoops->getModuleHandler('category', 'alumni');
155
                $catObj                    = $alumni_categories_Handler->get($by_cat);
156
                $cat_name                  = $catObj->getVar('title');
157
                $xoops->tpl()->assign('in_category', AlumniLocale::INCATEGORY);
158
                $xoops->tpl()->assign('cat_name', "<b> :  &nbsp;&nbsp; $cat_name</b>");
159
            }
160
161
            $res = [];
162
            if (is_array($results) && $count > 0) {
@@ 239-246 (lines=8) @@
236
            $xoops->tpl()->assign('sr_showing', sprintf(XoopsLocale::F_SHOWING_RESULTS, $start + 1, $start + $count));
237
            $xoops->tpl()->assign('showing_of', constant($main_lang . '_OF') . "&nbsp;$count2");
238
239
            if (!empty($by_cat)) {
240
                $cat_name                  = '';
241
                $alumni_categories_Handler = $xoops->getModuleHandler('category', 'alumni');
242
                $catObj                    = $alumni_categories_Handler->get($by_cat);
243
                $cat_name                  = $catObj->getVar('title');
244
                $xoops->tpl()->assign('in_category', AlumniLocale::INCATEGORY);
245
                $xoops->tpl()->assign('cat_name', "<b> :  &nbsp;&nbsp; $cat_name</b>");
246
            }
247
248
            $res = [];
249
            for ($i = 0; $i < $count; ++$i) {