ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

<?php
// $Id: mailusers.php 10326 2010-07-11 18:54:25Z malanciault $
//%%%%%%    Admin Module Name  MailUsers    %%%%%
if (!defined('_AM_DBUPDATED')) {define('_AM_DBUPDATED', 'Database succesvol bijgewerkt!');
}
Severity: Major
Found in htdocs/modules/system/language/nederlands/admin/mailusers.php and 2 other locations - About 2 days to fix
htdocs/modules/system/language/english/admin/mailusers.php on lines 1..38
htdocs/modules/system/language/francais/admin/mailusers.php on lines 1..39

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 431.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method xoops_module_install has 413 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function xoops_module_install($dirname) {
    global $icmsConfig, $icmsAdminTpl;
    $dirname = trim($dirname);
    $db = icms_db_Factory::instance();
    $reservedTables = array('avatar',
Severity: Major
Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php - About 2 days to fix

    Method icms_module_update has 406 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function icms_module_update($dirname) {
        global $icmsConfig, $icmsAdminTpl;
    
        $msgs = array();
    
    
    Severity: Major
    Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php - About 2 days to fix

      Method icms_module_update has 393 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function icms_module_update($dirname) {
          $dirname = trim($dirname);
          $db =& icms_db_Factory::instance();
          $module_handler = icms::handler('icms_module');
          $module =& $module_handler->getByDirname($dirname);
      Severity: Major
      Found in htdocs/install/modulesadmin.php - About 1 day to fix

        Method xoops_module_install has 391 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function xoops_module_install($dirname) {
            $dirname = trim($dirname);
            $db =& icms_db_Factory::instance();
            $reservedTables = array('avatar', 'avatar_users_link', 'block_module_link', 'xoopscomments', 'config', 'configcategory', 'configoption', 'image', 'imagebody', 'imagecategory', 'imgset', 'imgset_tplset_link', 'imgsetimg', 'groups','groups_users_link','group_permission', 'online', 'priv_msgs', 'ranks', 'session', 'smiles', 'users', 'newblocks', 'modules', 'tplfile', 'tplset', 'tplsource', 'xoopsnotifications');
            $module_handler = icms::handler('icms_module');
        Severity: Major
        Found in htdocs/install/modulesadmin.php - About 1 day to fix

          File modulesadmin.php has 811 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          /**
           * Installer tables creation page
           *
           * See the enclosed file license.txt for licensing information.
          Severity: Major
          Found in htdocs/install/modulesadmin.php - About 1 day to fix

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                for ($i = 0; $i < $ucount; $i++ ) {
                    if ($uploader->fetchMedia($_POST['xoops_upload_file'][$i])) {
                        if (!$uploader->upload()) {
                            $err[] = $uploader->getErrors();
                        } else {
            Severity: Major
            Found in htdocs/modules/system/admin/images/browser.php and 1 other location - About 1 day to fix
            htdocs/modules/system/admin/images/main.php on lines 881..911

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 398.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                for ($i = 0; $i < $ucount; $i++ ) {
                    if ($uploader->fetchMedia($_POST['xoops_upload_file'][$i])) {
                        if (!$uploader->upload()) {
                            $err[] = $uploader->getErrors();
                        } else {
            Severity: Major
            Found in htdocs/modules/system/admin/images/main.php and 1 other location - About 1 day to fix
            htdocs/modules/system/admin/images/browser.php on lines 667..697

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 398.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            File browser.php has 802 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Images Manager - Image Browser
             *
             * Used to create an instance of the image manager in a popup window to use with the dhmtl textarea object
            Severity: Major
            Found in htdocs/modules/system/admin/images/browser.php - About 1 day to fix

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              <?php
              
              define('_CO_ICMS_CUSTOMTAGS','Custom Tags');
              define('_CO_ICMS_CUSTOMTAGS_DSC', 'Here is a list of the custom tags available in the system.');
              define('_CO_ICMS_CUSTOMTAG', 'Custom tag');
              Severity: Major
              Found in htdocs/modules/system/language/english/admin/customtag.php and 3 other locations - About 1 day to fix
              htdocs/modules/system/language/francais/admin/customtag.php on lines 1..32
              htdocs/modules/system/language/italiano/admin/customtag.php on lines 1..36
              htdocs/modules/system/language/nederlands/admin/customtag.php on lines 1..34

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 365.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              <?php
              
              define('_CO_ICMS_CUSTOMTAGS', 'Standaard tags');
              define('_CO_ICMS_CUSTOMTAGS_DSC', 'Hier is een lijst met in het systeem beschikbare standaard tags.');
              define('_CO_ICMS_CUSTOMTAG', 'Standaard tag');
              htdocs/modules/system/language/english/admin/customtag.php on lines 1..37
              htdocs/modules/system/language/francais/admin/customtag.php on lines 1..32
              htdocs/modules/system/language/italiano/admin/customtag.php on lines 1..36

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 365.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              <?php
              
              define('_CO_ICMS_CUSTOMTAGS', 'Tags personnalis&eacute;s');
              define('_CO_ICMS_CUSTOMTAGS_DSC', 'liste des Tags personnalis&eacute;s disponibles dans le syst&egrave;me.');
              define('_CO_ICMS_CUSTOMTAG', 'Tag personnalis&eacute;');
              Severity: Major
              Found in htdocs/modules/system/language/francais/admin/customtag.php and 3 other locations - About 1 day to fix
              htdocs/modules/system/language/english/admin/customtag.php on lines 1..37
              htdocs/modules/system/language/italiano/admin/customtag.php on lines 1..36
              htdocs/modules/system/language/nederlands/admin/customtag.php on lines 1..34

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 365.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              <?php
              
              define('_CO_ICMS_CUSTOMTAGS','Tags personalizzati');
              define('_CO_ICMS_CUSTOMTAGS_DSC', 'Qui c\'&egrave; una lista di tags personalizzati disponibili nel sistema.');
              define('_CO_ICMS_CUSTOMTAG', 'Tag personalizzato');
              Severity: Major
              Found in htdocs/modules/system/language/italiano/admin/customtag.php and 3 other locations - About 1 day to fix
              htdocs/modules/system/language/english/admin/customtag.php on lines 1..37
              htdocs/modules/system/language/francais/admin/customtag.php on lines 1..32
              htdocs/modules/system/language/nederlands/admin/customtag.php on lines 1..34

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 365.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              File protector.php has 730 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              class Protector {
                  var $mydirname;
                  var $_conn = null;

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                <?php
                define("_AM_SBLEFT","Side Block - Left");
                define("_AM_SBRIGHT","Side Block - Right");
                define("_AM_CBLEFT","Center Block - Left");
                define("_AM_CBRIGHT","Center Block - Right");
                htdocs/modules/system/language/italiano/admin/blockspadmin.php on lines 1..37
                htdocs/modules/system/language/nederlands/admin/blockspadmin.php on lines 1..34

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 352.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                <?php
                define("_AM_SBLEFT","Blocco laterale - Sinistra");
                define("_AM_SBRIGHT","Blocco laterale - Destra");
                define("_AM_CBLEFT","Blocco centrale - Sinistra");
                define("_AM_CBRIGHT","Blocco centrale - Destra");
                htdocs/modules/system/language/english/admin/blockspadmin.php on lines 1..37
                htdocs/modules/system/language/nederlands/admin/blockspadmin.php on lines 1..34

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 352.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                <?php
                define('_AM_SBLEFT', 'Zijblok - links');
                define('_AM_SBRIGHT', 'Zijblok - rechts');
                define('_AM_CBLEFT', 'Middenblok - links');
                define('_AM_CBRIGHT', 'Middenblok - rechts');
                htdocs/modules/system/language/english/admin/blockspadmin.php on lines 1..37
                htdocs/modules/system/language/italiano/admin/blockspadmin.php on lines 1..37

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 352.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        if ($module->getVar('hasnotification') != 0) {
                            if (empty($configs)) {
                                $configs = array();
                            }
                            // Main notification options
                Severity: Major
                Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php and 1 other location - About 1 day to fix
                htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 371..396

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 341.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                                if ($module->getVar('hasnotification') != 0) {
                                    if (empty($configs)) {
                                        $configs = array();
                                    }
                                    // Main notification options
                Severity: Major
                Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php and 1 other location - About 1 day to fix
                htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 1243..1270

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 341.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                                if ($configs != false) {
                                    if ($module->getVar('hascomments') != 0) {
                                        include_once ICMS_ROOT_PATH.'/include/comment_constants.php' ;
                                        array_push($configs, array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMNOCOM' => XOOPS_COMMENT_APPROVENONE, '_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN)));
                                        array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0));
                Severity: Major
                Found in htdocs/install/modulesadmin.php and 1 other location - About 1 day to fix
                htdocs/install/modulesadmin.php on lines 731..744

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 321.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language