<commit_before><?php
/**
 * @package Core
 * @subpackage externalWidgets
 */
class servefileAction extends sfAction
{
	/**
	 * Will forward to the regular swf player according to the widget_id 
	 */
	public function execute()
	{
		requestUtils::handleConditionalGet();
		
		$file_sync_id = $this->getRequestParameter( "id" );
		$hash = $this->getRequestParameter( "hash" );
		$file_name = $this->getRequestParameter( "fileName" );
		if ($file_name) {
			$file_name = base64_decode($file_name);
		}
	
		$file_sync = FileSyncPeer::retrieveByPk ( $file_sync_id );
		if ( ! $file_sync )
		{
			$error = "DC[$current_dc_id]: Cannot find FileSync with id [$file_sync_id]";
			KalturaLog::err($error);
			throw new Exception ($error);
		}
		
		KalturaMonitorClient::initApiMonitor(false, 'extwidget.serveFile', $file_sync->getPartnerId());
		
		kDataCenterMgr::serveFileToRemoteDataCenter ( $file_sync , $hash, $file_name ); 
		die();
	}
}<commit_msg>Fix PHP Notice Undefined variable "current_dc_id"<commit_after><?php
/**
 * @package Core
 * @subpackage externalWidgets
 */
class servefileAction extends sfAction
{
	/**
	 * Will forward to the regular swf player according to the widget_id 
	 */
	public function execute()
	{
		requestUtils::handleConditionalGet();
		
		$file_sync_id = $this->getRequestParameter( "id" );
		$hash = $this->getRequestParameter( "hash" );
		$file_name = $this->getRequestParameter( "fileName" );
		if ($file_name) {
			$file_name = base64_decode($file_name);
		}
	
		$file_sync = FileSyncPeer::retrieveByPk ( $file_sync_id );
		if ( ! $file_sync )
		{
			$current_dc_id = kDataCenterMgr::getCurrentDcId();
			$error = "DC[$current_dc_id]: Cannot find FileSync with id [$file_sync_id]";
			KalturaLog::err($error);
			throw new Exception ($error);
		}
		
		KalturaMonitorClient::initApiMonitor(false, 'extwidget.serveFile', $file_sync->getPartnerId());
		
		kDataCenterMgr::serveFileToRemoteDataCenter ( $file_sync , $hash, $file_name ); 
		die();
	}
}
{'fraction_non_alphanumeric': 0.14206268958543983, 'fraction_numerical': 0.0020222446916076846, 'mean_word_length': 4.786549707602339, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4045731', 'n_tokens_mistral': 736, 'n_tokens_neox': 664, 'n_words': 135}