XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Function justify has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        justify: function (p, moveOnly) {
            var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';

            if (tgt && tgt.match(/ /)) {
                tgtArr = tgt.split(' ');
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

    Function contentLoaded has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            contentLoaded: function () {
                try {
                    if (!this.content) return;
                    this.content.onload = null;
                    if (this.onLoadStarted) return;
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

      Function htmlSizeOperations has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              htmlSizeOperations: function () {
      
                  this.setObjContainerSize(this.innerContent);
      
      
      
      Severity: Minor
      Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

        Method _renderOptionTree has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
            {
                $tree .= $prefix
                         . '<input type="checkbox" name="'
                         . $this->getName()
        Severity: Minor
        Found in admin/mygrouppermform.php - About 1 hr to fix

          Method make_cal_link has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public function make_cal_link($get_target = '', $smode = 'Monthly', $cid = 0, $caldate = '')
                  {
                      global $xoopsModule;
          
                      if ($cid < 0) {
          Severity: Minor
          Found in class/APCal.php - About 1 hr to fix

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

                    ready: function () {
                        if (hs.isReady) return;
                        hs.isReady = true;
                        for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
                    },
            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 977..981
            assets/images/js/highslide/highslide-with-gallery.js on lines 798..802
            assets/images/js/highslide/highslide.js on lines 625..629

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

            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

                    ready: function () {
                        if (hs.isReady) return;
                        hs.isReady = true;
                        for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
                    },
            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 977..981
            assets/images/js/highslide/highslide-with-gallery.js on lines 798..802
            assets/images/js/highslide/highslide-with-html.js on lines 790..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 72.

            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

                    ready: function () {
                        if (hs.isReady) return;
                        hs.isReady = true;
                        for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
                    },
            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 798..802
            assets/images/js/highslide/highslide-with-html.js on lines 790..794
            assets/images/js/highslide/highslide.js on lines 625..629

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

            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

                    ready: function () {
                        if (hs.isReady) return;
                        hs.isReady = true;
                        for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
                    },
            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 977..981
            assets/images/js/highslide/highslide-with-html.js on lines 790..794
            assets/images/js/highslide/highslide.js on lines 625..629

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

            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 keyHandler has 46 lines of code (exceeds 25 allowed). 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
                        if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
            Severity: Minor
            Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

              Method get_sql_set has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method resolvePath has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function resolvePath($path, $allowed_dirs)
                    {
                        $this->DebugMessage('resolvePath: ' . $path . ' (allowed_dirs: ' . print_r($allowed_dirs, true) . ')', __FILE__, __LINE__);
                
                        // add base path to the top of the list
                Severity: Minor
                Found in thumbs/phpthumb.class.php - About 1 hr to fix

                  Function continuation_for_the_fucking_khtml_browser has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Calendar.continuation_for_the_fucking_khtml_browser = function () {
                          var w = self.element.offsetWidth;
                          var h = self.element.offsetHeight;
                          self.element.style.display = "none";
                          var valign = opts.substr(0, 1);
                  Severity: Minor
                  Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                    Function keyHandler has 45 lines of code (exceeds 25 allowed). 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: Minor
                    Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

                      Function init has 45 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: Minor
                      Found in assets/images/js/highslide/highslide.js - About 1 hr to fix

                        Method copy_templates_f2db has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function copy_templates_f2db($tplset_to, $whr_append = '1')
                        {
                            global $db;
                        
                            // get tplsource
                        Severity: Minor
                        Found in admin/mytplsadmin.php - About 1 hr to fix

                          Method rebuild_cat_tree has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function rebuild_cat_tree($cat_table)
                          {
                              global $conn, $xoopsDB;
                          
                              $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
                          Severity: Minor
                          Found in admin/categories.php - About 1 hr to fix

                            Method get_todays_time_description has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    public function get_todays_time_description(
                                        $start,
                                        $end,
                                        $ynj,
                                        $justify = true,
                            Severity: Minor
                            Found in class/APCal.php - About 1 hr to fix

                              Method URLreadFsock has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function URLreadFsock($host, $file, &$errstr, $successonly = true, $port = 80, $timeout = 10)
                                  {
                                      if (!function_exists('fsockopen') || phpthumb_functions::FunctionIsDisabled('fsockopen')) {
                                          $errstr = 'fsockopen() unavailable';
                              
                              
                              Severity: Minor
                              Found in thumbs/phpthumb.functions.php - About 1 hr to fix

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

                                        cancelLoading: function () {
                                            hs.discardElement(this.wrapper);
                                            hs.expanders[this.key] = null;
                                            if (this.loading) hs.loading.style.left = '-9999px';
                                        },
                                Severity: Major
                                Found in assets/images/js/highslide/highslide.js and 1 other location - About 1 hr to fix
                                assets/images/js/highslide/highslide-with-html.js on lines 1861..1865

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

                                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