当前位置: 首页>>代码示例>>PHP>>正文


PHP KExternalErrors::terminateDispatch方法代码示例

本文整理汇总了PHP中KExternalErrors::terminateDispatch方法的典型用法代码示例。如果您正苦于以下问题:PHP KExternalErrors::terminateDispatch方法的具体用法?PHP KExternalErrors::terminateDispatch怎么用?PHP KExternalErrors::terminateDispatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KExternalErrors的用法示例。


在下文中一共展示了KExternalErrors::terminateDispatch方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * Will forward to the uploader swf according to the ui_conf_id 
  */
 public function execute()
 {
     $ui_conf_id = $this->getRequestParameter("ui_conf_id");
     $uiConf = uiConfPeer::retrieveByPK($ui_conf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND, "UI conf not found");
     }
     $partner_id = $uiConf->getPartnerId();
     $subp_id = $uiConf->getSubpId();
     $host = requestUtils::getRequestHost();
     $ui_conf_swf_url = $uiConf->getSwfUrl();
     if (!$ui_conf_swf_url) {
         KExternalErrors::dieError(KExternalErrors::ILLEGAL_UI_CONF, "SWF URL not found in UI conf");
     }
     if (kString::beginsWith($ui_conf_swf_url, "http")) {
         $swf_url = $ui_conf_swf_url;
         // absolute URL
     } else {
         $use_cdn = $uiConf->getUseCdn();
         $cdn_host = $use_cdn ? myPartnerUtils::getCdnHost($partner_id) : myPartnerUtils::getHost($partner_id);
         $swf_url = $cdn_host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . $ui_conf_swf_url;
         // relative to the current host
     }
     $conf_vars = $uiConf->getConfVars();
     if ($conf_vars) {
         $conf_vars = "&" . $conf_vars;
     }
     $params = "host=" . $host . "&uiConfId=" . $ui_conf_id . $conf_vars;
     KExternalErrors::terminateDispatch();
     $this->redirect("{$swf_url}?{$params}");
 }
开发者ID:DBezemer,项目名称:server,代码行数:34,代码来源:kuploadAction.class.php

示例2: execute

 public function execute()
 {
     // can't read using $_REQUEST because the 'myaction' paramter is created in a routing.yml rule
     $service_name = $this->getRequestParameter("myaction");
     // remove all '_' and set to lowercase
     $myaction_name = trim(strtolower(str_replace("_", "", $service_name)));
     $clazz_name = $myaction_name . "Action";
     //		echo "[$myaction_name] [$clazz_name]<br>";
     //		$clazz = get_class ( $clazz_name );
     //$multi_request = $this->getRequestParameter( "multirequest" , null );
     $multi_request = $myaction_name == "multirequest";
     if ($multi_request) {
         $multi_request = new myMultiRequest($_REQUEST, $this);
         $response = $multi_request->execute();
     } else {
         $include_result = @(include_once "{$clazz_name}.class.php");
         if ($include_result) {
             $myaction = new $clazz_name($this);
             $myaction->setInputParams($_REQUEST);
             $response = $myaction->execute();
             kEventsManager::flushEvents();
         } else {
             $format = $this->getP("format");
             $response = "Error: Invalid service [{$service_name}]";
         }
     }
     $format = $this->getP("format");
     if ($format == kalturaWebserviceRenderer::RESPONSE_TYPE_PHP_ARRAY || $format == kalturaWebserviceRenderer::RESPONSE_TYPE_PHP_OBJECT) {
         //$this->setHttpHeader ( "Content-Type" , "text/html; charset=utf-8" );
         $response = "<pre>" . print_r($response, true) . "</pre>";
     }
     // uncomment in order to cache api responses
     if (kConf::get('enable_cache')) {
         $this->cacheResponse($response);
     }
     $ret = $this->renderText($response);
     KExternalErrors::terminateDispatch();
     return $ret;
 }
开发者ID:DBezemer,项目名称:server,代码行数:39,代码来源:defPartnerservices2baseAction.class.php

示例3: execute


//.........这里部分代码省略.........
     if ($this->deliveryAttributes->getFormat() == self::HDNETWORKSMIL) {
         $this->deliveryAttributes->setMediaProtocol(PlaybackProtocol::HTTP);
     }
     // Akamai HD doesn't support any other protocol
     if ($this->deliveryAttributes->getFormat() == PlaybackProtocol::AKAMAI_HDS) {
         if (strpos($this->deliveryAttributes->getMediaProtocol(), "http") !== 0) {
             $this->deliveryAttributes->setMediaProtocol(PlaybackProtocol::HTTP);
         }
     }
     $tags = $this->getRequestParameter("tags", null);
     if (!$tags) {
         $this->deliveryAttributes->setTags(self::getDefaultTagsByFormat($this->deliveryAttributes->getFormat()));
     } else {
         $tagsArray = explode(',', $tags);
         $tags = array();
         foreach ($tagsArray as $tag) {
             $tags[] = array(trim($tag));
         }
         $this->deliveryAttributes->setTags($tags);
     }
     $this->deliveryAttributes->setpreferredBitrate($this->getRequestParameter("preferredBitrate", null));
     $this->maxBitrate = $this->getRequestParameter("maxBitrate", null);
     if ($this->maxBitrate && (!is_numeric($this->maxBitrate) || $this->maxBitrate <= 0)) {
         KExternalErrors::dieError(KExternalErrors::INVALID_MAX_BITRATE);
     }
     $this->deliveryAttributes->setStorageId($this->getRequestParameter("storageId", null));
     $this->cdnHost = $this->getRequestParameter("cdnHost", null);
     $this->deliveryAttributes->setResponseFormat($this->getRequestParameter("responseFormat", null));
     // Initialize
     $this->initEntry();
     $this->deliveryAttributes->setEntryId($this->entryId);
     $this->deliveryAttributes->setUsePlayServer((bool) $this->getRequestParameter("usePlayServer") && PermissionPeer::isValidForPartner(PermissionName::FEATURE_PLAY_SERVER, $this->entry->getPartnerId()));
     if ($this->deliveryAttributes->getUsePlayServer()) {
         $this->deliveryAttributes->setPlayerConfig($this->getRequestParameter("playerConfig"));
         //In case request needs to be redirected to play-server we need to add the ui conf id to the manifest url as well
         $this->deliveryAttributes->setUiConfId($this->getRequestParameter("uiConfId"));
     }
     $this->secureEntryHelper->updateDeliveryAttributes($this->deliveryAttributes);
     $this->enforceEncryption();
     $renderer = null;
     switch ($this->entry->getType()) {
         case entryType::MEDIA_CLIP:
             // VOD
             $renderer = $this->serveVodEntry();
             break;
         case entryType::LIVE_STREAM:
         case entryType::LIVE_CHANNEL:
             // Live stream
             $renderer = $this->serveLiveEntry();
             break;
         default:
             KExternalErrors::dieError(KExternalErrors::INVALID_ENTRY_TYPE);
     }
     if (!$renderer) {
         KExternalErrors::dieError(KExternalErrors::BAD_QUERY, 'This format is unsupported');
     }
     $renderer->contributors = array();
     $config = new kManifestContributorConfig();
     $config->format = $this->deliveryAttributes->getFormat();
     $config->deliveryCode = $deliveryCode;
     $config->storageId = $this->deliveryAttributes->getStorageId();
     $config->entryId = $this->entryId;
     $contributors = KalturaPluginManager::getPluginInstances('IKalturaPlayManifestContributor');
     foreach ($contributors as $contributor) {
         /* @var $contributor IKalturaPlayManifestContributor */
         $renderer->contributors = array_merge($renderer->contributors, $contributor->getManifestEditors($config));
     }
     $renderer->entryId = $this->entryId;
     $renderer->duration = $this->duration;
     if ($this->deliveryProfile) {
         $renderer->tokenizer = $this->deliveryProfile->getTokenizer();
     }
     $renderer->defaultDeliveryCode = $this->entry->getPartner()->getDefaultDeliveryCode();
     $renderer->lastModified = time();
     // Handle caching
     $canCacheAccessControl = false;
     if (kConf::hasParam("force_caching_headers") && in_array($this->entry->getPartnerId(), kConf::get("force_caching_headers"))) {
         $renderer->cachingHeadersAge = 60;
         $renderer->forceCachingHeaders = true;
     }
     if (!$this->secureEntryHelper) {
         $canCacheAccessControl = true;
         // TODO: reconsider this if/when expired ktokens will be used
     } else {
         if (!$this->secureEntryHelper->shouldDisableCache() && !$this->secureEntryHelper->isKsAdmin() && ($this->secureEntryHelper->isKsWidget() || !$this->secureEntryHelper->hasRules())) {
             $canCacheAccessControl = true;
         }
     }
     if (!$renderer->tokenizer && $canCacheAccessControl) {
         // Note: kApiCache::hasExtraFields is checked in kManifestRenderers
         $renderer->cachingHeadersAge = 60;
     }
     if (!$this->secureEntryHelper || !$this->secureEntryHelper->shouldDisableCache()) {
         $cache = kPlayManifestCacher::getInstance();
         $cache->storeRendererToCache($renderer);
     }
     // Output the response
     KExternalErrors::terminateDispatch();
     $renderer->output($deliveryCode, $playbackContext);
 }
开发者ID:AdiTal,项目名称:server,代码行数:101,代码来源:playManifestAction.class.php

示例4: execute


//.........这里部分代码省略.........
             if (!$entry) {
                 KExternalErrors::dieError(KExternalErrors::ENTRY_NOT_FOUND);
             }
         }
     }
     $allowCache = true;
     $securityType = $widget->getSecurityType();
     switch ($securityType) {
         case widget::WIDGET_SECURITY_TYPE_TIMEHASH:
             // TODO - I don't know what should be validated here
             break;
         case widget::WIDGET_SECURITY_TYPE_MATCH_IP:
             $allowCache = false;
             // here we'll attemp to match the ip of the request with that from the customData of the widget
             $custom_data = $widget->getCustomData();
             $valid_country = false;
             if ($custom_data) {
                 // in this case the custom_data should be of format:
                 //  valid_county_1,valid_country_2,...,valid_country_n;falback_entry_id
                 $arr = explode(";", $custom_data);
                 $countries_str = $arr[0];
                 $fallback_entry_id = isset($arr[1]) ? $arr[1] : null;
                 $fallback_kshow_id = isset($arr[2]) ? $arr[2] : null;
                 $current_country = "";
                 $valid_country = requestUtils::matchIpCountry($countries_str, $current_country);
                 if (!$valid_country) {
                     KalturaLog::log("Attempting to access widget [{$widget_id}] and entry [{$entry_id}] from country [{$current_country}]. Retrning entry_id: [{$fallback_entry_id}] kshow_id [{$fallback_kshow_id}]");
                     $entry_id = $fallback_entry_id;
                 }
             }
             break;
         case widget::WIDGET_SECURITY_TYPE_FORCE_KS:
             $ks_str = $this->getRequestParameter('ks');
             try {
                 $ks = kSessionUtils::crackKs($ks_str);
             } catch (Exception $e) {
                 KExternalErrors::dieError(KExternalErrors::INVALID_KS);
             }
             $res = kSessionUtils::validateKSession2(1, $partner_id, 0, $ks_str, $ks);
             if ($res <= 0) {
                 KExternalErrors::dieError(KExternalErrors::INVALID_KS);
             }
             break;
         default:
             break;
     }
     $requestKey = $_SERVER["REQUEST_URI"];
     // check if we cached the redirect url
     $cache = new myCache("embedIframe", 10 * 60);
     // 10 minutes
     $cachedResponse = $cache->get($requestKey);
     if ($allowCache && $cachedResponse) {
         header("X-Kaltura: cached-action");
         header("Expires: Sun, 19 Nov 2000 08:52:00 GMT");
         header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
         header("Pragma: no-cache");
         header("Location:{$cachedResponse}");
         KExternalErrors::dieGracefully();
     }
     $uiconf_id = $this->getRequestParameter('uiconf_id');
     if (!$uiconf_id) {
         $uiconf_id = $widget->getUiConfId();
     }
     if (!$uiconf_id) {
         KExternalErrors::dieError(KExternalErrors::MISSING_PARAMETER, 'uiconf_id');
     }
     $partner_host = myPartnerUtils::getHost($partner_id);
     $partner_cdnHost = myPartnerUtils::getCdnHost($partner_id);
     $uiConf = uiConfPeer::retrieveByPK($uiconf_id);
     if (!$uiConf) {
         KExternalErrors::dieError(KExternalErrors::UI_CONF_NOT_FOUND);
     }
     $partner_host = myPartnerUtils::getHost($partner_id);
     $partner_cdnHost = myPartnerUtils::getCdnHost($partner_id);
     $html5_version = kConf::get('html5_version');
     $use_cdn = $uiConf->getUseCdn();
     $host = $use_cdn ? $partner_cdnHost : $partner_host;
     $ui_conf_html5_url = $uiConf->getHtml5Url();
     if ($ui_conf_html5_url) {
         $url = str_replace('mwEmbedLoader.php', 'mwEmbedFrame.php', $ui_conf_html5_url);
         if (!kString::beginsWith($ui_conf_html5_url, "http")) {
             // absolute URL
             $url = $host . $url;
         }
     } else {
         $url = $host;
         $url .= "/html5/html5lib/{$html5_version}/mwEmbedFrame.php";
     }
     if ($entry_id) {
         $url .= "/entry_id/{$entry_id}";
     }
     $url .= "/wid/{$widget_id}/uiconf_id/{$uiconf_id}";
     $url .= '?' . http_build_query($_GET, '', '&');
     // forward all GET parameters
     if ($allowCache) {
         $cache->put($requestKey, $url);
     }
     KExternalErrors::terminateDispatch();
     $this->redirect($url);
 }
开发者ID:DBezemer,项目名称:server,代码行数:101,代码来源:embedIframeAction.class.php

示例5: execute


//.........这里部分代码省略.........
                     $level3_url = $request . $flv_extension;
                     if ($entry->getSecurityPolicy()) {
                         $level3_url = "/s{$level3_url}";
                         // set expire time in GMT hence the date("Z") offset
                         $expire = "&nva=" . strftime("%Y%m%d%H%M%S", time() - date("Z") + 30);
                         $level3_url .= $expire;
                         $secret = kConf::get("level3_authentication_key");
                         $hash = "0" . substr(self::hmac('sha1', $secret, $level3_url), 0, 20);
                         $level3_url .= "&h={$hash}";
                     }
                     $level3_url .= $seek_from_bytes == -1 ? "" : "&start={$seek_from_bytes}";
                     header("Location: {$level3_url}");
                     KExternalErrors::dieGracefully();
                 } else {
                     if ($cdn_name == "akamai") {
                         $akamai_url = $request . $flv_extension;
                         // if for some reason we didnt set our accurate $seek_from_timestamp reset it to the requested seek_from
                         if ($seek_from_timestamp == -1) {
                             $seek_from_timestamp = $seek_from;
                         }
                         $akamai_url .= $seek_from_bytes == -1 ? "" : "&aktimeoffset=" . floor($seek_from_timestamp / 1000);
                         header("Location: {$akamai_url}");
                         KExternalErrors::dieGracefully();
                     }
                 }
             }
             // a seek request without a supporting cdn - we need to send the answer from our server
             if ($seek_from_bytes !== -1 && $via_header === null) {
                 $this->dump_from_byte = $seek_from_bytes;
             }
         }
     }
     // always add the file suffix to the request (needed for scrubbing by some cdns,
     // and also breaks without extension on some corporate antivirus).
     // we add the the novar paramter since a leaving a trailing "?" will be trimmed
     // and then the /seek_from request will result in another url which level3
     // will try to refetch from the origin
     // note that for streamer we dont add the file extension
     if ($streamer != "rtmp" && strpos($request, $flv_extension) === false) {
         // a seek request without a supporting cdn - we need to send the answer from our server
         if ($seek_from_bytes !== -1 && $via_header === null) {
             $request .= "/seek_from_bytes/{$seek_from_bytes}";
         }
         requestUtils::sendCdnHeaders("flv", 0);
         header("Location: {$request}" . $flv_extension);
         KExternalErrors::dieGracefully();
     }
     // mp4
     if (!$isFlv) {
         $limit_file_size = 0;
         if ($clip_to != 2147483647) {
             $mediaInfo = mediaInfoPeer::retrieveByFlavorAssetId($flavorAsset->getId());
             if ($mediaInfo && ($mediaInfo->getVideoDuration() || $mediaInfo->getAudioDuration() || $mediaInfo->getContainerDuration())) {
                 $duration = $mediaInfo->getVideoDuration() ? $mediaInfo->getVideoDuration() : ($mediaInfo->getAudioDuration() ? $mediaInfo->getAudioDuration() : $mediaInfo->getContainerDuration());
                 $limit_file_size = floor(@kFile::fileSize($path) * ($clip_to / $duration) * 1.2);
             }
         }
         KalturaLog::info("serving file [{$path}] entry id [{$entry_id}] limit file size [{$limit_file_size}] clip_to [{$clip_to}]");
         kFileUtils::dumpFile($path, null, null, $limit_file_size);
     }
     $this->logMessage("flvclipperAction: serving file [{$path}] entry_id [{$entry_id}] clip_from [{$clip_from}] clip_to [{$clip_to}]", "warning");
     if ($audio_only === '0') {
         // audio_only was explicitly set to 0 - don't attempt to make further automatic investigations
     } elseif ($flv_wrapper->getFirstVideoTimestamp() < 0) {
         $audio_only = true;
     }
     //$start = microtime(true);
     list($bytes, $duration, $from_byte, $to_byte, $from_ts, $cuepoint_pos) = myFlvStaticHandler::clip($path, $clip_from, $clip_to, $audio_only);
     $metadata_size = $flv_wrapper->getMetadataSize($audio_only);
     $this->from_byte = $from_byte;
     $this->to_byte = $to_byte;
     //$end1 = microtime(true);
     //$this->logMessage( "flvclipperAction: serving file [$path] entry_id [$entry_id] bytes [$bytes] duration [$duration] [$from_byte]->[$to_byte]" , "warning" );
     //$this->logMessage( "flvclipperAction: serving file [$path] t1 [" . ( $end1-$start) . "]");
     $data_offset = $metadata_size + myFlvHandler::getHeaderSize();
     // if we're returning a partial file adjust the total size:
     // substract the metadata and bytes which are not delivered
     if ($this->dump_from_byte >= $data_offset && !$audio_only) {
         $bytes -= $metadata_size + max(0, $this->dump_from_byte - $data_offset);
     }
     $this->total_length = $data_offset + $bytes;
     //echo " $bytes , $duration ,$from_byte , $to_byte, $cuepoint_pos\n"; die;
     $this->cuepoint_time = 0;
     $this->cuepoint_pos = 0;
     if ($streamer == "chunked" && $clip_to != 2147483647) {
         $this->cuepoint_time = $clip_to - 1;
         $this->cuepoint_pos = $cuepoint_pos;
         $this->total_length += myFlvHandler::CUEPOINT_TAG_SIZE;
     }
     //$this->logMessage( "flvclipperAction: serving file [$path] entry_id [$entry_id] bytes with header & md [" . $this->total_length . "] bytes [$bytes] duration [$duration] [$from_byte]->[$to_byte]" , "warning" );
     $this->flv_wrapper = $flv_wrapper;
     $this->audio_only = $audio_only;
     try {
         Propel::close();
     } catch (Exception $e) {
         $this->logMessage("flvclipperAction: error closing db {$e}");
     }
     KExternalErrors::terminateDispatch();
     return sfView::SUCCESS;
 }
开发者ID:DBezemer,项目名称:server,代码行数:101,代码来源:flvclipperAction.class.php

示例6: execute


//.........这里部分代码省略.........
                 // otherwise the kdp will try going to cdnwww.kaltura.com
             }
             $track_wrapper = '';
             if (kConf::get('track_kdpwrapper') && kConf::get('kdpwrapper_track_url')) {
                 $track_wrapper = "&wrapper_tracker_url=" . urlencode(kConf::get('kdpwrapper_track_url') . "?activation_key=" . kConf::get('kaltura_activation_key') . "&package_version=" . kConf::get('kaltura_version'));
             }
             $optimizedConfVars = null;
             $optimizedHost = null;
             if (kConf::hasMap("optimized_playback")) {
                 $optimizedPlayback = kConf::getMap("optimized_playback");
                 if (array_key_exists($partner_id, $optimizedPlayback)) {
                     // force a specific kdp for the partner
                     $params = $optimizedPlayback[$partner_id];
                     if (array_key_exists('kdp_version', $params)) {
                         $swf_url = $partner_cdnHost . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . "/flash/kdp3/" . $params['kdp_version'] . "/kdp3.swf";
                     }
                     if (array_key_exists('conf_vars', $params)) {
                         $optimizedConfVars = $params['conf_vars'];
                     }
                     if (array_key_exists('host', $params)) {
                         $optimizedHost = $params['host'];
                     }
                     // cache immidiately
                     $cache_st = 0;
                     $allowCache = true;
                 }
             }
             if ($optimizedConfVars === null) {
                 $optimizedConfVars = "clientDefaultMethod=GET";
             }
             $conf_vars = "&{$optimizedConfVars}&" . $conf_vars;
             $stats_host = $protocol == "https" ? kConf::get("stats_host_https") : kConf::get("stats_host");
             $wrapper_stats = kConf::get('kdp3_wrapper_stats_url') ? "&wrapper_stats_url={$protocol}://{$stats_host}" . urlencode(str_replace("{partnerId}", $partner_id, kConf::get('kdp3_wrapper_stats_url'))) : "";
             $partner_host = str_replace("http://", "", str_replace("https://", "", $partner_host));
             // if the host is the default www domain use the cdn api domain
             if ($partner_host == kConf::get("www_host") && $optimizedHost === null) {
                 $partner_host = kConf::get("cdn_api_host");
             } else {
                 if ($optimizedHost) {
                     $partner_host = $optimizedHost;
                 }
             }
             if ($protocol == "https" && ($partner_host = kConf::get("cdn_api_host"))) {
                 $partner_host = kConf::get("cdn_api_host_https");
             }
             $dynamic_date = $widgetIdStr . $track_wrapper . $wrapper_stats . "&kdpUrl=" . urlencode($swf_url) . "&host=" . $partner_host . "&cdnHost=" . str_replace("http://", "", str_replace("https://", "", $partner_cdnHost)) . "&statistics.statsDomain={$stats_host}" . ($show_version ? "&entryVersion={$show_version}" : "") . ($kshow_id ? "&kshowId={$kshow_id}" : "") . ($entry_id ? "&{$entryVarName}={$entry_id}" : "") . $uiconf_id_str . $ks_flashvars . ($cache_st ? "&clientTag=cache_st:{$cache_st}" : "") . $conf_vars;
             // patch wrapper with flashvars and dump to browser
             if (version_compare($uiConf->getSwfUrlVersion(), "2.6.6", ">=")) {
                 $startTime = microtime(true);
                 $patcher = new kPatchSwf($swf_data, "KALTURA_FLASHVARS_DATA");
                 $wrapper_data = $patcher->patch($dynamic_date . "&referer=" . urlencode($referer));
                 KalturaLog::log('Patching took ' . (microtime(true) - $startTime));
                 requestUtils::sendCdnHeaders("swf", strlen($wrapper_data), $allowCache ? 60 * 10 : 0, null, true, time());
                 if ($_SERVER["REQUEST_METHOD"] == "HEAD") {
                     header('Content-Length: ' . strlen($wrapper_data));
                 } else {
                     echo $wrapper_data;
                 }
                 if ($allowCache) {
                     $cache_swfdata->put($requestKey, $wrapper_data);
                 }
                 KExternalErrors::dieGracefully();
             }
             if ($swf_data) {
                 $md5 = md5($swf_key);
                 $wrapper_swf = "content/cacheswf/" . substr($md5, 0, 2) . "/" . substr($md5, 2, 2) . "/" . $swf_key;
                 $wrapper_swf_path = "{$root}/{$wrapper_swf}";
                 if (!file_exists($wrapper_swf_path)) {
                     kFile::fullMkdir($wrapper_swf_path);
                     file_put_contents($wrapper_swf_path, $swf_data);
                 }
             }
             // for now changed back to $host since kdp version prior to 1.0.15 didnt support loading by external domain kdpwrapper
             $url = $host . myPartnerUtils::getUrlForPartner($partner_id, $subp_id) . "/{$wrapper_swf}?{$dynamic_date}";
         }
     } else {
         $dynamic_date = "kshowId={$kshow_id}" . "&host=" . requestUtils::getRequestHostId() . ($show_version ? "&entryVersion={$show_version}" : "") . ($entry_id ? "&{$entryVarName}={$entry_id}" : "") . ($entry_id ? "&KmediaType={$kmedia_type}" : "");
         $dynamic_date .= "&isWidget={$widget_type}&referer=" . urlencode($referer);
         $dynamic_date .= "&kdata={$kdata}";
         $url = "{$swf_url}?{$dynamic_date}";
     }
     // if referer has a query string an IE bug will prevent out flashvars to propagate
     // when nowrapper is true we cant use /swfparams either as there isnt a kdpwrapper
     if (!$nowrapper && $uiConf && version_compare($uiConf->getSwfUrlVersion(), "2.6.6", ">=")) {
         // apart from the /swfparam/ format, add .swf suffix to the end of the stream in case
         // a corporate firewall looks at the file suffix
         $pos = strpos($url, "?");
         $url = substr($url, 0, $pos) . "/swfparams/" . urlencode(substr($url, $pos + 1)) . ".swf";
     }
     if ($allowCache) {
         $cache_redirect->put($requestKey, $url);
     }
     if (strpos($url, "/swfparams/") > 0) {
         $url = substr($url, 0, -4) . urlencode($noncached_params) . ".swf";
     } else {
         $url .= $noncached_params;
     }
     KExternalErrors::terminateDispatch();
     $this->redirect($url);
 }
开发者ID:DBezemer,项目名称:server,代码行数:101,代码来源:kwidgetAction.class.php

示例7: handleFileSyncRedirection

 private function handleFileSyncRedirection(FileSyncKey $syncKey)
 {
     list($fileSync, $local) = kFileSyncUtils::getReadyFileSyncForKey($syncKey, true, false);
     if (is_null($fileSync)) {
         KExternalErrors::dieError(KExternalErrors::FILE_NOT_FOUND);
     }
     if (!$local) {
         $url = kDataCenterMgr::getRedirectExternalUrl($fileSync);
         KExternalErrors::terminateDispatch();
         $this->redirect($url);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:downloadAction.class.php


注:本文中的KExternalErrors::terminateDispatch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。