XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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

        setPos: function (i) {
            this.pos = i;
            this.exp.wrapper.style[this.lt] = i + 'px';

            if (this.exp.outline) this.exp.outline.setPosition();
Severity: Major
Found in assets/images/js/highslide/highslide.js and 3 other locations - About 2 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 1352..1358
assets/images/js/highslide/highslide-with-gallery.js on lines 1158..1164
assets/images/js/highslide/highslide-with-html.js on lines 1153..1159

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

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

                    if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                        this.createFullExpand();
                        if (this.overlays.length == 1) this.sizeOverlayBox();
                    }
Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 2 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 1671..1674
assets/images/js/highslide/highslide-with-gallery.js on lines 1391..1394
assets/images/js/highslide/highslide.js on lines 1175..1178

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

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

                    if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                        this.createFullExpand();
                        if (this.overlays.length == 1) this.sizeOverlayBox();
                    }
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 2 hrs to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 1391..1394
assets/images/js/highslide/highslide-with-html.js on lines 1433..1436
assets/images/js/highslide/highslide.js on lines 1175..1178

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

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

            for (j = 0; j < 12; ++j) {
                if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {
                    t = j;
                    break;
                }
Severity: Major
Found in assets/js/jscalendar/calendar.js and 1 other location - About 2 hrs to fix
assets/js/jscalendar/calendar.js on lines 1634..1639

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

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

Calendar._TT["ABOUT"] =
    "DHTML Date/Time Selector\n" +
    "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
    "For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
    "Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
Severity: Major
Found in assets/js/jscalendar/lang/calendar-cs-utf8.js and 1 other location - About 2 hrs to fix
assets/js/jscalendar/lang/calendar-cs-win.js on lines 30..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 83.

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

Calendar._TT["ABOUT"] =
    "DHTML Date/Time Selector\n" +
    "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
    "For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
    "Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
Severity: Major
Found in assets/js/jscalendar/lang/calendar-cs-win.js and 1 other location - About 2 hrs to fix
assets/js/jscalendar/lang/calendar-cs-utf8.js on lines 30..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 83.

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

                for (j = 0; j < 12; ++j) {
                    if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {
                        m = j;
                        break;
                    }
Severity: Major
Found in assets/js/jscalendar/calendar.js and 1 other location - About 2 hrs to fix
assets/js/jscalendar/calendar.js on lines 1675..1680

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

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

Function mouseClickHandler has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        mouseClickHandler: function (e) {
            if (!e) e = window.event;
            if (e.button > 1) return true;
            if (!e.target) e.target = e.srcElement;

Severity: Major
Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

    Function changeSize has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            changeSize: function (up, to, dur) {
                // transition
                var trans = this.transitions,
                    other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                    t = (trans[1] && other
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-gallery.js - About 2 hrs to fix

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

          public function render()
          {
              global $xoopsGTicket;
      
              // load all child ids for javascript codes
      Severity: Major
      Found in admin/mygrouppermform.php - About 2 hrs to fix

        Method ImageBorder has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
            {
                $border_width = ($border_width ?: 1);
                $radius_x     = ($radius_x ?: 0);
                $radius_y     = ($radius_y ?: 0);
        Severity: Major
        Found in thumbs/phpthumb.filters.php - About 2 hrs to fix

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

                  preloadNext: function () {
                      var next = this.getAdjacentAnchor(1);
                      if (next && next.onclick.toString().match(/hs\.expand/))
                          var img = hs.createElement('img', {src: hs.getSrc(next)});
                  },
          Severity: Major
          Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 2 hrs to fix
          assets/images/js/highslide/highslide-with-gallery.js on lines 1844..1848
          assets/images/js/highslide/highslide-with-html.js on lines 1840..1844
          assets/images/js/highslide/highslide.js on lines 1400..1404

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

          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

                  preloadNext: function () {
                      var next = this.getAdjacentAnchor(1);
                      if (next && next.onclick.toString().match(/hs\.expand/))
                          var img = hs.createElement('img', {src: hs.getSrc(next)});
                  },
          Severity: Major
          Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 2 hrs to fix
          assets/images/js/highslide/highslide-full.js on lines 2346..2350
          assets/images/js/highslide/highslide-with-html.js on lines 1840..1844
          assets/images/js/highslide/highslide.js on lines 1400..1404

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

          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

                  preloadNext: function () {
                      var next = this.getAdjacentAnchor(1);
                      if (next && next.onclick.toString().match(/hs\.expand/))
                          var img = hs.createElement('img', {src: hs.getSrc(next)});
                  },
          Severity: Major
          Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 2 hrs to fix
          assets/images/js/highslide/highslide-full.js on lines 2346..2350
          assets/images/js/highslide/highslide-with-gallery.js on lines 1844..1848
          assets/images/js/highslide/highslide.js on lines 1400..1404

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

          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

                  preloadNext: function () {
                      var next = this.getAdjacentAnchor(1);
                      if (next && next.onclick.toString().match(/hs\.expand/))
                          var img = hs.createElement('img', {src: hs.getSrc(next)});
                  },
          Severity: Major
          Found in assets/images/js/highslide/highslide.js and 3 other locations - About 2 hrs to fix
          assets/images/js/highslide/highslide-full.js on lines 2346..2350
          assets/images/js/highslide/highslide-with-gallery.js on lines 1844..1848
          assets/images/js/highslide/highslide-with-html.js on lines 1840..1844

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

          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

          echo '<?xml version="1.0" encoding="UTF-8" ?>
          <rss version="2.0">
            <channel>
              <title>' . $xoopsModule->getVar('name') . ' - ' . htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES) . "</title>
              <link>$mod_url/</link>
          Severity: Major
          Found in rss2_today.php and 1 other location - About 2 hrs to fix
          rss2_coming.php on lines 63..74

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

          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

          echo '<?xml version="1.0" encoding="UTF-8" ?>
          <rss version="2.0">
            <channel>
              <title>' . $xoopsModule->getVar('name') . ' - ' . htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES) . "</title>
              <link>$mod_url/</link>
          Severity: Major
          Found in rss2_coming.php and 1 other location - About 2 hrs to fix
          rss2_today.php on lines 63..74

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

          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

          Consider simplifying this complex logical expression.
          Open

                  if (!@$_GET['w'] && !@$_GET['wp'] && !@$_GET['wl'] && !@$_GET['ws'] && !@$_GET['h'] && !@$_GET['hp']
                      && !@$_GET['hl']
                      && !@$_GET['hs']
                  ) {
                      // no resizing needed
          Severity: Critical
          Found in thumbs/phpThumb.php - About 2 hrs to fix

            Function init has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    init: function () {
                        if (!hs.container) {
            
                            hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                            hs.ieLt9 = hs.ie && hs.uaVersion < 9;
            Severity: Major
            Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

              Method gd_info has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function gd_info()
                  {
                      static $gd_info = array();
                      if (empty($gd_info)) {
                          // based on code by johnschaefer at gmx dot de
              Severity: Major
              Found in thumbs/phpthumb.functions.php - About 2 hrs to fix
                Severity
                Category
                Status
                Source
                Language