aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/RedDAV/RedBrowser.php15
-rw-r--r--mod/item.php3
-rw-r--r--mod/photo.php18
-rw-r--r--version.inc2
4 files changed, 31 insertions, 7 deletions
diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php
index 6b0c77014..d07f60083 100644
--- a/include/RedDAV/RedBrowser.php
+++ b/include/RedDAV/RedBrowser.php
@@ -328,7 +328,7 @@ class RedBrowser extends DAV\Browser\Plugin {
}
/**
- * @brief returns icon name for use with e.g. font-awesome based on filetype
+ * @brief returns icon name for use with e.g. font-awesome based on mime-type
*
* @param string $type
* @return string
@@ -345,15 +345,26 @@ class RedBrowser extends DAV\Browser\Plugin {
'application/msword' => 'icon-file-text-alt',
'application/pdf' => 'icon-file-text-alt',
'application/vnd.oasis.opendocument.text' => 'icon-file-text-alt',
+ 'application/epub+zip' => 'icon-book',
//Spreadsheet
- 'application/vnd.oasis.opendocument.spreadsheet' => 'icon-table',
+ 'application/vnd.oasis.opendocument.spreadsheet' => 'icon-table',
+ 'application/vnd.ms-excel' => 'icon-table',
//Image
'image/jpeg' => 'icon-picture',
'image/png' => 'icon-picture',
'image/gif' => 'icon-picture',
'image/svg+xml' => 'icon-picture',
+
+ //Archive
+ 'application/zip' => 'icon-archive',
+ 'application/x-rar-compressed' => 'icon-archive',
+
+ //Audio
+ 'audio/mpeg' => 'icon-music',
+ 'audio/wav' => 'icon-music',
+ 'application/ogg' => 'icon-music',
);
$iconFromType = 'icon-file-alt';
diff --git a/mod/item.php b/mod/item.php
index 9ffcc7de2..f5a9a4b22 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -683,7 +683,8 @@ function item_post(&$a) {
}
}
- $item_flags |= ITEM_UNSEEN;
+ if(local_user() != $profile_uid)
+ $item_flags |= ITEM_UNSEEN;
if($post_type === 'wall' || $post_type === 'wall-comment')
$item_flags = $item_flags | ITEM_WALL;
diff --git a/mod/photo.php b/mod/photo.php
index 8cb82e8ff..66280cb76 100644
--- a/mod/photo.php
+++ b/mod/photo.php
@@ -224,9 +224,21 @@ function photo_init(&$a) {
}
else {
-
- header("Expires: " . gmdate("D, d M Y H:i:s", time() + (3600*24)) . " GMT");
- header("Cache-Control: max-age=" . (3600*24));
+ // The photo cache default is 1 day to provide a privacy trade-off,
+ // as somebody reducing photo permissions on a photo that is already
+ // "in the wild" won't be able to stop the photo from being viewed
+ // for this amount amount of time once it is in the browser cache.
+ // The privacy expectations of your site members and their perception
+ // of privacy where it affects the entire project may be affected.
+ // This has performance considerations but we highly recommend you
+ // leave it alone.
+
+ $cache = get_config('system','photo_cache_time');
+ if(! $cache)
+ $cache = (3600 * 24); // 1 day
+
+ header("Expires: " . gmdate("D, d M Y H:i:s", time() + $cache) . " GMT");
+ header("Cache-Control: max-age=" . $cache);
}
echo $data;
diff --git a/version.inc b/version.inc
index 7baa71358..9523d00d1 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-12-26.901
+2014-12-27.902