Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1169223
payment_type_tag_processor.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, Sep 25, 10:29 PM
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Sep 27, 10:29 PM (1 d, 3 h)
Engine
blob
Format
Raw Data
Handle
757539
Attached To
rMINC Modules.In-Commerce
payment_type_tag_processor.php
View Options
<?php
/**
* @version $Id: payment_type_tag_processor.php 15156 2012-03-04 09:27:14Z alex $
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined
(
'FULL_PATH'
)
or
die
(
'restricted access!'
);
class
PaymentTypeTagProcessor
extends
kDBTagProcessor
{
function
DeleteError
(
$params
){
$o
=
''
;
$error
=
$this
->
Application
->
RecallVar
(
'pt_delete_error'
);
if
(
$error
){
$params
[
'name'
]=
$params
[
'block'
];
$o
=
$this
->
Application
->
ParseBlock
(
$params
);
$this
->
Application
->
RemoveVar
(
'pt_delete_error'
);
}
return
$o
;
}
function
ListGroups
(
$params
)
{
$object
=
$this
->
getObject
(
$params
);
$selected
=
trim
(
$object
->
GetDBField
(
'PortalGroups'
),
','
);
$selected_arr
=
explode
(
','
,
$selected
);
$all_groups
=
$this
->
Conn
->
Query
(
'SELECT GroupId, Name FROM '
.
TABLE_PREFIX
.
'UserGroups ORDER BY NAME'
,
'GroupId'
);
$o
=
''
;
$mode
=
array_key_exists
(
'mode'
,
$params
)
?
$params
[
'mode'
]
:
false
;
foreach
(
$all_groups
as
$a_group
)
{
$is_selected
=
in_array
(
$a_group
[
'GroupId'
],
$selected_arr
);
$continue
=
$mode
==
'selected'
?
!
$is_selected
:
$is_selected
;
if
(
$continue
)
continue
;
$block_params
=
$a_group
;
$block_params
[
'name'
]
=
$params
[
'render_as'
];
$o
.=
$this
->
Application
->
ParseBlock
(
$block_params
);
}
return
$o
;
}
}
Event Timeline
Log In to Comment