Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1243497
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
Thu, Nov 20, 6:00 PM
Size
2 KB
Mime Type
text/x-php
Expires
Sat, Nov 22, 6:00 PM (18 h, 44 m)
Engine
blob
Format
Raw Data
Handle
809150
Attached To
rINP In-Portal
spam_report_tp.php
View Options
<?php
/**
* @version $Id: spam_report_tp.php 15165 2012-03-09 10:24:24Z 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
)
{
$object
=
$this
->
getObject
(
$params
);
/* @var $object kDBList */
$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
)
{
$object
=
$this
->
getObject
(
$params
);
/* @var $object kDBList */
$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
)
{
$object
=
$this
->
getObject
(
$params
);
/* @var $object kDBItem */
return
preg_match
(
'/rev$/'
,
$object
->
GetDBField
(
'ItemPrefix'
));
}
}
Event Timeline
Log In to Comment