aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/RedDAV/RedBrowser.php6
-rw-r--r--include/attach.php2
-rw-r--r--include/auth.php2
-rw-r--r--include/enotify.php17
-rw-r--r--include/identity.php5
5 files changed, 27 insertions, 5 deletions
diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php
index d07f60083..709f6339b 100644
--- a/include/RedDAV/RedBrowser.php
+++ b/include/RedDAV/RedBrowser.php
@@ -342,6 +342,7 @@ class RedBrowser extends DAV\Browser\Plugin {
'application/octet-stream' => 'icon-file-alt',
//Text
+ 'text/plain' => 'icon-file-text-alt',
'application/msword' => 'icon-file-text-alt',
'application/pdf' => 'icon-file-text-alt',
'application/vnd.oasis.opendocument.text' => 'icon-file-text-alt',
@@ -365,6 +366,11 @@ class RedBrowser extends DAV\Browser\Plugin {
'audio/mpeg' => 'icon-music',
'audio/wav' => 'icon-music',
'application/ogg' => 'icon-music',
+
+ //Video
+ 'video/quicktime' => 'icon-film',
+
+
);
$iconFromType = 'icon-file-alt';
diff --git a/include/attach.php b/include/attach.php
index ad6ca1b21..a76dd4b28 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -717,7 +717,7 @@ function attach_change_permissions($channel_id, $resource, $allow_cid, $allow_gi
);
if($r) {
foreach($r as $rr) {
- attach_change_permissions($channel_id, $resource, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $recurse);
+ attach_change_permissions($channel_id, $rr['hash'], $allow_cid, $allow_gid, $deny_cid, $deny_gid, $recurse);
}
}
}
diff --git a/include/auth.php b/include/auth.php
index 545fbe8c9..c4bbaf546 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -283,7 +283,7 @@ else {
@file_put_contents($authlog, datetime_convert() . ':' . session_id() . ' ' . $error . "\n", FILE_APPEND);
notice( t('Login failed.') . EOL );
- goaway(z_root());
+ goaway(z_root() . '/login');
}
// If the user specified to remember the authentication, then change the cookie
diff --git a/include/enotify.php b/include/enotify.php
index f3eb80117..3fef3ba0a 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -357,9 +357,21 @@ function notification($params) {
// create notification entry in DB
+ $seen = 0;
+
+ // Mark some notifications as seen right away
+ // Note! The notification have to be created, because they are used to send emails
+ // So easiest solution to hide them from Notices is to mark them as seen right away.
+ // Another option would be to not add them to the DB, and change how emails are handled (probably would be better that way)
+ $always_show_in_notices = get_pconfig($recip['channel_id'],'system','always_show_in_notices');
+ if(!$always_show_in_notices) {
+ if(($params['type'] == NOTIFY_WALL) || ($params['type'] == NOTIFY_MAIL) || ($params['type'] == NOTIFY_INTRO)) {
+ $seen = 1;
+ }
+ }
- $r = q("insert into notify (hash,name,url,photo,date,aid,uid,link,parent,type,verb,otype)
- values('%s','%s','%s','%s','%s',%d,%d,'%s','%s',%d,'%s','%s')",
+ $r = q("insert into notify (hash,name,url,photo,date,aid,uid,link,parent,seen,type,verb,otype)
+ values('%s','%s','%s','%s','%s',%d,%d,'%s','%s',%d,%d,'%s','%s')",
dbesc($datarray['hash']),
dbesc($datarray['name']),
dbesc($datarray['url']),
@@ -369,6 +381,7 @@ function notification($params) {
intval($datarray['uid']),
dbesc($datarray['link']),
dbesc($datarray['parent']),
+ intval($seen),
intval($datarray['type']),
dbesc($datarray['verb']),
dbesc($datarray['otype'])
diff --git a/include/identity.php b/include/identity.php
index 7ae8e48f6..17238ea99 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -856,7 +856,8 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
);
- if(feature_enabled(local_user(),'multi_profiles')) {
+ $multi_profiles = feature_enabled(local_user(), 'multi_profiles');
+ if($multi_profiles) {
$profile['edit'] = array($a->get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
$profile['menu']['cr_new'] = t('Create New Profile');
}
@@ -869,6 +870,8 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
if($r) {
foreach($r as $rr) {
+ if(!($multi_profiles || $rr['is_default']))
+ continue;
$profile['menu']['entries'][] = array(
'photo' => $rr['thumb'],
'id' => $rr['id'],