htdocs/include/comment_post.php
File comment_post.php
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
// $Id: comment_post.php 12313 2013-09-15 21:14:35Z skenow $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
Consider simplifying this complex logical expression. Open
Open
if (!empty($_POST)) {
if (isset($_POST['com_dopost'])) {
$op = 'post';
} elseif (isset($_POST['com_dopreview'])) {
$op = 'preview';
Reference to static property module
from undeclared class \icms
Open
Open
$comment_config = icms::$module->getInfo('comments');
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
switch (icms::$module->config['com_rule']) {
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
$moddir = icms::$module->getVar('dirname');
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
if (!icms::$user->isAdmin($com_modid)) {
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
if ('system' == icms::$module->getVar('dirname')) {
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$module_handler = icms::handler('icms_module');
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
if (icms::$module->getVar('dirname') != 'system') {
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$sysperm_handler = icms::handler('icms_member_groupperm');
- Exclude checks
Call to method icms_trim
from undeclared class \icms_core_DataFilter
Open
Open
$com_title = icms_core_DataFilter::icms_trim($_POST['com_title']);
- Exclude checks
Call to method checkVar
from undeclared class \icms_core_DataFilter
Open
Open
$comment->setVar('com_text', icms_core_DataFilter::checkVar($_POST['com_text'], 'html', 'input'));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
Open
$criteria->add(new icms_db_criteria_Item('com_itemid', $com_itemid));
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
if ('system' == icms::$module->getVar('dirname')) {
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$comment_handler = icms::handler('icms_data_comment');
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
if (icms::$user->isAdmin($com_modid)
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
|| $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, icms::$user->getGroups())) {
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
switch (icms::$module->config['com_rule']) {
- Exclude checks
Reference to undeclared constant \_NOTITLE
Open
Open
$com_title = ($com_title == '') ? _NOTITLE : $com_title;
- Exclude checks
Call to method stripSlashesGPC
from undeclared class \icms_core_DataFilter
Open
Open
$com_title = icms_core_DataFilter::htmlSpecialChars(icms_core_DataFilter::stripSlashesGPC($_POST['com_title']));
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
if (is_object(icms::$user)) {
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
if (icms::$user->isAdmin($com_modid)
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
Open
$criteria->add(new icms_db_criteria_Item('com_itemid', $com_itemid));
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
$not_module =& icms::$module;
- Exclude checks
Reference to undeclared constant \_CM_THANKSPOST
Open
Open
2, _CM_THANKSPOST);
- Exclude checks
Reference to undeclared constant \_CM_THANKSPOST
Open
Open
. '#comment' . $newcid, 2, _CM_THANKSPOST);
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
$com_modid = icms::$module->getVar('mid');
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
if (is_object(icms::$user)) {
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
Open
$com_mode = isset($_POST['com_mode']) ? icms_core_DataFilter::htmlSpecialChars(trim($_POST['com_mode']), ENT_QUOTES) : 'flat';
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
Open
? $extra_param . '=' . icms_core_DataFilter::htmlSpecialChars(trim($_POST[$extra_param])) . '&'
- Exclude checks
Call to method checkVar
from undeclared class \icms_core_DataFilter
Open
Open
$com_text = icms_core_DataFilter::checkVar($_POST['com_text'], 'html', 'output');
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
if (!empty(icms::$module->config['com_anonpost']) && !empty($noname)) {
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$notification_handler = icms::handler("icms_data_notification");
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$comment_handler = icms::handler('icms_data_comment');
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
if ($comment->getVar('com_uid') != icms::$user->getVar('uid')) {
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
if (!defined('ICMS_ROOT_PATH') || !is_object(icms::$module)) {
- Exclude checks
Call to method instance
from undeclared class \icms_form_elements_captcha_Object
Open
Open
$icmsCaptcha = icms_form_elements_captcha_Object::instance();
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
if (is_object(icms::$user)) {
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
if (XOOPS_COMMENT_APPROVENONE == icms::$module->config['com_rule']) {
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
|| $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, icms::$user->getGroups())) {
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, icms::$user->getGroups())) {
- Exclude checks
Call to method error
from undeclared class \icms_core_Message
Open
Open
icms_core_Message::error();
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$member_handler = icms::handler('icms_member');
- Exclude checks
Reference to static property security
from undeclared class \icms
Open
Open
redirect_header(ICMS_URL.'/',3, implode('<br />', icms::$security->getErrors()));
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
Open
if (icms::$module->config['com_anonpost'] != 1) {
- Exclude checks
Reference to static property security
from undeclared class \icms
Open
Open
if (!icms::$security->check()) {
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$sysperm_handler = icms::handler('icms_member_groupperm');
- Exclude checks
Call to method checkVar
from undeclared class \icms_core_DataFilter
Open
Open
$p_comment =& icms_core_DataFilter::checkVar($_POST['com_text'], 'html', 'input');
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Compo
Open
Open
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_modid', $com_modid));
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
Open
$criteria->add(new icms_db_criteria_Item('com_status', XOOPS_COMMENT_ACTIVE));
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
Open
? $extra_param . '=' . icms_core_DataFilter::htmlSpecialChars(trim($_POST[$extra_param])) . '&'
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$sysperm_handler = icms::handler('icms_member_groupperm');
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
Open
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_modid', $com_modid));
- Exclude checks
Reference to undeclared constant \_NOPERM
Open
Open
2, _NOPERM);
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
Open
$criteria->add(new icms_db_criteria_Item('com_status', XOOPS_COMMENT_ACTIVE));
- Exclude checks
Call to method handler
from undeclared class \icms
Open
Open
$module_handler = icms::handler('icms_module');
- Exclude checks
Call to method error
from undeclared class \icms_core_Message
Open
Open
icms_core_Message::error($comment->getHtmlErrors());
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
Open
$com_title = icms_core_DataFilter::htmlSpecialChars(icms_core_DataFilter::stripSlashesGPC($_POST['com_title']));
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
Open
$uid = icms::$user->getVar('uid');
- Exclude checks
Reference to undeclared constant \_NOPERM
Open
Open
1, _NOPERM);
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
Open
break;
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
1, _NOPERM);
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
2, _NOPERM);
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
2, _CM_THANKSPOST);
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
2, $icmsCaptcha->getMessage());
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
2, $icmsCaptcha->getMessage());
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
redirect_header($redirect_page . '=' . $com_itemid . '&com_id=' . $com_id . '&com_mode=' . $com_mode . '&com_order=' . $com_order,
- Exclude checks
No space found after comma in function call Open
Open
redirect_header(ICMS_URL.'/',3, implode('<br />', icms::$security->getErrors()));
- Exclude checks
Multi-line function call not indented correctly; expected 24 spaces but found 20 Open
Open
. $com_rootid . '&com_mode=' . $com_mode . '&com_order=' . $com_order . '#comment' . $newcid,
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
2, _CM_THANKSPOST);
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
redirect_header($redirect_page . '=' . $com_itemid . '&com_id=' . $com_id . '&com_mode=' . $com_mode . '&com_order=' . $com_order,
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
redirect_header($redirect_page . '=' . $com_itemid . '&com_id=' . $com_id . '&com_mode=' . $com_mode . '&com_order=' . $com_order,
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
1, _NOPERM);
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
redirect_header($redirect_page . '=' . $com_itemid . '&com_id=' . $newcid . '&com_rootid='
- Exclude checks
Expected 1 newline at end of file; 0 found Open
Open
}
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
2, _NOPERM);
- Exclude checks