ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLinkCheckNotify Class Reference

class for checking external links in page objects. More...

+ Collaboration diagram for ilLinkCheckNotify:

Public Member Functions

 ilLinkCheckNotify (&$db)
 
 setUserId ($a_usr_id)
 
 getUserId ()
 
 setObjId ($a_obj_id)
 
 getObjId ()
 
 addNotifier ()
 
 deleteNotifier ()
 
 _getNotifyStatus ($a_usr_id, $a_obj_id)
 
 _deleteUser ($a_usr_id)
 
 _deleteObject ($a_obj_id)
 
 _getNotifiers ($a_obj_id)
 
 _getAllNotifiers (&$db)
 

Data Fields

 $db = null
 

Detailed Description

class for checking external links in page objects.

All user who want to get messages about invalid links of a page_object are stored here

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 11 of file class.ilLinkCheckNotify.php.

Member Function Documentation

◆ _deleteObject()

ilLinkCheckNotify::_deleteObject (   $a_obj_id)

Definition at line 89 of file class.ilLinkCheckNotify.php.

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 }
global $ilDB

References $ilDB, $query, and $res.

Referenced by ilObjLinkResource\delete(), and ilwebresourceTest\testLinkCheck().

+ Here is the caller graph for this function:

◆ _deleteUser()

ilLinkCheckNotify::_deleteUser (   $a_usr_id)

Definition at line 79 of file class.ilLinkCheckNotify.php.

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 }

References $ilDB, $query, and $res.

Referenced by ilObjUser\delete().

+ Here is the caller graph for this function:

◆ _getAllNotifiers()

ilLinkCheckNotify::_getAllNotifiers ( $db)

Definition at line 116 of file class.ilLinkCheckNotify.php.

117 {
118 global $ilDB;
119
120 $query = "SELECT * FROM link_check_report ";
121
122 $res = $db->query($query);
123 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
124 {
125 $usr_ids[$row->usr_id][] = $row->obj_id;
126 }
127
128 return $usr_ids ? $usr_ids : array();
129 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11

References $db, $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilLinkChecker\__sendMail().

+ Here is the caller graph for this function:

◆ _getNotifiers()

ilLinkCheckNotify::_getNotifiers (   $a_obj_id)

Definition at line 100 of file class.ilLinkCheckNotify.php.

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(DB_FETCHMODE_OBJECT))
109 {
110 $usr_ids[] = $row->usr_id;
111 }
112
113 return $usr_ids ? $usr_ids : array();
114 }

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilwebresourceTest\testLinkCheck().

+ Here is the caller graph for this function:

◆ _getNotifyStatus()

ilLinkCheckNotify::_getNotifyStatus (   $a_usr_id,
  $a_obj_id 
)

Definition at line 67 of file class.ilLinkCheckNotify.php.

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 }

References $ilDB, $query, and $res.

Referenced by ilObjContentObjectGUI\linkChecker(), ilObjLinkResourceGUI\linkChecker(), and ilwebresourceTest\testLinkCheck().

+ Here is the caller graph for this function:

◆ addNotifier()

ilLinkCheckNotify::addNotifier ( )

Definition at line 38 of file class.ilLinkCheckNotify.php.

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 }

References $ilDB, $query, $res, deleteNotifier(), getObjId(), and getUserId().

+ Here is the call graph for this function:

◆ deleteNotifier()

ilLinkCheckNotify::deleteNotifier ( )

Definition at line 54 of file class.ilLinkCheckNotify.php.

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 }

References $ilDB, $query, $res, getObjId(), and getUserId().

Referenced by addNotifier().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObjId()

ilLinkCheckNotify::getObjId ( )

Definition at line 33 of file class.ilLinkCheckNotify.php.

34 {
35 return $this->obj_id;
36 }

Referenced by addNotifier(), and deleteNotifier().

+ Here is the caller graph for this function:

◆ getUserId()

ilLinkCheckNotify::getUserId ( )

Definition at line 25 of file class.ilLinkCheckNotify.php.

26 {
27 return $this->usr_id;
28 }

Referenced by addNotifier(), and deleteNotifier().

+ Here is the caller graph for this function:

◆ ilLinkCheckNotify()

ilLinkCheckNotify::ilLinkCheckNotify ( $db)

Definition at line 16 of file class.ilLinkCheckNotify.php.

17 {
18 $this->db =& $db;
19 }

References $db.

◆ setObjId()

ilLinkCheckNotify::setObjId (   $a_obj_id)

Definition at line 29 of file class.ilLinkCheckNotify.php.

30 {
31 $this->obj_id = $a_obj_id;
32 }

◆ setUserId()

ilLinkCheckNotify::setUserId (   $a_usr_id)

Definition at line 21 of file class.ilLinkCheckNotify.php.

22 {
23 $this->usr_id = $a_usr_id;
24 }

Field Documentation

◆ $db

ilLinkCheckNotify::$db = null

Definition at line 13 of file class.ilLinkCheckNotify.php.

Referenced by _getAllNotifiers(), and ilLinkCheckNotify().


The documentation for this class was generated from the following file: