Code Duplication    Length = 8-8 lines in 4 locations

categories.php 1 location

@@ 274-281 (lines=8) @@
271
                $newitem       = '<img src="' . XOOPS_URL . "/modules/{$moduleDirName}/assets/images/newred.gif\">";
272
                $a_item['new'] = $newitem;
273
            }
274
            if ($xoopsUser) {
275
                $timezone = $xoopsUser->timezone();
276
                if (isset($timezone)) {
277
                    $useroffset = $xoopsUser->timezone();
278
                } else {
279
                    $useroffset = $xoopsConfig['default_TZ'];
280
                }
281
            }
282
            $date = ($useroffset * 3600) + $date;
283
            $date = XoopsLocale::formatTimestamp($date, 's');
284
            if ($xoopsUser) {

index.php 1 location

@@ 306-313 (lines=8) @@
303
    }
304
305
    $useroffset = '';
306
    if ($xoops->user) {
307
        $timezone = $xoops->user->timezone();
308
        if (isset($timezone)) {
309
            $useroffset = $xoops->user->timezone();
310
        } else {
311
            $useroffset = $xoopsConfig['default_TZ'];
312
        }
313
    }
314
    $date = ($useroffset * 3600) + $date;
315
316
    $date = XoopsLocale::formatTimestamp($date, 's');

print.php 1 location

@@ 56-63 (lines=8) @@
53
    $view       = $listingArray[$i]->getVar('view');
54
55
    $useroffset = '';
56
    if ($xoopsUser) {
57
        $timezone = $xoopsUser->timezone();
58
        if (isset($timezone)) {
59
            $useroffset = $xoopsUser->timezone();
60
        } else {
61
            $useroffset = $xoopsConfig['default_TZ'];
62
        }
63
    }
64
    $date       = ($useroffset * 3600) + $date;
65
    $date       = XoopsLocale::formatTimestamp($date, 's');
66
    $name       = $myts->htmlSpecialChars($name);

sendfriend.php 1 location

@@ 86-93 (lines=8) @@
83
        $view       = $listingArray[$i]->getVar('view');
84
85
        $useroffset = '';
86
        if ($xoopsUser) {
87
            $timezone = $xoopsUser->timezone();
88
            if (isset($timezone)) {
89
                $useroffset = $xoopsUser->timezone();
90
            } else {
91
                $useroffset = $xoopsConfig['default_TZ'];
92
            }
93
        }
94
        $date       = ($useroffset * 3600) + $date;
95
        $date       = XoopsLocale::formatTimestamp($date, 's');
96
        $name       = $myts->htmlSpecialChars($name);