ImpressCMS/impresscms

View on GitHub
htdocs/include/comment_view.php

Summary

Maintainability
A
45 mins
Test Coverage

Avoid deeply nested control flow statements.
Open

                        if (false != $comments) {
                            $renderer =& icms_data_comment_Renderer::instance($xoopsTpl);
                            $renderer->setComments($comments);
                            $renderer->renderThreadView($top_comments[$i]->getVar('com_id'), $admin_view);
                        }
Severity: Major
Found in htdocs/include/comment_view.php - About 45 mins to fix

    Reference to undeclared constant \_CM_REFRESH
    Open

            $navbar .= '>'. _NEWESTFIRST .'</option></select><input type="hidden" name="' . $comment_config['itemName'] . '" value="' . $com_itemid . '" /> <input type="submit" value="'. _CM_REFRESH .'" class="formButton" />';
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_NEWESTFIRST
    Open

            $navbar .= '>'. _NEWESTFIRST .'</option></select><input type="hidden" name="' . $comment_config['itemName'] . '" value="' . $com_itemid . '" /> <input type="submit" value="'. _CM_REFRESH .'" class="formButton" />';
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Variable $xoopsTpl is undeclared
    Open

                $xoopsTpl->assign('anon_canpost', true);
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Call to method handler from undeclared class \icms
    Open

            $comment_handler = icms::handler('icms_data_comment');
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to static property module from undeclared class \icms
    Open

            if (!empty(icms::$module->config['com_anonpost']) || is_object(icms::$user)) {
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_POSTS
    Open

                    'lang_from' => _CM_FROM, 'lang_joined' => _CM_JOINED, 'lang_posts' => _CM_POSTS,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property module from undeclared class \icms
    Open

        $comment_config = icms::$module->getInfo('comments');
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Call to method instance from undeclared class \icms_data_comment_Renderer
    Open

                $renderer =& icms_data_comment_Renderer::instance($xoopsTpl);
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to static property user from undeclared class \icms
    Open

            if (!empty(icms::$module->config['com_anonpost']) || is_object(icms::$user)) {
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_POSTER
    Open

                    'lang_poster' => _CM_POSTER, 'lang_thread' => _CM_THREAD, 'lang_edit' => _EDIT,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property module from undeclared class \icms
    Open

    if (XOOPS_COMMENT_APPROVENONE != icms::$module->config['com_rule']) {
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_OLDESTFIRST
    Open

            $navbar .= '>'. _OLDESTFIRST .'</option><option value="' . XOOPS_COMMENT_NEW1ST . '"';
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_JOINED
    Open

                    'lang_from' => _CM_FROM, 'lang_joined' => _CM_JOINED, 'lang_posts' => _CM_POSTS,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property user from undeclared class \icms
    Open

            if (is_object(icms::$user) && icms::$user->isAdmin(icms::$module->getVar('mid'))) {
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Call to method instance from undeclared class \icms_data_comment_Renderer
    Open

                        $renderer =& icms_data_comment_Renderer::instance($xoopsTpl);
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_DELETE
    Open

                    'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_subject' => _CM_REPLIES,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_NESTED
    Open

            $navbar .= '>'. _NESTED .'</option></select> <select name="com_order"><option value="' . XOOPS_COMMENT_OLD1ST . '"';
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property user from undeclared class \icms
    Open

                if (is_object(icms::$user)) {
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Variable $xoopsTpl is undeclared
    Open

                $xoopsTpl->assign(array('comment_order' => XOOPS_COMMENT_OLD1ST, 'order_other' => XOOPS_COMMENT_NEW1ST));
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_REPLY
    Open

                    'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_subject' => _CM_REPLIES,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_THREADED
    Open

            $navbar .= '>'. _THREADED .'</option><option value="nest"';
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property user from undeclared class \icms
    Open

                    $com_order = icms::$user->getVar('uorder');
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_FLAT
    Open

            $navbar .= '>' . _FLAT . '</option><option value="thread"';
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Variable $postcomment_link is undeclared
    Open

            unset($postcomment_link);
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_UPDATED
    Open

                    'lang_posted' => _CM_POSTED, 'lang_updated' => _CM_UPDATED, 'lang_notice' => _CM_NOTICE
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Variable $xoopsTpl is undeclared
    Open

        $xoopsTpl->assign('xoops_iscommentadmin', $gperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $groups));
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property user from undeclared class \icms
    Open

                if (is_object(icms::$user)) {
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to static property module from undeclared class \icms
    Open

                $comments =& $comment_handler->getByItemId(icms::$module->getVar('mid'), $com_itemid, $com_dborder);
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to static property module from undeclared class \icms
    Open

                        icms::$module->getVar('mid'), $com_itemid, $com_dborder
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Call to method instance from undeclared class \icms_data_comment_Renderer
    Open

                                $renderer =& icms_data_comment_Renderer::instance($xoopsTpl);
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to static property module from undeclared class \icms
    Open

            if (is_object(icms::$user) && icms::$user->isAdmin(icms::$module->getVar('mid'))) {
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Call to method htmlSpecialChars from undeclared class \icms_core_DataFilter
    Open

                            $extra_params .= $extra_param . '=' . icms_core_DataFilter::htmlSpecialChars(trim($_GET[$extra_param])) . '&amp;';
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Variable $xoopsTpl is undeclared
    Open

            $xoopsTpl->assign(
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_FROM
    Open

                    'lang_from' => _CM_FROM, 'lang_joined' => _CM_JOINED, 'lang_posts' => _CM_POSTS,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Variable $xoopsTpl is undeclared
    Open

                $xoopsTpl->assign(array('comment_order' => XOOPS_COMMENT_NEW1ST, 'order_other' => XOOPS_COMMENT_OLD1ST));
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Call to method handler from undeclared class \icms
    Open

        $gperm_handler = icms::handler('icms_member_groupperm');
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Call to method htmlSpecialChars from undeclared class \icms_core_DataFilter
    Open

                        $hidden_value = icms_core_DataFilter::htmlSpecialChars($extra_param_val, ENT_QUOTES);
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_POSTCOMMENT
    Open

                    . $link_extra . '\'" class="formButton" value="' . _CM_POSTCOMMENT . '" />';
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property user from undeclared class \icms
    Open

                    $com_mode = icms::$user->getVar('umode');
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_REPLIES
    Open

                    'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_subject' => _CM_REPLIES,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property module from undeclared class \icms
    Open

                $top_comments = $comment_handler->getTopComments(icms::$module->getVar('mid'), $com_itemid, $com_dborder);
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_NOTICE
    Open

                    'lang_posted' => _CM_POSTED, 'lang_updated' => _CM_UPDATED, 'lang_notice' => _CM_NOTICE
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Call to method instance from undeclared class \icms_data_comment_Renderer
    Open

                        $renderer =& icms_data_comment_Renderer::instance($xoopsTpl);
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_THREAD
    Open

                    'lang_poster' => _CM_POSTER, 'lang_thread' => _CM_THREAD, 'lang_edit' => _EDIT,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to static property module from undeclared class \icms
    Open

    if (!defined('ICMS_ROOT_PATH') || !is_object(icms::$module)) {
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Reference to static property user from undeclared class \icms
    Open

        $groups = (icms::$user) ? icms::$user -> getGroups() : ICMS_GROUP_ANONYMOUS;
    Severity: Critical
    Found in htdocs/include/comment_view.php by phan

    Variable $xoopsTpl is undeclared
    Open

            $xoopsTpl->assign('comment_mode', $com_mode);
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Variable $xoopsTpl is undeclared
    Open

                $xoopsTpl->assign('comment_url', $comment_url . $comment_config['itemName'] . '=' . $com_itemid . '&amp;com_mode=thread&amp;com_order=' . $com_order);
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Variable $xoopsTpl is undeclared
    Open

            $xoopsTpl->assign(
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_EDIT
    Open

                    'lang_poster' => _CM_POSTER, 'lang_thread' => _CM_THREAD, 'lang_edit' => _EDIT,
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Reference to undeclared constant \_CM_POSTED
    Open

                    'lang_posted' => _CM_POSTED, 'lang_updated' => _CM_UPDATED, 'lang_notice' => _CM_NOTICE
    Severity: Minor
    Found in htdocs/include/comment_view.php by phan

    Blank line found at start of control structure
    Open

    if (XOOPS_COMMENT_APPROVENONE != icms::$module->config['com_rule']) {

    Only one argument is allowed per line in a multi-line function call
    Open

                                $top_comments[$i]->getVar('com_rootid'), $top_comments[$i]->getVar('com_id')

    Only one argument is allowed per line in a multi-line function call
    Open

                            $top_comments[$i]->getVar('com_rootid'), $top_comments[$i]->getVar('com_id')

    Only one argument is allowed per line in a multi-line function call
    Open

                        icms::$module->getVar('mid'), $com_itemid, $com_dborder

    Only one argument is allowed per line in a multi-line function call
    Open

                        icms::$module->getVar('mid'), $com_itemid, $com_dborder

    There are no issues that match your filters.

    Category
    Status