Commit 6ddea6d4 authored by Ad Schellevis's avatar Ad Schellevis

move in some more function into xmlrpc

parent 1c44ae4e
......@@ -286,3 +286,34 @@ function backup_config_section_xmlrpc($sectionKeys)
return array_intersect_key($config, array_flip($sectionKeys));
}
}
/**
* execute shell command (no..no..no.. this shouldn't be exposed)
* @param $shell_cmd shell command
* @return bool
*/
function exec_shell_xmlrpc($shell_cmd)
{
// TODO: we really... really... don't want this, needs to be replaced for decent encapsulated calls
require_once("util.inc");
mwexec($shell_cmd);
return true;
}
/**
* execute any php script (no..no..no.. this shouldn't be exposed)
* @param $exec_php
* @return bool
*/
function exec_php_xmlrpc($exec_php)
{
// TODO: we really... really... don't want this, needs to be replaced for decent encapsulated calls
eval($exec_php);
if (isset($toreturn)) {
return $toreturn;
} else {
return true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment