XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Consider simplifying this complex logical expression.
Open

            if (!hs.container) {

                hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                hs.ieLt9 = hs.ie && hs.uaVersion < 9;

Severity: Critical
Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                if (!hs.container) {
    
                    hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                    hs.ieLt9 = hs.ie && hs.uaVersion < 9;
    
    
    Severity: Critical
    Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

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

      if (!empty($_POST['submit'])) {
          if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
              redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
          }
      
      
      Severity: Major
      Found in admin/myblocksadmin2.php and 1 other location - About 1 hr to fix
      admin/myblocksadmin.php on lines 347..354

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

                      if (isset($_POST['saveas'])) {
                          $result = $GLOBALS['xoopsDB']->query("SELECT * FROM {$this->pic_table} WHERE event_id={$_POST['event_oldid']}");
                          while ($pic = $GLOBALS['xoopsDB']->fetchObject($result)) {
                              $GLOBALS['xoopsDB']->query("INSERT INTO {$this->pic_table}(event_id, picture, main_pic) VALUES ({$event_id}, '{$pic->picture}', {$pic->main_pic})");
                          }
      Severity: Major
      Found in class/APCal.php and 1 other location - About 1 hr to fix
      class/APCal.php on lines 3607..3615

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

                      if (isset($_POST['saveas'])) {
                          $result = $GLOBALS['xoopsDB']->query("SELECT * FROM {$this->pic_table} WHERE event_id={$_POST['event_oldid']}");
                          while ($pic = $GLOBALS['xoopsDB']->fetchObject($result)) {
                              $GLOBALS['xoopsDB']->query("INSERT INTO {$this->pic_table}(event_id, picture, main_pic) VALUES ({$event_id}, '{$pic->picture}', {$pic->main_pic})");
                          }
      Severity: Major
      Found in class/APCal.php and 1 other location - About 1 hr to fix
      class/APCal.php on lines 3573..3581

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

      if (!empty($_POST['submit'])) {
          if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
              redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
          }
      
      
      Severity: Major
      Found in admin/myblocksadmin.php and 1 other location - About 1 hr to fix
      admin/myblocksadmin2.php on lines 350..357

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

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

              dragHandler: function (e) {
                  if (!hs.dragArgs) return true;
                  if (!e) e = window.event;
                  var a = hs.dragArgs, exp = a.exp;
                  if (exp.iframe) {
      Severity: Minor
      Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

        Method delete_regonline has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function delete_regonline($event_id)
                {
                    //delete data from table apcal_ro_members
                    $sql = 'DELETE '
                           . XOOPS_DB_PREFIX
        Severity: Minor
        Found in class/APCal.php - About 1 hr to fix

          Method apcal_after_schedule_show_tpl has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method load has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function load($data, &$datLen)
                {
                    $datLen = 0;
            
                    while (true) {
            Severity: Minor
            Found in thumbs/phpthumb.gif.php - About 1 hr to fix

              Method ApacheLookupURIarray has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function ApacheLookupURIarray($filename)
                  {
                      // apache_lookup_uri() only works when PHP is installed as an Apache module.
                      if (php_sapi_name() == 'apache') {
                          //$property_exists_exists = function_exists('property_exists');
              Severity: Minor
              Found in thumbs/phpthumb.functions.php - About 1 hr to fix

                Method CleanUpURLencoding has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function CleanUpURLencoding($url, $queryseperator = '&')
                    {
                        if (!preg_match('#^http#i', $url)) {
                            return $url;
                        }
                Severity: Minor
                Found in thumbs/phpthumb.functions.php - About 1 hr to fix

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

                              if (this.fadeInOut) {
                                  hs.setStyles(this.wrapper, {opacity: up ? 0 : 1});
                                  hs.extend(to.wrapper, {opacity: up});
                              }
                  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 1593..1596
                  assets/images/js/highslide/highslide-with-html.js on lines 1764..1767
                  assets/images/js/highslide/highslide.js on lines 1345..1348

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

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                              if (this.fadeInOut) {
                                  hs.setStyles(this.wrapper, {opacity: up ? 0 : 1});
                                  hs.extend(to.wrapper, {opacity: up});
                              }
                  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 2069..2072
                  assets/images/js/highslide/highslide-with-html.js on lines 1764..1767
                  assets/images/js/highslide/highslide.js on lines 1345..1348

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

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                              if (this.fadeInOut) {
                                  hs.setStyles(this.wrapper, {opacity: up ? 0 : 1});
                                  hs.extend(to.wrapper, {opacity: up});
                              }
                  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 2069..2072
                  assets/images/js/highslide/highslide-with-gallery.js on lines 1593..1596
                  assets/images/js/highslide/highslide.js on lines 1345..1348

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

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                              if (this.fadeInOut) {
                                  hs.setStyles(this.wrapper, {opacity: up ? 0 : 1});
                                  hs.extend(to.wrapper, {opacity: up});
                              }
                  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 2069..2072
                  assets/images/js/highslide/highslide-with-gallery.js on lines 1593..1596
                  assets/images/js/highslide/highslide-with-html.js on lines 1764..1767

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

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                              if (this.slideshow) {
                                  var c = this.slideshow.controls;
                                  if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                              }
                  Severity: Major
                  Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 1 hr to fix
                  assets/images/js/highslide/highslide-full.js on lines 2911..2914

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

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                              if (this.slideshow) {
                                  var c = this.slideshow.controls;
                                  if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                              }
                  Severity: Major
                  Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 1 hr to fix
                  assets/images/js/highslide/highslide-with-gallery.js on lines 2326..2329

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

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

                          dragHandler: function (e) {
                              if (!hs.dragArgs) return true;
                              if (!e) e = window.event;
                              var a = hs.dragArgs, exp = a.exp;
                              if (exp.iframe) {
                  Severity: Minor
                  Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

                    Method notify_new_event has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public function notify_new_event($event_id)
                            {
                                $rs    = $GLOBALS['xoopsDB']->query("SELECT summary,admission,categories,class,uid,groupid FROM $this->table WHERE id='$event_id'");
                                $event = $GLOBALS['xoopsDB']->fetchObject($rs);
                    
                    
                    Severity: Minor
                    Found in class/APCal_xoops.php - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language