diff options
Diffstat (limited to 'mod/file')
29 files changed, 15 insertions, 7 deletions
| diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php index 3edc87952..5242cbda2 100644 --- a/mod/file/actions/file/upload.php +++ b/mod/file/actions/file/upload.php @@ -109,7 +109,9 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) {  	// if image, we need to create thumbnails (this should be moved into a function)  	if ($guid && $file->simpletype == "image") { -		$thumbnail = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),60,60, true); +		$file->icontime = time(); +		 +		$thumbnail = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 60, 60, true);  		if ($thumbnail) {  			$thumb = new ElggFile();  			$thumb->setMimeType($_FILES['upload']['type']); @@ -123,7 +125,7 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) {  			unset($thumbnail);  		} -		$thumbsmall = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),153,153, true); +		$thumbsmall = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 153, 153, true);  		if ($thumbsmall) {  			$thumb->setFilename($prefix."smallthumb".$filestorename);  			$thumb->open("write"); @@ -133,7 +135,7 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) {  			unset($thumbsmall);  		} -		$thumblarge = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),600,600, false); +		$thumblarge = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 600, 600, false);  		if ($thumblarge) {  			$thumb->setFilename($prefix."largethumb".$filestorename);  			$thumb->open("write"); diff --git a/mod/file/graphics/icons/application.gif b/mod/file/graphics/icons/application.gifBinary files differ index f78903c0a..bfba76a97 100644 --- a/mod/file/graphics/icons/application.gif +++ b/mod/file/graphics/icons/application.gif diff --git a/mod/file/graphics/icons/application_lrg.gif b/mod/file/graphics/icons/application_lrg.gifBinary files differ index c6955f749..65f8eadb4 100644 --- a/mod/file/graphics/icons/application_lrg.gif +++ b/mod/file/graphics/icons/application_lrg.gif diff --git a/mod/file/graphics/icons/archive.gif b/mod/file/graphics/icons/archive.gifBinary files differ index 044cd042a..2213cdadd 100644 --- a/mod/file/graphics/icons/archive.gif +++ b/mod/file/graphics/icons/archive.gif diff --git a/mod/file/graphics/icons/archive_lrg.gif b/mod/file/graphics/icons/archive_lrg.gifBinary files differ index 0d0856cdd..6e3df3fd4 100644 --- a/mod/file/graphics/icons/archive_lrg.gif +++ b/mod/file/graphics/icons/archive_lrg.gif diff --git a/mod/file/graphics/icons/excel.gif b/mod/file/graphics/icons/excel.gifBinary files differ index f74f74fd7..ecd1d57d2 100644 --- a/mod/file/graphics/icons/excel.gif +++ b/mod/file/graphics/icons/excel.gif diff --git a/mod/file/graphics/icons/excel_lrg.gif b/mod/file/graphics/icons/excel_lrg.gifBinary files differ index 9b53d6dc7..84d1375d5 100644 --- a/mod/file/graphics/icons/excel_lrg.gif +++ b/mod/file/graphics/icons/excel_lrg.gif diff --git a/mod/file/graphics/icons/general.gif b/mod/file/graphics/icons/general.gifBinary files differ index cd5cf467a..20958b9a4 100644 --- a/mod/file/graphics/icons/general.gif +++ b/mod/file/graphics/icons/general.gif diff --git a/mod/file/graphics/icons/general_lrg.gif b/mod/file/graphics/icons/general_lrg.gifBinary files differ index 7c7a3c80a..3458915e5 100644 --- a/mod/file/graphics/icons/general_lrg.gif +++ b/mod/file/graphics/icons/general_lrg.gif diff --git a/mod/file/graphics/icons/music.gif b/mod/file/graphics/icons/music.gifBinary files differ index c44d7c987..5e9df08bc 100644 --- a/mod/file/graphics/icons/music.gif +++ b/mod/file/graphics/icons/music.gif diff --git a/mod/file/graphics/icons/music_lrg.gif b/mod/file/graphics/icons/music_lrg.gifBinary files differ index 780a252d6..1c0792cc3 100644 --- a/mod/file/graphics/icons/music_lrg.gif +++ b/mod/file/graphics/icons/music_lrg.gif diff --git a/mod/file/graphics/icons/openoffice.gif b/mod/file/graphics/icons/openoffice.gifBinary files differ index 3cfdc7196..053ad5bb5 100644 --- a/mod/file/graphics/icons/openoffice.gif +++ b/mod/file/graphics/icons/openoffice.gif diff --git a/mod/file/graphics/icons/openoffice_lrg.gif b/mod/file/graphics/icons/openoffice_lrg.gifBinary files differ index 5cdb13353..da28607fa 100644 --- a/mod/file/graphics/icons/openoffice_lrg.gif +++ b/mod/file/graphics/icons/openoffice_lrg.gif diff --git a/mod/file/graphics/icons/pages.gif b/mod/file/graphics/icons/pages.gifBinary files differ index 2e4ee761a..7efcb7278 100644 --- a/mod/file/graphics/icons/pages.gif +++ b/mod/file/graphics/icons/pages.gif diff --git a/mod/file/graphics/icons/pages_lrg.gif b/mod/file/graphics/icons/pages_lrg.gifBinary files differ index 2e41e4739..234a52672 100644 --- a/mod/file/graphics/icons/pages_lrg.gif +++ b/mod/file/graphics/icons/pages_lrg.gif diff --git a/mod/file/graphics/icons/pdf.gif b/mod/file/graphics/icons/pdf.gifBinary files differ index e7854b1e0..94362a4f0 100644 --- a/mod/file/graphics/icons/pdf.gif +++ b/mod/file/graphics/icons/pdf.gif diff --git a/mod/file/graphics/icons/pdf_lrg.gif b/mod/file/graphics/icons/pdf_lrg.gifBinary files differ index 5cd62b69c..aff869d04 100644 --- a/mod/file/graphics/icons/pdf_lrg.gif +++ b/mod/file/graphics/icons/pdf_lrg.gif diff --git a/mod/file/graphics/icons/ppt.gif b/mod/file/graphics/icons/ppt.gifBinary files differ index 44aef679b..88ab26d5c 100644 --- a/mod/file/graphics/icons/ppt.gif +++ b/mod/file/graphics/icons/ppt.gif diff --git a/mod/file/graphics/icons/ppt_lrg.gif b/mod/file/graphics/icons/ppt_lrg.gifBinary files differ index 71965711d..075590fd8 100644 --- a/mod/file/graphics/icons/ppt_lrg.gif +++ b/mod/file/graphics/icons/ppt_lrg.gif diff --git a/mod/file/graphics/icons/text.gif b/mod/file/graphics/icons/text.gifBinary files differ index 107e7ca37..897aa77f9 100644 --- a/mod/file/graphics/icons/text.gif +++ b/mod/file/graphics/icons/text.gif diff --git a/mod/file/graphics/icons/text_lrg.gif b/mod/file/graphics/icons/text_lrg.gifBinary files differ index 5f7c95519..d42ea4de1 100644 --- a/mod/file/graphics/icons/text_lrg.gif +++ b/mod/file/graphics/icons/text_lrg.gif diff --git a/mod/file/graphics/icons/vcard.gif b/mod/file/graphics/icons/vcard.gifBinary files differ index f7fdda9c0..202df68dd 100644 --- a/mod/file/graphics/icons/vcard.gif +++ b/mod/file/graphics/icons/vcard.gif diff --git a/mod/file/graphics/icons/vcard_lrg.gif b/mod/file/graphics/icons/vcard_lrg.gifBinary files differ index 6cd4c45e0..68ced88d2 100644 --- a/mod/file/graphics/icons/vcard_lrg.gif +++ b/mod/file/graphics/icons/vcard_lrg.gif diff --git a/mod/file/graphics/icons/video.gif b/mod/file/graphics/icons/video.gifBinary files differ index 09abfad3b..56aca7589 100644 --- a/mod/file/graphics/icons/video.gif +++ b/mod/file/graphics/icons/video.gif diff --git a/mod/file/graphics/icons/video_lrg.gif b/mod/file/graphics/icons/video_lrg.gifBinary files differ index b23dbad91..69cc706d9 100644 --- a/mod/file/graphics/icons/video_lrg.gif +++ b/mod/file/graphics/icons/video_lrg.gif diff --git a/mod/file/graphics/icons/word.gif b/mod/file/graphics/icons/word.gifBinary files differ index f906c75bd..6f7dff340 100644 --- a/mod/file/graphics/icons/word.gif +++ b/mod/file/graphics/icons/word.gif diff --git a/mod/file/graphics/icons/word_lrg.gif b/mod/file/graphics/icons/word_lrg.gifBinary files differ index 018c8e334..4c39108de 100644 --- a/mod/file/graphics/icons/word_lrg.gif +++ b/mod/file/graphics/icons/word_lrg.gif diff --git a/mod/file/start.php b/mod/file/start.php index e15a9ad61..f8b512318 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -122,6 +122,7 @@ function file_page_handler($page) {  			include "$file_dir/friends.php";  			break;  		case 'view': +		case 'read': // Elgg 1.7 compatibility  			set_input('guid', $page[1]);  			include "$file_dir/view.php";  			break; @@ -345,7 +346,8 @@ function file_icon_url_override($hook, $type, $returnvalue, $params) {  		// thumbnails get first priority  		if ($file->thumbnail) { -			return "mod/file/thumbnail.php?file_guid=$file->guid&size=$size"; +			$ts = (int)$file->icontime; +			return "mod/file/thumbnail.php?file_guid=$file->guid&size=$size&icontime=$ts";  		}  		$mapping = array( diff --git a/mod/file/views/default/file/specialcontent/image/default.php b/mod/file/views/default/file/specialcontent/image/default.php index fbd994a0b..431ac9f4f 100644 --- a/mod/file/views/default/file/specialcontent/image/default.php +++ b/mod/file/views/default/file/specialcontent/image/default.php @@ -1,13 +1,17 @@  <?php  /**   * Display an image + * + * @uses $vars['entity']   */ -$image_url = elgg_get_site_url() . "mod/file/thumbnail.php?file_guid={$vars['entity']->getGUID()}&size=large"; +$file = $vars['entity']; + +$image_url = $file->getIconURL('large');  $image_url = elgg_format_url($image_url); -$download_url = elgg_get_site_url() . "mod/file/download.php?file_guid={$vars['entity']->getGUID()}"; +$download_url = elgg_get_site_url() . "file/download/{$file->getGUID()}"; -if ($vars['full_view'] && $smallthumb = $vars['entity']->smallthumb) { +if ($vars['full_view']) {  	echo <<<HTML  		<div class="file-photo">  			<a href="$download_url"><img class="elgg-photo" src="$image_url" /></a> | 
