XoopsModules25x/apcal

View on GitHub
include/updateblock.inc.php

Summary

Maintainability
A
45 mins
Test Coverage

Avoid deeply nested control flow statements.
Open

                    for ($j = 0, $jMax = count($old_vals); $j < $jMax; ++$j) {
                        $def_vals[$j] = $old_vals[$j];
                    }
Severity: Major
Found in include/updateblock.inc.php - About 45 mins to fix

    Blank line found at start of control structure
    Open

    if (substr(XOOPS_VERSION, 6, 3) < 2.1) {
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 159 characters
    Open

                            $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be kept. (value = <b>".$fblock['options']."</b>)";
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 150 characters
    Open

            $sql     = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('newblocks') . ' WHERE mid=' . $mid . " AND block_type <>'D' AND func_num > $count";
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 220 characters
    Open

                            $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be kept and new options are added. (value = <b>".$modversion['blocks'][$fblock['func_num']]['options']."</b>)";
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 179 characters
    Open

                        $local_msgs[]                        = "Option's values of the block <b>" . $fblock['name'] . '</b> will be kept. (value = <b>' . $fblock['options'] . '</b>)';
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 127 characters
    Open

        $query  = 'SELECT mid FROM ' . $GLOBALS['xoopsDB']->prefix('modules') . " WHERE dirname='" . $modversion['dirname'] . "' ";
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 140 characters
    Open

                    $sql = "UPDATE ".$xoopsDB->prefix('newblocks')." SET func_num='$n_funcnum' WHERE mid=".$mid." AND bid='".$fblock['bid']."'";
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 151 characters
    Open

                    if (($modversion['blocks'][$i]['file'] == $fblock['func_file']) and ($modversion['blocks'][$i]['show_func'] == $fblock['show_func'])) {
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 122 characters
    Open

                                                               . '</b> will be kept and new option(s) are added. (value = <b>'
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 238 characters
    Open

                            $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be reset to the default, because of some decrease of options. (value = <b>".$modversion['blocks'][$n_funcnum]['options']."</b>)";
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 126 characters
    Open

                $sql          = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('newblocks') . " WHERE bid='" . $fblock['bid'] . "'";
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    Line exceeds 120 characters; contains 124 characters
    Open

                                        . '</b> will be reset to the default, because of some decrease of options. (value = <b>'
    Severity: Minor
    Found in include/updateblock.inc.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status