Changeset 905
- Timestamp:
- Apr 23, 2015 11:14:27 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/www/deploy/api/platform/modules/space/actions/actions.class.php
r904 r905 165 165 $res = TblspaceresourcePeer::doSelectOne($c); 166 166 167 $thumbnailUrl = file_exists("previews/$userId/" . $tblfile->getFileId() . "/0.png") ? $_SERVER['HTTP_HOST']."/previews/$userId/" . $tblfile->getFileId() . "/0.png" : '';167 $thumbnailUrl = file_exists("previews/$userId/" . $tblfile->getFileId() . "/0.png") ? "http://".$_SERVER['HTTP_HOST']."/previews/$userId/" . $tblfile->getFileId() . "/0.png" : ''; 168 168 169 169 $newFile = new stdClass(); … … 172 172 $newFile->parentID = $destination; 173 173 $newFile->minetype = $currentFile->getFileType(); 174 $newFile->fileurl = str_replace($_SERVER['DOCUMENT_ROOT'], $_SERVER['HTTP_HOST'], $res->getFullFilename());174 $newFile->fileurl = str_replace($_SERVER['DOCUMENT_ROOT'], "http://".$_SERVER['HTTP_HOST'], $res->getFullFilename()); 175 175 $newFile->thumbnail = $thumbnailUrl; 176 176 $newFile->size = $res->getResFilesize(); … … 251 251 $tblres = TblspacefilePeer::retrieveByPk($fileId)->getTblspaceresource(); 252 252 $fileName = $tblres->getFullFilename(); 253 $fileUrl = str_replace($_SERVER['DOCUMENT_ROOT'], $_SERVER['HTTP_HOST'], $fileName);253 $fileUrl = str_replace($_SERVER['DOCUMENT_ROOT'], "http://".$_SERVER['HTTP_HOST'], $fileName); 254 254 $count = $this->createPreview($fileUrl, $userId, $fileId); 255 255 } … … 473 473 $tblres = TblspacefilePeer::retrieveByPk($tblfile->getFileId())->getTblspaceresource(); 474 474 $filePath = $tblres->getFullFilename(); 475 $fileUrl = str_replace($_SERVER['DOCUMENT_ROOT'], $_SERVER['HTTP_HOST'], $filePath);475 $fileUrl = str_replace($_SERVER['DOCUMENT_ROOT'], "http://".$_SERVER['HTTP_HOST'], $filePath); 476 476 } 477 477
Note: See TracChangeset
for help on using the changeset viewer.