You are here

function kaltura_update_kaltura_partner in Kaltura 5

Same name and namespace in other branches
  1. 6.2 kaltura.module \kaltura_update_kaltura_partner()
  2. 6 includes/kaltura.admin.inc \kaltura_update_kaltura_partner()
  3. 7.3 includes/kaltura.admin.inc \kaltura_update_kaltura_partner()
  4. 7.2 includes/kaltura.admin.inc \kaltura_update_kaltura_partner()
3 calls to kaltura_update_kaltura_partner()
kaltura_notifications_settings_form in includes/kaltura.admin.inc
kaltura_settings_form in includes/kaltura.admin.inc
register_kaltura_partner in includes/kaltura.admin.inc

File

includes/kaltura.admin.inc, line 782

Code

function kaltura_update_kaltura_partner($notifications_config = 2, $notification_url = '') {
  $partner = new KalturaPartner();
  $partner->allowMultiNotification = '1';
  $partner->notify = 1;
  $partner->notificationsConfig = '*=' . $notifications_config;
  $url = url('kaltura/notification_handler', 'absolute=TRUE');
  $notification_url = $notification_url == '' ? $url : $notification_url;
  $partner->url2 = $notification_url;
  $session_user = KalturaHelpers::getSessionUser();
  $kaltura_client = KalturaHelpers::getKalturaClient(1);
  if ($kaltura_client) {
    $result = $kaltura_client
      ->updatePartner($session_user, $partner);
  }
  if ($result['result']) {
    return $result['result'];
  }
  return $result['error'];
}