qcminecraft/Carbon-Forum-F

View on GitHub

Showing 851 of 851 total issues

File PHPAnalysis.class.php has 796 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*
 * 居于Unicode编码词典的php分词器
 *  1、只适用于php5,必要函数 iconv
 *  2、本程序是使用RMM逆向匹配算法进行分词的,词库需要特别编译,本类里提供了 MakeDict() 方法
Severity: Major
Found in library/PHPAnalysis.class.php - About 1 day to fix

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

    <?php
    if (!defined('InternalAccess')) exit('error: 403 Access Denied');
    ?>
    <!-- main-content start -->
    <div class="main-content">
    Severity: Major
    Found in view/default/recycle_bin.php and 1 other location - About 1 day to fix
    view/default/home.php on lines 1..83

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

    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

    <?php
    if (!defined('InternalAccess')) exit('error: 403 Access Denied');
    ?>
    <!-- main-content start -->
    <div class="main-content">
    Severity: Major
    Found in view/default/home.php and 1 other location - About 1 day to fix
    view/default/recycle_bin.php on lines 1..73

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

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

            initUploader: function () {
                var _this = this,
                    $ = jQuery,    // just in case. Make sure it's not an other libaray.
                    $wrap = _this.$wrap,
                // 图片容器
    Severity: Major
    Found in static/editor/dialogs/image/image.js - About 1 day to fix

      Function initUploader has 363 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              initUploader: function () {
                  var _this = this,
                      $ = jQuery,    // just in case. Make sure it's not an other libaray.
                      $wrap = _this.$wrap,
                  // 图片容器
      Severity: Major
      Found in static/editor/dialogs/video/video.js - About 1 day to fix

        File ru.js has 770 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Carbon-Forum-F
         * https://github.com/lincanbin/Carbon-Forum
         *
         * Copyright 2006-2017 Canbin Lin (lincanbin@hotmail.com)
        Severity: Major
        Found in language/ru/ru.js - About 1 day to fix

          Function initUploader has 359 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  initUploader: function () {
                      var _this = this,
                          $ = jQuery,    // just in case. Make sure it's not an other libaray.
                          $wrap = _this.$wrap,
                      // 图片容器
          Severity: Major
          Found in static/editor/dialogs/attachment/attachment.js - About 1 day to fix

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

            function loadMoreReply(forceToShow) {
                var RepliedToMeList = $("#RepliedToMeList");
                var RepliedToMePage = $("#RepliedToMePage");
                var RepliedToMeLoading = $("#RepliedToMeLoading");
            
            
            Severity: Major
            Found in static/js/default/global.js and 4 other locations - About 1 day to fix
            static/js/default/global.js on lines 69..96
            static/js/default/global.js on lines 98..125
            static/js/mobile/notifications.function.js on lines 43..70
            static/js/mobile/notifications.function.js on lines 73..99

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

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

            function loadMoreMention(forceToShow) {
                var MentionedMeList = $("#MentionedMeList");
                var MentionedMePage = $("#MentionedMePage");
                var MentionedMeLoading = $("#MentionedMeLoading");
            
            
            Severity: Major
            Found in static/js/mobile/notifications.function.js and 4 other locations - About 1 day to fix
            static/js/default/global.js on lines 40..67
            static/js/default/global.js on lines 69..96
            static/js/default/global.js on lines 98..125
            static/js/mobile/notifications.function.js on lines 73..99

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

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

            function loadMoreInbox(forceToShow) {
                var InboxList = $("#InboxList");
                var InboxPage = $("#InboxPage");
                var InboxLoading = $("#InboxLoading");
                if (forceToShow || (InboxList.is(":visible") && InboxLoading.val() !== "1")) {
            Severity: Major
            Found in static/js/mobile/notifications.function.js and 4 other locations - About 1 day to fix
            static/js/default/global.js on lines 40..67
            static/js/default/global.js on lines 69..96
            static/js/default/global.js on lines 98..125
            static/js/mobile/notifications.function.js on lines 43..70

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

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

            function loadMoreMention(forceToShow) {
                var MentionedMeList = $("#MentionedMeList");
                var MentionedMePage = $("#MentionedMePage");
                var MentionedMeLoading = $("#MentionedMeLoading");
            
            
            Severity: Major
            Found in static/js/default/global.js and 4 other locations - About 1 day to fix
            static/js/default/global.js on lines 40..67
            static/js/default/global.js on lines 98..125
            static/js/mobile/notifications.function.js on lines 43..70
            static/js/mobile/notifications.function.js on lines 73..99

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

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

            function loadMoreInbox(forceToShow) {
                var InboxList = $("#InboxList");
                var InboxPage = $("#InboxPage");
                var InboxLoading = $("#InboxLoading");
            
            
            Severity: Major
            Found in static/js/default/global.js and 4 other locations - About 1 day to fix
            static/js/default/global.js on lines 40..67
            static/js/default/global.js on lines 69..96
            static/js/mobile/notifications.function.js on lines 43..70
            static/js/mobile/notifications.function.js on lines 73..99

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

            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 tangram.js has 674 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            // Copyright (c) 2009, Baidu Inc. All rights reserved.
            // 
            // Licensed under the BSD License
            // you may not use this file except in compliance with the License.
            // You may obtain a copy of the License at
            Severity: Major
            Found in static/editor/dialogs/wordimage/tangram.js - About 1 day to fix

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

              <?php
              if (!defined('InternalAccess')) exit('error: 403 Access Denied');
              if (empty($Lang) || !is_array($Lang))
                  $Lang = array();
              
              
              Severity: Major
              Found in language/pl/dashboard.php and 3 other locations - About 1 day to fix
              language/en/dashboard.php on lines 1..60
              language/ru/dashboard.php on lines 1..60
              language/zh-tw/dashboard.php on lines 1..60

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

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

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

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

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

              Refactorings

              Further Reading

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

              <?php
              if (!defined('InternalAccess')) exit('error: 403 Access Denied');
              if (empty($Lang) || !is_array($Lang))
                  $Lang = array();
              
              
              Severity: Major
              Found in language/zh-tw/dashboard.php and 3 other locations - About 1 day to fix
              language/en/dashboard.php on lines 1..60
              language/pl/dashboard.php on lines 1..60
              language/ru/dashboard.php on lines 1..60

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

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

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

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

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

              Refactorings

              Further Reading

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

              <?php
              if (!defined('InternalAccess')) exit('error: 403 Access Denied');
              if (empty($Lang) || !is_array($Lang))
                  $Lang = array();
              
              
              Severity: Major
              Found in language/ru/dashboard.php and 3 other locations - About 1 day to fix
              language/en/dashboard.php on lines 1..60
              language/pl/dashboard.php on lines 1..60
              language/zh-tw/dashboard.php on lines 1..60

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

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

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

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

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

              Refactorings

              Further Reading

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

              <?php
              if (!defined('InternalAccess')) exit('error: 403 Access Denied');
              if (empty($Lang) || !is_array($Lang))
                  $Lang = array();
              
              
              Severity: Major
              Found in language/en/dashboard.php and 3 other locations - About 1 day to fix
              language/pl/dashboard.php on lines 1..60
              language/ru/dashboard.php on lines 1..60
              language/zh-tw/dashboard.php on lines 1..60

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

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

                              var $li = $('<li id="' + file.id + '">' +
                                      '<p class="title">' + file.name + '</p>' +
                                      '<p class="imgWrap"></p>' +
                                      '<p class="progress"><span></span></p>' +
                                      '</li>'),
              Severity: Major
              Found in static/editor/dialogs/attachment/attachment.js and 2 other locations - About 1 day to fix
              static/editor/dialogs/image/image.js on lines 402..435
              static/editor/dialogs/video/video.js on lines 408..441

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

              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

              $("#SendMessageButton").click(function () {
                  $("#SendMessageButton").val(Lang['Submitting']);
                  $.ajax({
                      url: WebsitePath + '/inbox/' + $('#InboxID').val(),
                      type: 'POST',
              Severity: Major
              Found in static/js/mobile/inbox.js and 1 other location - About 1 day to fix
              static/js/default/inbox.js on lines 4..30

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

              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

              $("#SendMessageButton").click(function () {
                  $("#SendMessageButton").val(Lang['Submitting']);
                  $.ajax({
                      url: WebsitePath + '/inbox/' + $('#InboxID').val(),
                      type: 'POST',
              Severity: Major
              Found in static/js/default/inbox.js and 1 other location - About 1 day to fix
              static/js/mobile/inbox.js on lines 50..76

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

              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