XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Method render has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function render()
    {
        $ret = '';

        if (count($this->_appendix) > 0) {
Severity: Minor
Found in admin/mygrouppermform.php - About 1 hr to fix

    Function createOverlay has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            createOverlay: function (o) {
                var el = o.overlayId;
                if (typeof el == 'string') el = hs.getNode(el);
                if (o.html) el = hs.createElement('div', {innerHTML: o.html});
                if (!el || typeof el == 'string') return;
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

      Function getInline has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              getInline: function (types, addOverlay) {
                  for (var i = 0; i < types.length; i++) {
                      var type = types[i], s = null;
                      if (!this[type + 'Id'] && this.thumbsUserSetId)
                          this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
      Severity: Minor
      Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

        Function onGraphicLoad has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                onGraphicLoad: function () {
                    var o = this.offset = this.graphic.width / 4,
                        pos = [[0, 0], [0, -4], [-2, 0], [0, -8], 0, [-2, -8], [0, -2], [0, -6], [-2, -2]],
                        dim = {height: (2 * o) + 'px', width: (2 * o) + 'px'};
                    for (var i = 0; i <= 8; i++) {
        Severity: Minor
        Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

          Method apcal_map_show has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function apcal_map_show($options)
              {
                  global $xoopsConfig, $xoopsDB;
          
                  $original_level = error_reporting(E_ALL ^ E_NOTICE);
          Severity: Minor
          Found in blocks/apcal_map.php - About 1 hr to fix

            Method apcal_coming_schedule_edit has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function apcal_coming_schedule_edit($options)
                {
                    global $xoopsDB, $xoopsConfig;
            
                    $moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
            Severity: Minor
            Found in blocks/apcal_coming_schedule.php - About 1 hr to fix

              Method SafeExec has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function SafeExec($command)
                  {
                      static $AllowedExecFunctions = array();
                      if (empty($AllowedExecFunctions)) {
                          $AllowedExecFunctions = array('shell_exec' => true, 'passthru' => true, 'system' => true, 'exec' => true);
              Severity: Minor
              Found in thumbs/phpthumb.functions.php - About 1 hr to fix

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

                                    if (blurExp.isImage) {
                                        blurExp.content.style.cursor = hs.ieLt7 ? 'hand' : 'pointer';
                                        blurExp.content.title = hs.lang.focusTitle;
                                    }
                Severity: Major
                Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 1 hr to fix
                assets/images/js/highslide/highslide-with-html.js on lines 1980..1983

                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 63.

                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 2 locations. Consider refactoring.
                Open

                                    if (/pm/i.test(AP.innerHTML) && h < 12)
                                        h += 12;
                                    else if (/am/i.test(AP.innerHTML) && h == 12)
                                        h = 0;
                Severity: Major
                Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                assets/js/jscalendar/calendar.js on lines 1651..1654

                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 63.

                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 2 locations. Consider refactoring.
                Open

                                if (/pm/i.test(a[i]) && hr < 12)
                                    hr += 12;
                                else if (/am/i.test(a[i]) && hr >= 12)
                                    hr -= 12;
                Severity: Major
                Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                assets/js/jscalendar/calendar.js on lines 904..907

                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 63.

                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 (blurExp.isImage) {
                                        blurExp.content.style.cursor = hs.ieLt7 ? 'hand' : 'pointer';
                                        blurExp.content.title = hs.lang.focusTitle;
                                    }
                Severity: Major
                Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 1 hr to fix
                assets/images/js/highslide/highslide-full.js on lines 2541..2544

                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 63.

                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 myblocksadmin_update_blockinstance has 11 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    $id,
                    $bside,
                    $bweight,
                    $bvisible,
                    $btitle,
                Severity: Major
                Found in include/blocksadmin.inc.php - About 1 hr to fix

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

                                      if (isset($this->holidays[$link])) {
                                          // Holiday
                                          $bgcolor = $this->holiday_bgcolor;
                                          $color   = $this->holiday_color;
                                      } elseif ($wday % 7 == 0) {
                  Severity: Major
                  Found in class/APCal_xoops.php and 1 other location - About 1 hr to fix
                  class/APCal.php on lines 983..999

                  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 108.

                  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 (isset($this->holidays[$link])) {
                                          //  Holiday
                                          $bgcolor = $this->holiday_bgcolor;
                                          $color   = $this->holiday_color;
                                      } elseif ($wday % 7 == 0) {
                  Severity: Major
                  Found in class/APCal.php and 1 other location - About 1 hr to fix
                  class/APCal_xoops.php on lines 1174..1190

                  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 108.

                  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 get_sql_set has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function get_sql_set($event, $cols)
                      {
                          $ret = '';
                  
                          foreach ($cols as $col => $types) {
                  Severity: Minor
                  Found in class/iCal_parser.php - About 1 hr to fix

                    Method ImageCopyResampleBicubic has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function ImageCopyResampleBicubic(
                            $dst_img,
                            $src_img,
                            $dst_x,
                            $dst_y,
                    Severity: Minor
                    Found in thumbs/phpthumb.functions.php - About 1 hr to fix

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

                              if (document.readyState && hs.ie && !hs.isReady) {
                                  hs.addEventListener(document, 'ready', function () {
                                      new hs.Expander(a, params, custom, contentType);
                                  });
                                  return;
                      Severity: Major
                      Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 1 hr to fix
                      assets/images/js/highslide/highslide-full.js on lines 1362..1367
                      assets/images/js/highslide/highslide-with-html.js on lines 1163..1168
                      assets/images/js/highslide/highslide.js on lines 983..988

                      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 62.

                      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 4 locations. Consider refactoring.
                      Open

                              if (document.readyState && hs.ie && !hs.isReady) {
                                  hs.addEventListener(document, 'ready', function () {
                                      new hs.Expander(a, params, custom, contentType);
                                  });
                                  return;
                      Severity: Major
                      Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 1 hr to fix
                      assets/images/js/highslide/highslide-with-gallery.js on lines 1168..1173
                      assets/images/js/highslide/highslide-with-html.js on lines 1163..1168
                      assets/images/js/highslide/highslide.js on lines 983..988

                      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 62.

                      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 4 locations. Consider refactoring.
                      Open

                              if (document.readyState && hs.ie && !hs.isReady) {
                                  hs.addEventListener(document, 'ready', function () {
                                      new hs.Expander(a, params, custom, contentType);
                                  });
                                  return;
                      Severity: Major
                      Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 1 hr to fix
                      assets/images/js/highslide/highslide-full.js on lines 1362..1367
                      assets/images/js/highslide/highslide-with-gallery.js on lines 1168..1173
                      assets/images/js/highslide/highslide.js on lines 983..988

                      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 62.

                      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 4 locations. Consider refactoring.
                      Open

                              if (document.readyState && hs.ie && !hs.isReady) {
                                  hs.addEventListener(document, 'ready', function () {
                                      new hs.Expander(a, params, custom, contentType);
                                  });
                                  return;
                      Severity: Major
                      Found in assets/images/js/highslide/highslide.js and 3 other locations - About 1 hr to fix
                      assets/images/js/highslide/highslide-full.js on lines 1362..1367
                      assets/images/js/highslide/highslide-with-gallery.js on lines 1168..1173
                      assets/images/js/highslide/highslide-with-html.js on lines 1163..1168

                      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 62.

                      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