XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Method GenerateThumbnail has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function GenerateThumbnail()
    {
        $this->setOutputFormat();
        $this->phpThumbDebug('8a');
        $this->ResolveSource();
Severity: Major
Found in thumbs/phpthumb.class.php - About 2 hrs to fix

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

            reOrder: function () {
                for (var i = 0; i < hs.expanders.length; i++)
                    if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
            },
    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 565..568
    assets/images/js/highslide/highslide-with-html.js on lines 540..543
    assets/images/js/highslide/highslide.js on lines 401..404

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

    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.fx = function (elem, options, prop) {
            this.options = options;
            this.elem = elem;
            this.prop = prop;
    
    
    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 1017..1023
    assets/images/js/highslide/highslide-with-gallery.js on lines 837..843
    assets/images/js/highslide/highslide.js on lines 664..670

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

    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.fx = function (elem, options, prop) {
            this.options = options;
            this.elem = elem;
            this.prop = prop;
    
    
    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 1017..1023
    assets/images/js/highslide/highslide-with-gallery.js on lines 837..843
    assets/images/js/highslide/highslide-with-html.js on lines 830..836

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

    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

            reOrder: function () {
                for (var i = 0; i < hs.expanders.length; i++)
                    if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
            },
    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 709..712
    assets/images/js/highslide/highslide-with-gallery.js on lines 565..568
    assets/images/js/highslide/highslide-with-html.js on lines 540..543

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

    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

            reOrder: function () {
                for (var i = 0; i < hs.expanders.length; i++)
                    if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
            },
    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 709..712
    assets/images/js/highslide/highslide-with-html.js on lines 540..543
    assets/images/js/highslide/highslide.js on lines 401..404

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

    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

            reOrder: function () {
                for (var i = 0; i < hs.expanders.length; i++)
                    if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
            },
    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 709..712
    assets/images/js/highslide/highslide-with-gallery.js on lines 565..568
    assets/images/js/highslide/highslide.js on lines 401..404

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

    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.fx = function (elem, options, prop) {
            this.options = options;
            this.elem = elem;
            this.prop = prop;
    
    
    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 1017..1023
    assets/images/js/highslide/highslide-with-html.js on lines 830..836
    assets/images/js/highslide/highslide.js on lines 664..670

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

    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.fx = function (elem, options, prop) {
            this.options = options;
            this.elem = elem;
            this.prop = prop;
    
    
    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 837..843
    assets/images/js/highslide/highslide-with-html.js on lines 830..836
    assets/images/js/highslide/highslide.js on lines 664..670

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

    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 onupdate.php has 252 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: Minor
    Found in include/onupdate.php - About 2 hrs to fix

      Function mouseClickHandler has 51 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-with-gallery.js - About 2 hrs to fix

        Function mouseClickHandler has 51 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.js - About 2 hrs to fix

          Method get_formtextdateselect has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public function get_formtextdateselect($name, $ymd, $long_ymdn = '')
                  {
                      require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
          
                      // day of week starting
          Severity: Major
          Found in class/APCal_xoops.php - About 2 hrs to fix

            Method get_date_schedule has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public function get_date_schedule($get_target = '')
                    {
                        // if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;
            
                        $ret = '';
            Severity: Major
            Found in class/APCal.php - About 2 hrs to fix

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

                      changeSize: function (up, to, dur) {
              
                          if (this.outline && !this.outlineWhileAnimating) {
                              if (up) this.outline.setPosition();
                              else this.outline.destroy();
              Severity: Minor
              Found in assets/images/js/highslide/highslide.js - About 2 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                if (isset($_POST['delete'])) {
                
                    // Ticket Check
                    if (!$xoopsGTicket->check()) {
                        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
                Severity: Critical
                Found in admin/events.php - About 2 hrs to fix

                  Method copy_templates_db2db has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function copy_templates_db2db($tplset_from, $tplset_to, $whr_append = '1')
                  {
                      global $db;
                  
                      // get tplfile and tplsource
                  Severity: Minor
                  Found in admin/mytplsadmin.php - About 2 hrs to fix

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

                        public function render($currentoption = 1, $display = true)
                        {
                            global $modversion;
                            $_dirname = $this->_obj->getVar('dirname');
                            $i        = 0;
                    Severity: Minor
                    Found in class/adminMenu.php - About 2 hrs to fix

                      Method setCacheDirectory has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function setCacheDirectory()
                          {
                              // resolve cache directory to absolute pathname
                              $this->DebugMessage('setCacheDirectory() starting with config_cache_directory = "' . $this->config_cache_directory . '"', __FILE__, __LINE__);
                              if (substr($this->config_cache_directory, 0, 1) == '.') {
                      Severity: Minor
                      Found in thumbs/phpthumb.class.php - About 2 hrs to fix

                        Method xoops_module_install_apcal has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function xoops_module_install_apcal(XoopsModule $xoopsModule)
                        {
                            require_once  __DIR__ . '/../../../mainfile.php';
                            require_once  __DIR__ . '/../include/config.php';
                        
                        
                        Severity: Minor
                        Found in include/oninstall.php - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language