diff -r d2af8a210f5d -r 8e4fe6f3337d thd/apps/frontend/modules/editor/actions/segmentListJsonAction.class.php --- 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 @@ -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