Code Duplication    Length = 5-5 lines in 5 locations

hook-photo.php 1 location

@@ 21-25 (lines=5) @@
18
include __DIR__ . '/header.php';
19
require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php';
20
21
if (!isset($_GET['id'])) {
22
    $photoId = 0;
23
} else {
24
    $photoId = (int)$_GET['id'];
25
}
26
/** @var ExtgalleryPhotoHandler $photoHandler */
27
$photoHandler = xoops_getModuleHandler('publicphoto', 'extgallery');
28
$photoHandler->updateHits($photoId);

public-download.php 1 location

@@ 21-25 (lines=5) @@
18
include __DIR__ . '/header.php';
19
require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php';
20
21
if (!isset($_GET['id'])) {
22
    $photoId = 0;
23
} else {
24
    $photoId = (int)$_GET['id'];
25
}
26
/** @var ExtgalleryPublicPhotoHandler $photoHandler */
27
$photoHandler = xoops_getModuleHandler('publicphoto', 'extgallery');
28
$photo        = $photoHandler->get($photoId);

public-photo.php 1 location

@@ 24-28 (lines=5) @@
21
$GLOBALS['xoopsOption']['template_main'] = 'extgallery_public-photo.tpl';
22
include XOOPS_ROOT_PATH . '/header.php';
23
24
if (!isset($_GET['photoId'])) {
25
    $photoId = 0;
26
} else {
27
    $photoId = (int)$_GET['photoId'];
28
}
29
/** @var ExtgalleryPublicCatHandler $catHandler */
30
$catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
31
/** @var ExtgalleryPublicPhotoHandler $photoHandler */

public-rating.php 1 location

@@ 21-25 (lines=5) @@
18
include __DIR__ . '/header.php';
19
require_once XOOPS_ROOT_PATH . '/modules/extgallery/class/publicPerm.php';
20
21
if (!isset($_GET['id'])) {
22
    $photoId = 0;
23
} else {
24
    $photoId = (int)$_GET['id'];
25
}
26
if (!isset($_GET['rate'])) {
27
    $rate = 0;
28
} else {

public-userphoto.php 1 location

@@ 24-28 (lines=5) @@
21
$GLOBALS['xoopsOption']['template_main'] = 'extgallery_public-userphoto.tpl';
22
include XOOPS_ROOT_PATH . '/header.php';
23
24
if (!isset($_GET['photoId'])) {
25
    $photoId = 0;
26
} else {
27
    $photoId = (int)$_GET['photoId'];
28
}
29
/** @var ExtgalleryCatHandler $catHandler */
30
$catHandler = xoops_getModuleHandler('publiccat', 'extgallery');
31
/** @var ExtgalleryPublicPhotoHandler $photoHandler */