comment_functions.php ➔ instruction_com_update()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 2
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
// Функции обратного вызова комментариев
4
5
// Функция вызывается при добавлении комментария
6
/**
7
 * @param $pageid
8
 * @param $total_num
9
 */
10
function instruction_com_update($pageid, $total_num)
11
{
12
    $db  = XoopsDatabaseFactory::getDatabaseConnection();
13
    $sql = 'UPDATE ' . $db->prefix('instruction_page') . ' SET comments = ' . $total_num . ' WHERE pageid  = ' . $pageid;
14
    $db->query($sql);
15
}
16
17
/**
18
 * @param $comment
19
 */
20
function instruction_com_approve(&$comment)
0 ignored issues
show
Unused Code introduced by
The parameter $comment is not used and could be removed.

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

Loading history...
21
{
22
    // notification mail here
23
}
24