Public Member Functions | Data Fields

ilLinkCheckNotify Class Reference

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

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 <smeyer@databay.de>
Version:
Id:
class.ilLinkCheckNotify.php 13124 2007-01-29 15:21:26Z smeyer

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


Member Function Documentation

ilLinkCheckNotify::_deleteObject ( a_obj_id  ) 

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

Referenced by ilObjLinkResource::delete().

        {
                global $ilDB;

                $query = "DELETE FROM link_check_report ".
                        "WHERE obj_id = ".$ilDB->quote($a_obj_id)." ";

                $ilDB->query($query);

                return true;
        }

Here is the caller graph for this function:

ilLinkCheckNotify::_deleteUser ( a_usr_id  ) 

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

Referenced by ilObjUser::delete().

        {
                global $ilDB;

                $query = "DELETE FROM link_check_report ".
                        "WHERE usr_id = ".$ilDB->quote($a_usr_id)." ";

                $ilDB->query($query);

                return true;
        }

Here is the caller graph for this function:

ilLinkCheckNotify::_getAllNotifiers ( &$  db  ) 

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

References $db, and $res.

Referenced by ilLinkChecker::__sendMail().

        {
                global $ilDB;

                $query = "SELECT * FROM link_check_report ";

                $res = $db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $usr_ids[$row->usr_id][] = $row->obj_id;
                }

                return $usr_ids ? $usr_ids : array();
        }                       

Here is the caller graph for this function:

ilLinkCheckNotify::_getNotifiers ( a_obj_id  ) 

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

References $res.

        {
                global $ilDB;

                $query = "SELECT * FROM link_check_report ".
                        "WHERE obj_id = ".$ilDB->quote($a_obj_id)." ";

                $res = $ilDB->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $usr_ids[] = $row->usr_id;
                }

                return $usr_ids ? $usr_ids : array();
        }

ilLinkCheckNotify::_getNotifyStatus ( a_usr_id,
a_obj_id 
)

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

References $res.

Referenced by ilObjContentObjectGUI::linkChecker(), and ilObjLinkResourceGUI::linkCheckerObject().

        {
                global $ilDB;

                $query = "SELECT * FROM link_check_report ".
                        "WHERE obj_id = ".$ilDB->quote($a_obj_id)." ".
                        "AND usr_id = ".$ilDB->quote($a_usr_id)." ";

                $res = $ilDB->query($query);

                return $res->numRows() ? true : false;
        }

Here is the caller graph for this function:

ilLinkCheckNotify::addNotifier (  ) 

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

References deleteNotifier(), getObjId(), and getUserId().

        {
                global $ilDB;
                
                $this->deleteNotifier();

                $query = "INSERT INTO link_check_report ".
                        "SET obj_id = ".$ilDB->quote($this->getObjId()).", ".
                        "usr_id = ".$ilDB->quote($this->getUserId())."";

                $this->db->query($query);

                return true;
        }

Here is the call graph for this function:

ilLinkCheckNotify::deleteNotifier (  ) 

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

References getObjId(), and getUserId().

Referenced by addNotifier().

        {
                global $ilDB;

                $query = "DELETE FROM link_check_report ".
                        "WHERE obj_id = ".$ilDB->quote($this->getObjId())." ".
                        "AND usr_id = ".$ilDB->quote($this->getUserId())." ";

                $this->db->query($query);

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilLinkCheckNotify::getObjId (  ) 

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

Referenced by addNotifier(), and deleteNotifier().

        {
                return $this->obj_id;
        }

Here is the caller graph for this function:

ilLinkCheckNotify::getUserId (  ) 

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

Referenced by addNotifier(), and deleteNotifier().

        {
                return $this->usr_id;
        }

Here is the caller graph for this function:

ilLinkCheckNotify::ilLinkCheckNotify ( &$  db  ) 

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

References $db.

        {
                $this->db =& $db;
        }

ilLinkCheckNotify::setObjId ( a_obj_id  ) 

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

        {
                $this->obj_id = $a_obj_id;
        }

ilLinkCheckNotify::setUserId ( a_usr_id  ) 

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

        {
                $this->usr_id = $a_usr_id;
        }


Field Documentation

ilLinkCheckNotify::$db = null

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

Referenced by _getAllNotifiers(), and ilLinkCheckNotify().


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