xtubeUpdateComment()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Module: XoopsTube
4
 *
5
 * You may not change or alter any portion of this comment or credits
6
 * of supporting developers from this source code or any supporting source code
7
 * which is considered copyrighted (c) material of the original comment or credit authors.
8
 *
9
 * PHP version 5
10
 *
11
 * @param $videoload_id
12
 * @param $total_num
13
 * @author          XOOPS Development Team
14
 * @copyright       2001-2016 XOOPS Project (https://xoops.org)
15
 * @license         GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
16
 * @link            https://xoops.org/
17
 * @since           1.0.6
18
 *
19
 * @category        Module
20
 * @package         Xoopstube
21
 */
22
23
// comment callback functions
24
25
function xtubeUpdateComment($videoload_id, $total_num)
26
{
27
    $db  = \XoopsDatabaseFactory::getDatabaseConnection();
28
    $sql = 'UPDATE ' . $db->prefix('xoopstube_videos') . ' SET comments=' . $total_num . ' WHERE lid=' . $videoload_id;
29
    $db->query($sql);
30
}
31
32
/**
33
 * @param $comment
34
 */
35
function xtubeApproveComment(&$comment)
0 ignored issues
show
Unused Code introduced by
The parameter $comment is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

35
function xtubeApproveComment(/** @scrutinizer ignore-unused */ &$comment)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
36
{
37
    // notification mail here
38
}
39