You are here

function KalturaHelpers::getContributionWizardFlashVars in Kaltura 6

Same name and namespace in other branches
  1. 5 kaltura_client/kaltura_helpers.php \KalturaHelpers::getContributionWizardFlashVars()
  2. 6.2 kaltura_client/kaltura_helpers.php \KalturaHelpers::getContributionWizardFlashVars()
  3. 7.2 kaltura_client/kaltura_helpers.php \KalturaHelpers::getContributionWizardFlashVars()
1 call to KalturaHelpers::getContributionWizardFlashVars()
kaltura_contribution_wizard in includes/kaltura.themeing.inc

File

kaltura_client/kaltura_helpers.php, line 4

Class

KalturaHelpers

Code

function getContributionWizardFlashVars($ks, $kshowId, $partner_data, $type, $comment) {
  $sessionUser = KalturaHelpers::getSessionUser();
  $config = KalturaHelpers::getServiceConfiguration();
  $flashVars = array();
  $flashVars["userId"] = $sessionUser->userId;
  $flashVars["sessionId"] = $ks;
  if ($sessionUserId == KalturaSettings_ANONYMOUS_USER_ID) {
    $flashVars["isAnonymous"] = true;
  }
  $flashVars["partnerId"] = $config->partnerId;
  $flashVars["subPartnerId"] = $config->subPartnerId;
  if ($kshowId) {

    // TODO: change the following line for roughcut
    $flashVars["kshow_id"] = $type == 'entry' ? $type . '-' . $kshowId : $kshowId;
  }
  else {
    $flashVars["kshow_id"] = -2;
  }
  $flashVars["afterAddentry"] = "onContributionWizardAfterAddEntry";
  $flashVars["close"] = "onContributionWizardClose";
  $flashVars["partnerData"] = $partner_data;
  if (!$comment) {
    $flashVars["uiConfId"] = KalturaSettings_CW_UICONF_ID;
  }
  else {
    $flashVars["uiConfId"] = KalturaSettings_CW_COMMENTS_UICONF_ID;
  }
  $flashVars["terms_of_use"] = "http://corp.kaltura.com/tandc";
  return $flashVars;
}