ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilLinkCheckNotify.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
11
class
ilLinkCheckNotify
12
{
13
public
$db
= null;
14
15
16
public
function
__construct
(
$db
)
17
{
18
$this->db =
$db
;
19
}
20
21
public
function
setUserId
($a_usr_id)
22
{
23
$this->usr_id = $a_usr_id;
24
}
25
public
function
getUserId
()
26
{
27
return
$this->usr_id;
28
}
29
public
function
setObjId
($a_obj_id)
30
{
31
$this->obj_id = $a_obj_id;
32
}
33
public
function
getObjId
()
34
{
35
return
$this->obj_id;
36
}
37
38
public
function
addNotifier
()
39
{
40
global
$ilDB
;
41
42
$this->
deleteNotifier
();
43
44
$query
=
"INSERT INTO link_check_report (obj_id,usr_id) "
.
45
"VALUES ( "
.
46
$ilDB->quote($this->
getObjId
(),
'integer'
) .
", "
.
47
$ilDB->quote($this->
getUserId
(),
'integer'
) .
48
")"
;
49
$res
= $ilDB->manipulate(
$query
);
50
51
return
true
;
52
}
53
54
public
function
deleteNotifier
()
55
{
56
global
$ilDB
;
57
58
$query
=
"DELETE FROM link_check_report "
.
59
"WHERE obj_id = "
. $ilDB->quote($this->
getObjId
(),
'integer'
) .
" "
.
60
"AND usr_id = "
. $ilDB->quote($this->
getUserId
(),
'integer'
) .
" "
;
61
$res
= $ilDB->manipulate(
$query
);
62
63
return
true
;
64
}
65
66
/* Static */
67
public
static
function
_getNotifyStatus
($a_usr_id, $a_obj_id)
68
{
69
global
$ilDB
;
70
71
$query
=
"SELECT * FROM link_check_report "
.
72
"WHERE obj_id = "
. $ilDB->quote($a_obj_id,
'integer'
) .
" "
.
73
"AND usr_id = "
. $ilDB->quote($a_usr_id,
'integer'
);
74
$res
= $ilDB->query(
$query
);
75
76
return
$res
->numRows() ? true :
false
;
77
}
78
79
public
static
function
_deleteUser
($a_usr_id)
80
{
81
global
$ilDB
;
82
83
$query
=
"DELETE FROM link_check_report "
.
84
"WHERE usr_id = "
. $ilDB->quote($a_usr_id,
'integer'
);
85
$res
= $ilDB->manipulate(
$query
);
86
return
true
;
87
}
88
89
public
static
function
_deleteObject
($a_obj_id)
90
{
91
global
$ilDB
;
92
93
$query
=
"DELETE FROM link_check_report "
.
94
"WHERE obj_id = "
. $ilDB->quote($a_obj_id,
'integer'
) .
" "
;
95
$res
= $ilDB->manipulate(
$query
);
96
97
return
true
;
98
}
99
100
public
static
function
_getNotifiers
($a_obj_id)
101
{
102
global
$ilDB
;
103
104
$query
=
"SELECT * FROM link_check_report "
.
105
"WHERE obj_id = "
. $ilDB->quote($a_obj_id,
'integer'
) .
" "
;
106
107
$res
= $ilDB->query(
$query
);
108
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
109
$usr_ids[] =
$row
->usr_id;
110
}
111
112
return
$usr_ids ? $usr_ids :
array
();
113
}
114
115
public
static
function
_getAllNotifiers
(&
$db
)
116
{
117
global
$ilDB
;
118
119
$query
=
"SELECT * FROM link_check_report "
;
120
121
$res
=
$db
->query(
$query
);
122
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
123
$usr_ids[
$row
->usr_id][] =
$row
->obj_id;
124
}
125
126
return
$usr_ids ? $usr_ids :
array
();
127
}
128
}
ilLinkCheckNotify\deleteNotifier
deleteNotifier()
Definition:
class.ilLinkCheckNotify.php:54
ilLinkCheckNotify\addNotifier
addNotifier()
Definition:
class.ilLinkCheckNotify.php:38
ilLinkCheckNotify\_deleteObject
static _deleteObject($a_obj_id)
Definition:
class.ilLinkCheckNotify.php:89
ilLinkCheckNotify
class for checking external links in page objects.
Definition:
class.ilLinkCheckNotify.php:11
ilLinkCheckNotify\$db
$db
Definition:
class.ilLinkCheckNotify.php:13
ilLinkCheckNotify\_getNotifiers
static _getNotifiers($a_obj_id)
Definition:
class.ilLinkCheckNotify.php:100
ilLinkCheckNotify\_getAllNotifiers
static _getAllNotifiers(&$db)
Definition:
class.ilLinkCheckNotify.php:115
ilLinkCheckNotify\getUserId
getUserId()
Definition:
class.ilLinkCheckNotify.php:25
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilLinkCheckNotify\setObjId
setObjId($a_obj_id)
Definition:
class.ilLinkCheckNotify.php:29
ilLinkCheckNotify\setUserId
setUserId($a_usr_id)
Definition:
class.ilLinkCheckNotify.php:21
ilLinkCheckNotify\__construct
__construct($db)
Definition:
class.ilLinkCheckNotify.php:16
$query
$query
Definition:
proxy_ylocal.php:13
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilLinkCheckNotify\_getNotifyStatus
static _getNotifyStatus($a_usr_id, $a_obj_id)
Definition:
class.ilLinkCheckNotify.php:67
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
$row
$row
Definition:
10autofilter-selection-1.php:74
ilLinkCheckNotify\getObjId
getObjId()
Definition:
class.ilLinkCheckNotify.php:33
ilLinkCheckNotify\_deleteUser
static _deleteUser($a_usr_id)
Definition:
class.ilLinkCheckNotify.php:79
Services
LinkChecker
classes
class.ilLinkCheckNotify.php
Generated on Tue Jan 28 2025 19:01:36 for ILIAS by
1.8.13 (using
Doxyfile
)