Changeset 19213 for extensions/gvideo/admin/photo.php
- Timestamp:
- Nov 28, 2012, 12:49:06 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/gvideo/admin/photo.php
r19056 r19213 72 72 else if ($gvideo['url']!=$_POST['url']) 73 73 { 74 if( ($video = parse_video_url($_POST['url'])) === false ) 75 { 76 array_push($page['errors'], l10n('Unable to contact host server')); 74 if( ($video = parse_video_url($_POST['url'], isset($_POST['safe_mode']))) === false ) 75 { 76 if (isset($_POST['safe_mode'])) 77 { 78 array_push($page['errors'], l10n('an error happened')); 79 } 80 else 81 { 82 array_push($page['errors'], l10n('Unable to contact host server')); 83 array_push($page['errors'], l10n('Try in safe-mode')); 84 } 77 85 } 78 86 } … … 89 97 { 90 98 // download thumbnail 91 $thumb_name = $video['type'].'-'.$video['video_id'].'-'.uniqid().'.'.get_extension($video['thumbnail']); 99 $thumb_ext = empty($video['thumbnail']) ? 'jpg' : get_extension($video['thumbnail']); 100 $thumb_name = $video['type'].'-'.$video['video_id'].'-'.uniqid().'.'.$thumb_ext; 92 101 $thumb_source = $conf['data_location'].$thumb_name; 93 if ( download_remote_file($video['thumbnail'], $thumb_source) !== true)102 if ( empty($video['thumbnail']) or download_remote_file($video['thumbnail'], $thumb_source) !== true ) 94 103 { 95 104 $thumb_source = $conf['data_location'].get_filename_wo_extension($thumb_name).'.jpg';
Note: See TracChangeset
for help on using the changeset viewer.