XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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

        initSlideshow: function () {
            if (!this.last) {
                for (var i = 0; i < hs.slideshows.length; i++) {
                    var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                    if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 2 days to fix
assets/images/js/highslide/highslide-full.js on lines 2381..2411

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

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

function makeShort($str)
{
    $replacements = array(
        'Š' => 'S',
        'š' => 's',
Severity: Major
Found in include/onupdate.php and 1 other location - About 2 days to fix
include/oninstall.php on lines 224..298

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

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

function makeShort($str)
{
    $replacements = array(
        'Š' => 'S',
        'š' => 's',
Severity: Major
Found in include/oninstall.php and 1 other location - About 2 days to fix
include/onupdate.php on lines 271..345

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

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

    hs.Outline = function (outlineType, onLoad) {
        this.onLoad = onLoad;
        this.outlineType = outlineType;
        var v = hs.uaVersion, tr;

Severity: Major
Found in assets/images/js/highslide/highslide.js and 3 other locations - About 2 days to fix
assets/images/js/highslide/highslide-full.js on lines 1111..1147
assets/images/js/highslide/highslide-with-gallery.js on lines 931..967
assets/images/js/highslide/highslide-with-html.js on lines 924..960

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

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

    hs.Outline = function (outlineType, onLoad) {
        this.onLoad = onLoad;
        this.outlineType = outlineType;
        var v = hs.uaVersion, tr;

Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 2 days to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 931..967
assets/images/js/highslide/highslide-with-html.js on lines 924..960
assets/images/js/highslide/highslide.js on lines 758..794

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

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

    hs.Outline = function (outlineType, onLoad) {
        this.onLoad = onLoad;
        this.outlineType = outlineType;
        var v = hs.uaVersion, tr;

Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 2 days to fix
assets/images/js/highslide/highslide-full.js on lines 1111..1147
assets/images/js/highslide/highslide-with-html.js on lines 924..960
assets/images/js/highslide/highslide.js on lines 758..794

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

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

    hs.Outline = function (outlineType, onLoad) {
        this.onLoad = onLoad;
        this.outlineType = outlineType;
        var v = hs.uaVersion, tr;

Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 2 days to fix
assets/images/js/highslide/highslide-full.js on lines 1111..1147
assets/images/js/highslide/highslide-with-gallery.js on lines 931..967
assets/images/js/highslide/highslide.js on lines 758..794

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

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

    public function ApplyFilters()
    {
        if ($this->fltr && is_array($this->fltr)) {
            if (!require_once __DIR__ . '/phpthumb.filters.php') {
                $this->DebugMessage('Error including "' . __DIR__ . '/phpthumb.filters.php" which is required for applying filters (' . implode(';', $this->fltr) . ')', __FILE__, __LINE__);
Severity: Major
Found in thumbs/phpthumb.class.php - About 2 days to fix

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

            keyHandler: function (e) {
                if (!e) e = window.event;
                if (!e.target) e.target = e.srcElement; // ie
                if (typeof e.target.form != 'undefined') return true; // form element has focus
                var exp = hs.getExpander();
    Severity: Major
    Found in assets/images/js/highslide/highslide.js and 1 other location - About 2 days to fix
    assets/images/js/highslide/highslide-with-html.js on lines 454..497

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

    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

            keyHandler: function (e) {
                if (!e) e = window.event;
                if (!e.target) e.target = e.srcElement; // ie
                if (typeof e.target.form != 'undefined') return true; // form element has focus
                var exp = hs.getExpander();
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 2 days to fix
    assets/images/js/highslide/highslide.js on lines 315..358

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

    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

        hs.addEventListener(document, 'ready', function () {
            if (hs.expandCursor || hs.dimmingOpacity) {
                var style = hs.createElement('style', {type: 'text/css'}, null,
                    document.getElementsByTagName('HEAD')[0]),
                    backCompat = document.compatMode == 'BackCompat';
    Severity: Major
    Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 2 days to fix
    assets/images/js/highslide/highslide-with-gallery.js on lines 2648..2680

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

    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

        hs.addEventListener(document, 'ready', function () {
            if (hs.expandCursor || hs.dimmingOpacity) {
                var style = hs.createElement('style', {type: 'text/css'}, null,
                    document.getElementsByTagName('HEAD')[0]),
                    backCompat = document.compatMode == 'BackCompat';
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 2 days to fix
    assets/images/js/highslide/highslide-full.js on lines 3354..3386

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

    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 patTemplate.php has 856 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /*
     * You may not change or alter any portion of this comment or credits
     * of supporting developers from this source code or any supporting source code
     * which is considered copyrighted (c) material of the original comment or credit authors.
    Severity: Major
    Found in include/patTemplate.php - About 2 days to fix

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

              get: function (key) {
                  switch (key) {
                      case 'loadingPos':
                          return this.tpos + this.tb + (this.t - hs.loading['offset' + this.ucwh]) / 2;
                      case 'loadingPosXfade':
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 2 days to fix
      assets/images/js/highslide/highslide-with-gallery.js on lines 1074..1094

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

              get: function (key) {
                  switch (key) {
                      case 'loadingPos':
                          return this.tpos + this.tb + (this.t - hs.loading['offset' + this.ucwh]) / 2;
                      case 'loadingPosXfade':
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 2 days to fix
      assets/images/js/highslide/highslide-full.js on lines 1254..1274

      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 phpthumb.gif.php has 851 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      ///////////////////////////////////////////////////////////////////////////////////////////////////
      // GIF Util - (C) 2003 Yamasoft (S/C)
      // http://www.yamasoft.com
      // All Rights Reserved
      Severity: Major
      Found in thumbs/phpthumb.gif.php - About 2 days to fix

        Consider simplifying this complex logical expression.
        Open

        if (!hs) {
            var hs = {
        // Language strings
                lang: {
                    cssDirection: 'ltr',
        Severity: Critical
        Found in assets/images/js/highslide/highslide-with-html.js - About 2 days to fix

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

                      hs.animate(this.wrapper, to.wrapper, {
                          duration: dur,
                          easing: easing,
                          step: function (val, args) {
                              if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
          Severity: Major
          Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 1 day to fix
          assets/images/js/highslide/highslide-with-html.js on lines 1768..1789

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

          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

                  wrapperMouseHandler: function (e) {
                      try {
                          if (!e) e = window.event;
                          var over = /mouseover/i.test(e.type);
                          if (!e.target) e.target = e.srcElement; // ie
          Severity: Major
          Found in assets/images/js/highslide/highslide-with-html.js and 2 other locations - About 1 day to fix
          assets/images/js/highslide/highslide-with-gallery.js on lines 656..676
          assets/images/js/highslide/highslide.js on lines 492..512

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

          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

                  wrapperMouseHandler: function (e) {
                      try {
                          if (!e) e = window.event;
                          var over = /mouseover/i.test(e.type);
                          if (!e.target) e.target = e.srcElement; // ie
          Severity: Major
          Found in assets/images/js/highslide/highslide.js and 2 other locations - About 1 day to fix
          assets/images/js/highslide/highslide-with-gallery.js on lines 656..676
          assets/images/js/highslide/highslide-with-html.js on lines 654..674

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

          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