Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1168015
spam_report_tp.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
Wed, Sep 24, 6:22 AM
Size
2 KB
Mime Type
text/x-php
Expires
Fri, Sep 26, 6:22 AM (23 h, 10 m)
Engine
blob
Format
Raw Data
Handle
756625
Attached To
rINP In-Portal
spam_report_tp.php
View Options
<?php
/**
* @version $Id: spam_report_tp.php 16513 2017-01-20 14:10:53Z alex $
* @package In-Portal
* @copyright Copyright (C) 1997 - 2011 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
SpamReportTagProcessor
extends
kDBTagProcessor
{
/**
* Returns a link for editing ad/user
*
* @param Array $params
* @return string
*/
function
ItemEditLink
(
$params
)
{
/** @var kDBList $object */
$object
=
$this
->
getObject
(
$params
);
$prefix
=
$object
->
GetDBField
(
'ItemPrefix'
);
$url_params
=
Array
(
'm_opener'
=>
'd'
,
$prefix
.
'_mode'
=>
't'
,
$prefix
.
'_event'
=>
'OnEdit'
,
$prefix
.
'_id'
=>
$object
->
GetDBField
(
'ItemId'
),
'pass'
=>
'all,'
.
$prefix
,
);
if
(
$this
->
IsReviewReport
(
$params
)
)
{
$edit_template
=
'reviews/review_direct_edit'
;
$url_params
[
'pass_through'
]
=
'item_prefix'
;
$url_params
[
'item_prefix'
]
=
$prefix
;
}
else
{
$edit_template
=
''
;
}
return
$this
->
Application
->
HREF
(
$edit_template
,
''
,
$url_params
);
}
/**
* Builds a link, to delete item, associated with this spam report
*
* @param Array $params
* @return string
*/
function
AssocItemDeleteLink
(
$params
)
{
/** @var kDBList $object */
$object
=
$this
->
getObject
(
$params
);
$prefix
=
$this
->
getPrefixSpecial
();
$url_params
=
Array
(
$prefix
.
'_event'
=>
'OnDeleteAssocItem'
,
$prefix
.
'_id'
=>
$object
->
GetID
(),
'pass'
=>
'm,'
.
$prefix
,
);
return
$this
->
Application
->
HREF
(
''
,
''
,
$url_params
);
}
/**
* Checks, that it's review report
*
* @param Array $params
* @return string
* @access protected
*/
protected
function
IsReviewReport
(
$params
)
{
/** @var kDBItem $object */
$object
=
$this
->
getObject
(
$params
);
return
preg_match
(
'/rev$/'
,
$object
->
GetDBField
(
'ItemPrefix'
));
}
}
Event Timeline
Log In to Comment