thd/apps/frontend/modules/editor/actions/segmentListJsonAction.class.php
changeset 104 8e4fe6f3337d
parent 103 d2af8a210f5d
child 105 c8f710cd1fb1
--- a/thd/apps/frontend/modules/editor/actions/segmentListJsonAction.class.php	Wed Jun 01 14:07:43 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-<?php
-
-class segmentListJsonAction extends sfAction
-{
-  public function execute($request)
-  { 
-	header("Content-type: text/x-json");
-	$segments = '';
-	$this->ref = $this->getRequestParameter('ref');
-	$this->film_slug = $this->getRequestParameter('film_slug');
-	
-	// Get File segmentation Path
-	$this->path = sfConfig::get('app_storage_uploads');
-	$this->format = sfConfig::get('app_storage_format');
-	$file = $this->path.$this->ref."_".$this->film_slug.$this->format;
-	
-	
-	//Check if file exist
-	if (file_exists($file)) {
-		$fp = fopen($file, "r");
-		while (($data = fgetcsv($fp)) != FALSE) {
-		  $line = "{sin: " . $data[0] .
-		    ",sout: " . $data[1] .
-		    ",tag: '" . $data[2] . "'" .
-		    ",user: '" . $data[3] . "'}";
-		
-		  $lines[] = $line;
-		}
-		$segments = "[" . join($lines,',') . "]";
-	}
-	
-	// Render json
-	echo $segments;
-  }
-}
\ No newline at end of file