aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/bugreport.apd1
-rw-r--r--app/lang.pngbin5163 -> 6559 bytes
-rw-r--r--app/pphoto.pngbin10229 -> 5498 bytes
-rw-r--r--app/profile.apd4
-rw-r--r--app/profile.pngbin0 -> 3550 bytes
-rw-r--r--app/randprof.pngbin50762 -> 5268 bytes
-rw-r--r--doc/hidden_configs.bb3
-rw-r--r--include/RedDAV/RedBrowser.php15
-rw-r--r--include/bbcode.php4
-rw-r--r--mod/item.php3
-rw-r--r--mod/manage.php13
-rw-r--r--mod/photo.php18
-rw-r--r--mod/profiles.php18
-rw-r--r--version.inc2
-rw-r--r--view/css/mod_cloud.css25
-rw-r--r--view/js/main.js2
-rw-r--r--view/theme/redbasic/css/style.css64
-rw-r--r--view/tpl/attach_edit.tpl61
-rwxr-xr-xview/tpl/channel.tpl2
-rw-r--r--view/tpl/cloud_directory.tpl22
20 files changed, 170 insertions, 87 deletions
diff --git a/app/bugreport.apd b/app/bugreport.apd
index 412ef62b8..42c31f016 100644
--- a/app/bugreport.apd
+++ b/app/bugreport.apd
@@ -1,4 +1,3 @@
url: https://github.com/friendica/red/issues
-requires: local_user
name: Bug Report
photo: $baseurl/app/bugreport.png
diff --git a/app/lang.png b/app/lang.png
index debffd1ae..89a61c26a 100644
--- a/app/lang.png
+++ b/app/lang.png
Binary files differ
diff --git a/app/pphoto.png b/app/pphoto.png
index eda371e8b..041ff1e0c 100644
--- a/app/pphoto.png
+++ b/app/pphoto.png
Binary files differ
diff --git a/app/profile.apd b/app/profile.apd
index ce52f960b..d2bdf23a7 100644
--- a/app/profile.apd
+++ b/app/profile.apd
@@ -1,4 +1,4 @@
url: $baseurl/profile/$nick
requires: local_user
-name: Profile
-
+name: View profile
+photo: $baseurl/app/profile.png
diff --git a/app/profile.png b/app/profile.png
new file mode 100644
index 000000000..e6e137c82
--- /dev/null
+++ b/app/profile.png
Binary files differ
diff --git a/app/randprof.png b/app/randprof.png
index 3280ef8ee..7bb438dcd 100644
--- a/app/randprof.png
+++ b/app/randprof.png
Binary files differ
diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb
index bf9705920..435042520 100644
--- a/doc/hidden_configs.bb
+++ b/doc/hidden_configs.bb
@@ -128,6 +128,9 @@ This document assumes you're an administrator.
When requesting a random profile, check that it actually exists first
[b]randprofile > retry[/b]
Number of times to retry getting a random profile
+ [b]system > photo_cache_time[/b]
+ How long to cache photos, in seconds. Default is 86400 (1 day).
+ Longer time increases performance, but it also means it takes longer for changed permissions to apply.
#include doc/macros/main_footer.bb;
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/include/bbcode.php b/include/bbcode.php
index 9445eb007..ab56bda61 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -22,7 +22,7 @@ function tryzrlaudio($match) {
$zrl = is_matrix_url($link);
if($zrl)
$link = zid($link);
- return '<audio src="' . $link . '" controls="controls" ><a href="' . $link . '">' . $link . '</a></audio>';
+ return '<audio src="' . str_replace(' ','%20',$link) . '" controls="controls" ><a href="' . str_replace(' ','%20',$link) . '">' . $link . '</a></audio>';
}
function tryzrlvideo($match) {
@@ -30,7 +30,7 @@ function tryzrlvideo($match) {
$zrl = is_matrix_url($link);
if($zrl)
$link = zid($link);
- return '<video controls="controls" src="' . $link . '" style="width:100%; max-width:' . get_app()->videowidth . 'px"><a href="' . $link . '">' . $link . '</a></video>';
+ return '<video controls="controls" src="' . str_replace(' ','%20',$link) . '" style="width:100%; max-width:' . get_app()->videowidth . 'px"><a href="' . str_replace(' ','%20',$link) . '">' . $link . '</a></video>';
}
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/manage.php b/mod/manage.php
index 00c6db7f0..21327a120 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -28,8 +28,13 @@ function manage_content(&$a) {
if($change_channel) {
$r = change_channel($change_channel);
- if($r && $r['channel_startpage'])
- goaway(z_root() . '/' . $r['channel_startpage']);
+ if((argc() > 2) && !(argv(2) === 'default')) {
+ goaway(z_root() . '/' . implode('/',array_slice($a->argv,2))); // Go to whatever is after /manage/, but with the new channel
+ }
+ else {
+ if($r && $r['channel_startpage'])
+ goaway(z_root() . '/' . $r['channel_startpage']); // If nothing extra is specified, go to the default page
+ }
goaway(z_root());
}
@@ -49,7 +54,7 @@ function manage_content(&$a) {
for($x = 0; $x < count($channels); $x ++) {
$channels[$x]['link'] = 'manage/' . intval($channels[$x]['channel_id']);
if($channels[$x]['channel_id'] == local_user())
- $selected_channel = $channels[$x];
+ $selected_channel = &$channels[$x]; // Needs to be a reference!
$channels[$x]['default'] = (($channels[$x]['channel_id'] == $account['account_default_channel']) ? "1" : '');
$channels[$x]['default_links'] = '1';
@@ -153,6 +158,8 @@ function manage_content(&$a) {
'$msg_make_default' => t('Make Default'),
'$links' => $links,
'$all_channels' => $channels,
+ '$mail_format' => t('%d new messages'),
+ '$intros_format' => t('%d new introductions'),
'$channel_usage_message' => $channel_usage_message,
));
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/mod/profiles.php b/mod/profiles.php
index 1d784c506..f2695f332 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -156,9 +156,14 @@ function profiles_init(&$a) {
// Run profile_load() here to make sure the theme is set before
// we start loading content
- if((argc() > 1) && (intval(argv(1)))) {
+ if(((argc() > 1) && (intval(argv(1)))) || !feature_enabled(local_user(),'multi_profiles')) {
+ if(feature_enabled(local_user(),'multi_profiles'))
+ $id = $a->argv[1];
+ else
+ $id = q("select id from profile where uid = %d and is_default = 1",local_user())[0]['id'];
+
$r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($a->argv[1]),
+ intval($id),
intval(local_user())
);
if(! count($r)) {
@@ -556,9 +561,14 @@ function profiles_content(&$a) {
$profile_fields_basic = get_profile_fields_basic();
$profile_fields_advanced = get_profile_fields_advanced();
- if((argc() > 1) && (intval(argv(1)))) {
+ if(((argc() > 1) && (intval(argv(1)))) || !feature_enabled(local_user(),'multi_profiles')) {
+ if(feature_enabled(local_user(),'multi_profiles'))
+ $id = $a->argv[1];
+ else
+ $id = q("select id from profile where uid = %d and is_default = 1",local_user())[0]['id'];
+
$r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($a->argv[1]),
+ intval($id),
intval(local_user())
);
if(! count($r)) {
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
diff --git a/view/css/mod_cloud.css b/view/css/mod_cloud.css
index 85d3f4ec6..56f4c415b 100644
--- a/view/css/mod_cloud.css
+++ b/view/css/mod_cloud.css
@@ -2,17 +2,36 @@
#files-upload-tools,
[id^="perms-panel-"] {
display: none;
+ padding: 3px 10px 3px 10px !important;
+}
+
+#attach-code,
+#link-code {
+ display: none;
}
#cloud-index {
width: 100%;
}
+#cloud-index th {
+ padding-top: 7px;
+}
+
#cloud-index td:nth-child(1){
- padding: 3px 4px 3px 0px;
+ padding: 7px 3px 7px 10px;
}
-.cloud-index-tool {
- padding: 3px 4px;
+#cloud-index td:nth-child(8){
+ padding: 7px 3px;
+ white-space: nowrap;
+}
+
+#cloud-index td:nth-child(9){
+ padding: 7px 10px 7px 7px;
+ white-space: nowrap;
}
+.cloud-index-tool {
+ padding: 7px 10px;
+}
diff --git a/view/js/main.js b/view/js/main.js
index f979f6b6f..104718436 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -844,10 +844,12 @@ function updateConvItems(mode,data) {
}
function filestorage(event,nick,id) {
+ $('#cloud-index-' + last_filestorage_id).removeClass('cloud-index-active');
$('#perms-panel-' + last_filestorage_id).hide().html('');
$('#file-edit-' + id).spin('tiny');
delete acl;
$.get('filestorage/' + nick + '/' + id + '/edit', function(data) {
+ $('#cloud-index-' + id).addClass('cloud-index-active');
$('#perms-panel-' + id).html(data).show();
$('#file-edit-' + id).spin(false);
last_filestorage_id = id;
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 7a6c13798..357718623 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1774,7 +1774,6 @@ img.mail-list-sender-photo {
color: #777;
}
-#jot-perms-icon,
.jot-icons {
color: $toolicon_colour;
}
@@ -2031,6 +2030,43 @@ nav .dropdown-menu>li>a:hover,nav .dropdown-menu>li>a:focus{
color: $nav_active_icon_colour;
}
+.section-title-wrapper {
+ padding: 7px 10px;
+ background-color: $item_colour;
+ border-top-left-radius: $radiuspx;
+ border-top-right-radius: $radiuspx;
+ margin-bottom: 3px;
+}
+
+.section-title-wrapper h2 {
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+.section-content-tools-wrapper {
+ padding: 7px 10px;
+ background-color: $comment_item_colour;
+ margin-bottom: 3px;
+}
+
+.section-content-wrapper {
+ padding: 7px 10px;
+ background-color: $comment_item_colour;
+ border-bottom-left-radius: $radiuspx;
+ border-bottom-right-radius: $radiuspx;
+}
+
+.section-content-wrapper-np {
+ background-color: $comment_item_colour;
+ border-bottom-left-radius: $radiuspx;
+ border-bottom-right-radius: $radiuspx;
+}
+
+[id^="cloud-index-"]:hover,
+.cloud-index-active {
+ background-color: $item_colour;
+}
+
/* bootstrap overrides */
blockquote {
@@ -2226,32 +2262,6 @@ aside .nav > li > a:hover, aside .nav > li > a:focus {
background-image: linear-gradient(to bottom, $advperm_gradientcol 0px, $advperm_bgcolour 100%);
}
-.section-title-wrapper {
- padding: 7px 10px;
- background-color: $item_colour;
- border-top-left-radius: $radiuspx;
- border-top-right-radius: $radiuspx;
- margin-bottom: 3px;
-}
-
-.section-title-wrapper h2 {
- margin-top: 0px;
- margin-bottom: 0px;
-}
-
-.section-content-tools-wrapper {
- padding: 7px 10px;
- background-color: $comment_item_colour;
- margin-bottom: 3px;
-}
-
-.section-content-wrapper {
- padding: 7px 10px;
- background-color: $comment_item_colour;
- border-bottom-left-radius: $radiuspx;
- border-bottom-right-radius: $radiuspx;
-}
-
@media screen and (max-width: 767px) {
aside#region_1 {
background: rgba(0, 0, 0, .1);
diff --git a/view/tpl/attach_edit.tpl b/view/tpl/attach_edit.tpl
index bf39e6158..033ee40a7 100644
--- a/view/tpl/attach_edit.tpl
+++ b/view/tpl/attach_edit.tpl
@@ -1,34 +1,41 @@
<form action="filestorage/{{$channelnick}}/{{$file.id}}/edit" method="post" >
-<div id="attach-edit-perms" >
-<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;">
- <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>
-</button>
-<button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" name="submit">
- {{$submit}}
-</button>
-</div>
+ <div id="attach-edit-tools" class="btn-group form-group">
+ {{if !$isadir}}
+ <a href="/rpost?body=[attachment]{{$file.hash}},{{$file.revision}}[/attachment]" id="attach-btn" class="btn btn-default btn-xs">
+ <i class="icon-paperclip jot-icons"></i>
+ </a>
+ {{/if}}
+ <button id="link-btn" class="btn btn-default btn-xs" type="button" onclick="openClose('link-code');">
+ <i class="icon-share jot-icons"></i>
+ </button>
+ </div>
+ <div id="attach-edit-perms" class="btn-group form-group pull-right">
+ <button id="dbtn-acl" class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;">
+ <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>
+ </button>
+ <button id="dbtn-submit" class="btn btn-primary btn-xs" type="submit" name="submit">
+ {{$submit}}
+ </button>
+ </div>
+ {{$aclselect}}
-{{$aclselect}}
+ <input type="hidden" name="channelnick" value="{{$channelnick}}" />
+ <input type="hidden" name="filehash" value="{{$file.hash}}" />
+ <input type="hidden" name="uid" value="{{$uid}}" />
+ <input type="hidden" name="fileid" value="{{$file.id}}" />
-<input type="hidden" name="channelnick" value="{{$channelnick}}" />
-<input type="hidden" name="filehash" value="{{$file.hash}}" />
-<input type="hidden" name="uid" value="{{$uid}}" />
-<input type="hidden" name="fileid" value="{{$file.id}}" />
-
-{{if $isadir}}
-<div id="attach-edit-recurse" >
- <label id="attach-edit-recurse-text" for="attach-recurse-input" >{{$recurse}}</label>
- <input id="attach-recurse-input" type="checkbox" name="recurse" value="1" />
-</div>
-{{else}}
-<div class="cut-paste-desc">{{$cpdesc}}</div>
-<input type="text" id="cutpasteinput" name="cutpastelink" value="[attachment]{{$file.hash}},{{$file.revision}}[/attachment]" onclick="this.select();" /><br />
-{{/if}}
-
-<div class="cut-paste-desc">{{$cpldesc}}</div>
-<input type="text" id="linkpasteinput" name="cutpasteextlink" value="{{$cloudpath}}" onclick="this.select();"/><br />
-<div class="clear"></div>
+ {{if $isadir}}
+ <div class="form-group">
+ <label id="attach-edit-recurse-text" class="checkbox-inline" for="attach-recurse-input" >
+ <input class="checkbox-inline" id="attach-recurse-input" type="checkbox" name="recurse" value="1" />{{$recurse}}
+ </label>
+ </div>
+ {{/if}}
+ <div id="link-code" class="form-group">
+ <label for="">{{$cpldesc}}</label>
+ <input type="text" class="form-control" id="linkpasteinput" name="cutpasteextlink" value="{{$cloudpath}}" onclick="this.select();"/>
+ </div>
</form>
diff --git a/view/tpl/channel.tpl b/view/tpl/channel.tpl
index 55b122d9b..c151ba8b2 100755
--- a/view/tpl/channel.tpl
+++ b/view/tpl/channel.tpl
@@ -7,7 +7,7 @@
{{/if}}
{{/if}}
<a href="{{$channel.link}}" class="channel-selection-photo-link" title="{{$channel.channel_name}}"><img class="channel-photo" src="{{$channel.xchan_photo_m}}" alt="{{$channel.channel_name}}" /></a>
-<div class="channels-notifications-wrapper">{{if $channel.mail != 0}}<span style="color:#c60032;"><i class="icon-envelope"></i> {{$channel.mail}}</span>{{else}}<i class="icon-envelope"></i> &nbsp;{{/if}} {{if $channel.intros != 0}}<span style="color:#c60032;"><i class="icon-user"></i> {{$channel.intros}}</span>{{else}}<i class="icon-user"></i> &nbsp;{{/if}}</div>
+<div class="channels-notifications-wrapper"><a href='manage/{{$channel.channel_id}}/message' style="{{if $channel.mail != 0}}color:#c60032;{{/if}}" title='{{$channel.mail|string_format:$mail_format}}'><i class="icon-envelope"></i> {{$channel.mail}}</a>&nbsp;<a href='manage/{{$channel.channel_id}}/connections/ifpending' style="{{if $channel.intros != 0}}color:#c60032;{{/if}}" title='{{$channel.intros|string_format:$intros_format}}'><i class="icon-user"></i> {{$channel.intros}}</a></div>
<a href="{{$channel.link}}" class="channel-selection-name-link" title="{{$channel.channel_name}}"><div class="channel-name">{{$channel.channel_name}}</div></a>
</div>
diff --git a/view/tpl/cloud_directory.tpl b/view/tpl/cloud_directory.tpl
index 99bba9474..77d861224 100644
--- a/view/tpl/cloud_directory.tpl
+++ b/view/tpl/cloud_directory.tpl
@@ -1,12 +1,12 @@
-<div class="section-content-wrapper generic-content-wrapper">
+<div class="generic-content-wrapper section-content-wrapper-np">
<table id="cloud-index">
<tr>
- <th></th>
- <th>{{$name}}</th>
- <th></th><th></th><th></th><th></th>
- <th>{{*{{$type}}*}}</th>
- <th class="hidden-xs">{{$size}}</th>
- <th class="hidden-xs">{{$lastmod}}</th>
+ <th width="1%"></th>
+ <th width="92%">{{$name}}</th>
+ <th width="1%"></th><th width="1%"></th><th width="1%"></th><th width="1%"></th>
+ <th width="1%">{{*{{$type}}*}}</th>
+ <th width="1%" class="hidden-xs">{{$size}}</th>
+ <th width="1%" class="hidden-xs">{{$lastmod}}</th>
</tr>
{{if $parentpath}}
<tr>
@@ -19,14 +19,14 @@
</tr>
{{/if}}
{{foreach $entries as $item}}
- <tr id="cloud-panel-{{$item.attachId}}">
+ <tr id="cloud-index-{{$item.attachId}}">
<td><i class="{{$item.iconFromType}}" title="{{$item.type}}"></i></td>
<td><a href="{{$item.fullPath}}">{{$item.displayName}}</a></td>
{{if $item.is_owner}}
<td class="cloud-index-tool">{{$item.attachIcon}}</td>
<td id="file-edit-{{$item.attachId}}" class="cloud-index-tool"></td>
<td class="cloud-index-tool"><i class="fakelink icon-pencil" onclick="filestorage(event, '{{$nick}}', {{$item.attachId}});"></i></td>
- <td class="cloud-index-tool"><a href="{{$item.fileStorageUrl}}/{{$item.attachId}}/delete" title="{{$delete}}" onclick="return confirmDelete();"><i class="icon-remove drop-icons"></i></a></td>
+ <td class="cloud-index-tool"><a href="{{$item.fileStorageUrl}}/{{$item.attachId}}/delete" title="{{$delete}}" onclick="return confirmDelete();"><i class="icon-trash drop-icons"></i></a></td>
{{else}}
<td></td><td></td><td></td><td></td>
@@ -35,7 +35,9 @@
<td class="hidden-xs">{{$item.sizeFormatted}}</td>
<td class="hidden-xs">{{$item.lastmodified}}</td>
</tr>
- <tr><td id="perms-panel-{{$item.attachId}}" colspan="9"></td></tr>
+ <tr>
+ <td id="perms-panel-{{$item.attachId}}" colspan="9"></td>
+ </tr>
{{/foreach}}
</table>
</div>