Code Duplication    Length = 17-18 lines in 3 locations

plugins/smartpartner.php 1 location

@@ 36-53 (lines=18) @@
33
/**
34
 * @return array
35
 */
36
function xnewsletter_plugin_getinfo_smartpartner()
37
{
38
    global $xoopsDB;
39
40
    $pluginInfo         = [];
41
    $pluginInfo['name'] = 'smartpartner';
42
    if (file_exists(XOOPS_URL . '/modules/smartpartner/images/module_logo.gif')) {
43
        $pluginInfo['icon'] = XOOPS_URL . '/modules/smartpartner/images/module_logo.gif';
44
    } elseif (file_exists(XOOPS_URL . '/modules/smartpartner/assets/images/logo_module.png')) {
45
        $pluginInfo['icon'] = XOOPS_URL . '/modules/smartpartner/assets/images/logo_module.png';
46
    }
47
    //$pluginInfo['modulepath'] = XOOPS_ROOT_PATH . "/modules/smartpartner/xoops_version.php";
48
    $pluginInfo['tables'][0] = $xoopsDB->prefix('smartpartner_partner');
49
    $pluginInfo['descr']     = 'Import from Smartpartner';
50
    $pluginInfo['hasform']   = 0;
51
52
    return $pluginInfo;
53
}
54
55
/**
56
 * @param $cat_id

plugins/subscribers.php 1 location

@@ 36-52 (lines=17) @@
33
/**
34
 * @return array
35
 */
36
function xnewsletter_plugin_getinfo_subscribers()
37
{
38
    global $xoopsDB;
39
40
    $pluginInfo         = [];
41
    $pluginInfo['name'] = 'subscribers';
42
    if (file_exists(XOOPS_URL . '/modules/subscribers/images/module_logo.gif')) {
43
        $pluginInfo['icon'] = XOOPS_URL . '/modules/subscribers/images/module_logo.gif';
44
    } elseif (file_exists(XOOPS_URL . '/modules/subscribers/assets/images/logo_module.png')) {
45
        $pluginInfo['icon'] = XOOPS_URL . '/modules/subscribers/assets/images/logo_module.png';
46
    }
47
    //$pluginInfo['modulepath'] = XOOPS_ROOT_PATH . "/modules/subscribers/xoops_version.php";
48
    $pluginInfo['tables'][0] = $xoopsDB->prefix('subscribers_user');
49
    $pluginInfo['descr']     = 'Import from subscribers';
50
    $pluginInfo['hasform']   = 0;
51
52
    return $pluginInfo;
53
}
54
55
/**

plugins/weblinks.php 1 location

@@ 36-52 (lines=17) @@
33
/**
34
 * @return array
35
 */
36
function xnewsletter_plugin_getinfo_weblinks()
37
{
38
    global $xoopsDB;
39
40
    $pluginInfo         = [];
41
    $pluginInfo['name'] = 'weblinks';
42
    if (file_exists(XOOPS_URL . '/modules/sweblinks/images/weblinks_slogo.png')) {
43
        $pluginInfo['icon'] = XOOPS_URL . '/modules/weblinks/images/weblinks_slogo.png';
44
    } elseif (file_exists(XOOPS_URL . '/modules/subscribers/assets/images/weblinks_slogo.png')) {
45
        $pluginInfo['icon'] = XOOPS_URL . '/modules/subscribers/assets/images/weblinks_slogo.png';
46
    }
47
    //$pluginInfo['modulepath'] = XOOPS_ROOT_PATH . "/modules/weblinks/xoops_version.php";
48
    $pluginInfo['tables'][0] = $xoopsDB->prefix('weblinks_link');
49
    $pluginInfo['descr']     = 'Import from Weblinks';
50
    $pluginInfo['hasform']   = 0;
51
52
    return $pluginInfo;
53
}
54
55
/**