aboutsummaryrefslogtreecommitdiff
path: root/mod/file
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file')
-rw-r--r--mod/file/start.php19
-rw-r--r--mod/file/thumbnail.php2
-rw-r--r--mod/file/views/default/object/file.php2
3 files changed, 13 insertions, 10 deletions
diff --git a/mod/file/start.php b/mod/file/start.php
index 172042332..7c0c216b2 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -121,8 +121,11 @@ function file_page_handler($page) {
file_register_toggle();
include "$file_dir/friends.php";
break;
- case 'view':
case 'read': // Elgg 1.7 compatibility
+ register_error(elgg_echo("changebookmark"));
+ forward("file/view/{$page[1]}");
+ break;
+ case 'view':
set_input('guid', $page[1]);
include "$file_dir/view.php";
break;
@@ -200,13 +203,9 @@ function file_notify_message($hook, $entity_type, $returnvalue, $params) {
if (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'file')) {
$descr = $entity->description;
$title = $entity->title;
+ $url = elgg_get_site_url() . "view/" . $entity->guid;
$owner = $entity->getOwnerEntity();
- return elgg_echo('file:notification', array(
- $owner->name,
- $title,
- $descr,
- $entity->getURL()
- ));
+ return $owner->name . ' ' . elgg_echo("file:via") . ': ' . $entity->title . "\n\n" . $descr . "\n\n" . $entity->getURL();
}
return null;
}
@@ -237,6 +236,10 @@ function file_owner_block_menu($hook, $type, $return, $params) {
* @return string The overall type
*/
function file_get_simple_type($mimetype) {
+
+ if ($simpletype = elgg_trigger_plugin_hook('file:simpletype', $mimetype, null, null)) {
+ return $simpletype;
+ }
switch ($mimetype) {
case "application/msword":
@@ -410,4 +413,4 @@ function file_icon_url_override($hook, $type, $returnvalue, $params) {
$url = elgg_trigger_plugin_hook('file:icon:url', 'override', $params, $url);
return $url;
}
-} \ No newline at end of file
+}
diff --git a/mod/file/thumbnail.php b/mod/file/thumbnail.php
index 35bf8c7f7..851f13a8f 100644
--- a/mod/file/thumbnail.php
+++ b/mod/file/thumbnail.php
@@ -46,7 +46,7 @@ if ($simpletype == "image") {
// caching images for 10 days
header("Content-type: $mime");
- header('Expires: ' . date('r',time() + 864000));
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', strtotime("+10 days")), true);
header("Pragma: public", true);
header("Cache-Control: public", true);
header("Content-Length: " . strlen($contents));
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index b3f530183..64f19c483 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -68,6 +68,7 @@ if ($full && !elgg_in_context('gallery')) {
$params = array(
'entity' => $file,
+ 'title' => false,
'metadata' => $metadata,
'subtitle' => $subtitle,
);
@@ -79,7 +80,6 @@ if ($full && !elgg_in_context('gallery')) {
echo elgg_view('object/elements/full', array(
'entity' => $file,
- 'title' => false,
'icon' => $file_icon,
'summary' => $summary,
'body' => $body,