Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5981361
CallAction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
CallAction.php
View Options
<?php
namespace
Shellbox\Action
;
/**
* PHP RPC handler
*/
class
CallAction
extends
MultipartAction
{
/**
* @param string[] $pathParts @phan-unused-param
*/
protected
function
execute
(
$pathParts
)
{
$this
->
forgetConfig
(
'secretKey'
);
$functionName
=
$this
->
getRequiredParam
(
'functionName'
);
$binary
=
$this
->
getRequiredParam
(
'binary'
);
if
(
$binary
)
{
$params
=
[];
for
(
$i
=
0
;
;
$i
++
)
{
$param
=
$this
->
getParam
(
"param$i"
);
if
(
$param
===
null
)
{
break
;
}
$params
[]
=
$param
;
}
}
else
{
$params
=
$this
->
getParam
(
'params'
,
[]
);
}
$this
->
runSources
();
$result
=
call_user_func_array
(
$functionName
,
$params
);
if
(
$binary
)
{
$this
->
writeResult
(
[],
[
'returnValue'
=>
(
string
)
$result
]
);
}
else
{
$this
->
writeResult
(
[
'returnValue'
=>
$result
]
);
}
}
protected
function
getActionName
()
{
return
'call'
;
}
/**
* Execute the source files which were included in the request
*/
private
function
runSources
()
{
$sources
=
$this
->
getParam
(
'sources'
,
[]
);
foreach
(
$sources
as
$sourceFileName
)
{
require
$this
->
tempDirManager
->
getPath
(
$sourceFileName
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 21:51 (1 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
8e/18/ef6bd8038e4794822e131566ace9
Default Alt Text
CallAction.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment