Example #1
0
 function soap_call($connection, $call, $params)
 {
     $result = $connection->call($call, $params);
     if ($connection->fault) {
         return @make_soap_fault($result['faultcode'], $result['faultstring'], '', $result['detail']);
     }
     if ($connection->error_str) {
         return @make_soap_fault('server', $connection->error_str, '', $connection->response);
     }
     /* Fix objects being returned as associative arrays (to fit with PHP5
        SOAP support */
     return fix_object($result);
 }
Example #2
0
$fieldnamelist = optional_param('fieldnamelist', null, PARAM_TEXT);
$fieldidlist = optional_param('fieldidlist', null, PARAM_TEXT);
$scheduled = optional_param('scheduled', 0, PARAM_INT);
// TBD: setup $PAGE properties !?!?
//Unserialize fieldidlist to check against field list
if (isset($fieldidlist) && $fieldidlist !== null) {
    $fieldidlist = unserialize(base64_decode($fieldidlist));
}
if (isset($fieldnamelist) && $fieldnamelist !== null) {
    $fieldnamelist = unserialize(base64_decode($fieldnamelist));
}
if (isset($fieldname) && $fieldname !== null) {
    $fieldname = unserialize(base64_decode($fieldname));
}
// Update the field id and name lists based on the action
fix_object($SESSION->php_reports[$block_id]);
// Add a new filter for custom fields
$multi_filter = new generalized_filter_custom_field_multiselect_data($block_id, $fieldidlist, $fieldnamelist);
// Apply the action to the list of field ids and field names
$multi_filter->update_field_list($action, $fieldid, $fieldname, $fieldidlist, $fieldnamelist, $scheduled);
// Set custom field id and name arrays to the updated id and name lists
$fieldidlist = $multi_filter->_fieldidlist;
$fieldnamelist = $multi_filter->_fieldnamelist;
// We need to serialize fieldidlist and fieldnamelist and fieldname for all form elements
$serialized_fieldidlist = '';
$serialized_fieldnamelist = '';
$serialized_fieldname = '';
if (isset($fieldidlist) && !empty($fieldidlist)) {
    // Reindex first
    $fieldidlist = array_merge($fieldidlist);
    // Get custom field names if we have a list of custom ids and no names