Completed
Push — master ( 00e474...9d3fbd )
by Michael
04:26
created

include/comment_functions.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/*
3
 You may not change or alter any portion of this comment or credits
4
 of supporting developers from this source code or any supporting source code
5
 which is considered copyrighted (c) material of the original comment or credit authors.
6
7
 This program is distributed in the hope that it will be useful,
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
12
/**
13
 * oledrion
14
 *
15
 * @copyright   {@link http://xoops.org/ XOOPS Project}
16
 * @license     {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
17
 * @author      Hervé Thouzard (http://www.herve-thouzard.com/)
18
 * @param $product_id
19
 * @param $total_num
20
 */
21
22
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
23
24
function oledrion_com_update($product_id, $total_num)
25
{
26
    include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
27
    global $h_oledrion_products;
28
    if (!is_object($h_oledrion_products)) {
29
        $handlers            = OledrionHandler::getInstance();
30
        $h_oledrion_products = $handlers->oledrion_products;
0 ignored issues
show
The property oledrion_products does not seem to exist in OledrionHandler.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
31
    }
32
    $h_oledrion_products->updateCommentsCount($product_id, $total_num);
33
}
34
35
/**
36
 * @param $comment
37
 */
38
function oledrion_com_approve(&$comment)
39
{
40
    // notification mail here
41
}
42