XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

Consider simplifying this complex logical expression.
Open

    if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

        // Trust units reported by jQuery.css
        unit = unit || initialInUnit[ 3 ];

Severity: Critical
Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                        if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
                            ||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
                            ||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
                            ||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
                            $dev->setMax($limits[1]);
    Severity: Critical
    Found in phpsysinfo/includes/mb/class.ipmiutil.inc.php - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                          if ((isset($buffer[8]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[8], $limits))
                              ||(isset($buffer[9]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[9], $limits))
                              ||(isset($buffer[10]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[10], $limits))
                              ||(isset($buffer[11]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
                              $dev->setMin($limits[1]);
      Severity: Critical
      Found in phpsysinfo/includes/mb/class.ipmiutil.inc.php - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                            if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
                                ||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
                                ||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
                                ||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
                                $dev->setMax($limits[1]);
        Severity: Critical
        Found in phpsysinfo/includes/mb/class.ipmiutil.inc.php - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                              if ((isset($buffer[8]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[8], $limits))
                                  ||(isset($buffer[9]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[9], $limits))
                                  ||(isset($buffer[10]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[10], $limits))
                                  ||(isset($buffer[11]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
                                  $dev->setMin($limits[1]);
          Severity: Critical
          Found in phpsysinfo/includes/mb/class.ipmiutil.inc.php - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                                if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
                                    ||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
                                    ||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
                                    ||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
                                    $dev->setMax($limits[1]);
            Severity: Critical
            Found in phpsysinfo/includes/mb/class.ipmiutil.inc.php - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                                  if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
                                      ||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
                                      ||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
                                      ||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
                                      $dev->setMax($limits[1]);
              Severity: Critical
              Found in phpsysinfo/includes/mb/class.ipmiutil.inc.php - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                    if (PSI_DEBUG || (($level !== 2) && ($level !== 8)) || !(preg_match("/^[^:]*: open_basedir /", $message) || preg_match("/^fopen\(/", $message) || preg_match("/^is_readable\(/", $message) || preg_match("/^file_exists\(/", $message) || preg_match("/^fgets\(/", $message))) { // disable open_basedir, fopen, is_readable, file_exists and fgets warnings and notices
                        $error->addPhpError("errorHandlerPsi : ", "Level : ".$level." Message : ".$message." File : ".$file." Line : ".$line);
                    }
                Severity: Critical
                Found in phpsysinfo/includes/autoloader.inc.php - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                                              if (preg_match('/\s+encap:Ethernet\s+HWaddr\s(\S+)/i', $line, $ar_buf2)
                                               || preg_match('/^\s+ether\s+(\S+)\s+txqueuelen/i', $line, $ar_buf2)) {
                                                  if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $macaddr = preg_replace('/:/', '-', strtoupper($ar_buf2[1]));
                                              } elseif (preg_match('/^\s+inet\saddr:(\S+)\s+P-t-P:(\S+)/i', $line, $ar_buf2)
                                                    || preg_match('/^\s+inet\s+(\S+)\s+netmask.+destination\s+(\S+)/i', $line, $ar_buf2)) {
                  Severity: Critical
                  Found in phpsysinfo/includes/os/class.Linux.inc.php - About 1 hr to fix

                    Function getMemory has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        $("Memory", xml).each(function getMemory(id) {
                            var free = 0, total = 0, used = 0, percent = 0, memoryindex = 0;
                            free = parseInt($(this).attr("Free"), 10);
                            used = parseInt($(this).attr("Used"), 10);
                            total = parseInt($(this).attr("Total"), 10);
                    Severity: Minor
                    Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

                      Function show has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _proto.show = function show(relatedTarget) {
                            var _this = this;
                      
                            if (this._isShown || this._isTransitioning) {
                              return;
                      Severity: Minor
                      Found in phpsysinfo/js/vendor/bootstrap-modal.js - About 1 hr to fix

                        Function setCurrentSettings has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function setCurrentSettings(settings, deep1, deep2) {
                                if (modal.started) {
                                    if (deep1 && deep2) {
                                        $.extend(true, currentSettings[deep1][deep2], settings);
                                    } else if (deep1) {
                        Severity: Minor
                        Found in phpsysinfo/js/jQuery/jquery.nyroModal.js - About 1 hr to fix

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

                              private function _current($hwpath)
                              {
                                 $sensor = glob($hwpath."curr*_input", GLOB_NOSORT);
                                 if (is_array($sensor) && (($total = count($sensor)) > 0)) {
                                      $buf = "";
                          Severity: Minor
                          Found in phpsysinfo/includes/mb/class.hwmon.inc.php - About 1 hr to fix

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

                                private function _power($hwpath)
                                {
                                   $sensor = glob($hwpath."power*_input", GLOB_NOSORT);
                                   if (is_array($sensor) && (($total = count($sensor)) > 0)) {
                                        $buf = "";
                            Severity: Minor
                            Found in phpsysinfo/includes/mb/class.hwmon.inc.php - About 1 hr to fix

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

                                  private function _voltage($hwpath)
                                  {
                                     $sensor = glob($hwpath."in*_input", GLOB_NOSORT);
                                     if (is_array($sensor) && (($total = count($sensor)) > 0)) {
                                          $buf = "";
                              Severity: Minor
                              Found in phpsysinfo/includes/mb/class.hwmon.inc.php - About 1 hr to fix

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

                                    public function execute()
                                    {
                                        if (count($this->_filecontent)>0) {
                                            foreach ($this->prog_items as $item) if (isset($this->_filecontent[$item])) {
                                                if ($item !== 'idrac') {
                                Severity: Minor
                                Found in phpsysinfo/plugins/raid/class.raid.inc.php - About 1 hr to fix

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

                                      public function runTests()
                                      {
                                          // initialize a bunch of arrays
                                          $this->test_results = [];
                                  
                                  
                                  Severity: Minor
                                  Found in phpsecinfo/PhpSecInfo/PhpSecInfo.php - About 1 hr to fix

                                    Function data has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        data: function( key, value ) {
                                            var i, name, data,
                                                elem = this[ 0 ],
                                                attrs = elem && elem.attributes;
                                    
                                    
                                    Severity: Minor
                                    Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix

                                      Function fixCloneNodeIssues has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function fixCloneNodeIssues( src, dest ) {
                                          var nodeName, e, data;
                                      
                                          // We do not need to do anything for non-Elements
                                          if ( dest.nodeType !== 1 ) {
                                      Severity: Minor
                                      Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix

                                        Function cleanData has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            cleanData: function( elems, /* internal */ forceAcceptData ) {
                                                var elem, type, id, data,
                                                    i = 0,
                                                    internalKey = jQuery.expando,
                                                    cache = jQuery.cache,
                                        Severity: Minor
                                        Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language