Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F774194
l-visit_eh.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 3, 8:42 AM
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Feb 5, 8:42 AM (2 h, 45 m)
Engine
blob
Format
Raw Data
Handle
557272
Attached To
rMINL Modules.In-Link
l-visit_eh.php
View Options
<?php
/**
* @version $Id: l-visit_eh.php 15696 2013-02-19 11:30:53Z alex $
* @package In-Link
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined
(
'FULL_PATH'
)
or
die
(
'restricted access!'
);
class
LinkVisitEventHandler
extends
kDBEventHandler
{
/**
* Deletes visits when user/link got deleted
*
* @param kEvent $event
* @return void
* @access protected
*/
protected
function
OnDeleteVisits
(
kEvent
$event
)
{
$key_field
=
$event
->
MasterEvent
->
Prefix
==
'u'
?
'PortalUserId'
:
'ResourceId'
;
$table_name
=
$this
->
getUnitConfig
()->
getTableName
();
$object
=
$event
->
MasterEvent
->
getObject
();
/* @var $object kDBItem */
$sql
=
'DELETE FROM '
.
$table_name
.
'
WHERE '
.
$key_field
.
' = '
.
$object
->
GetDBField
(
$key_field
);
$this
->
Conn
->
Query
(
$sql
);
}
}
Event Timeline
Log In to Comment