diff options
-rw-r--r-- | doc/database/db_xchan.bb | 53 | ||||
-rw-r--r-- | doc/database/db_xign.bb | 7 | ||||
-rw-r--r-- | doc/database/db_xlink.bb | 16 | ||||
-rw-r--r-- | doc/database/db_xprof.bb | 5 | ||||
-rwxr-xr-x | include/dba/dba_driver.php | 2 | ||||
-rw-r--r-- | mod/item.php | 2 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rw-r--r-- | view/js/main.js | 21 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 30 |
9 files changed, 96 insertions, 42 deletions
diff --git a/doc/database/db_xchan.bb b/doc/database/db_xchan.bb index fd1d68296..8932969c5 100644 --- a/doc/database/db_xchan.bb +++ b/doc/database/db_xchan.bb @@ -1,44 +1,59 @@ [table] [tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra [/th][/tr] -[tr][td]xchan_hash[/td][td][/td][td]char(255)[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td] +[tr][td]xchan_hash[/td][td]calculated hash of this extended channel[/td][td]char(255)[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td] [/td][/tr] -[tr][td]xchan_guid[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan_guid[/td][td]channel_guid of this extended channel[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xchan_guid_sig[/td][td][/td][td]text[/td][td]NO[/td][td][/td][td]NULL[/td][td] +[tr][td]xchan_guid_sig[/td][td]base64url encoded signature of the guid[/td][td]text[/td][td]NO[/td][td][/td][td]NULL[/td][td] [/td][/tr] -[tr][td]xchan_pubkey[/td][td][/td][td]text[/td][td]NO[/td][td][/td][td]NULL[/td][td] +[tr][td]xchan_pubkey[/td][td]public key for verifying signed data and assertions[/td][td]text[/td][td]NO[/td][td][/td][td]NULL[/td][td] [/td][/tr] -[tr][td]xchan_photo_mimetype[/td][td][/td][td]char(32)[/td][td]NO[/td][td][/td][td]image/jpeg[/td][td] +[tr][td]xchan_photo_mimetype[/td][td]mimetype of the profile photo[/td][td]char(32)[/td][td]NO[/td][td][/td][td]image/jpeg[/td][td] [/td][/tr] -[tr][td]xchan_photo_l[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] +[tr][td]xchan_photo_l[/td][td]photo url 300px[/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] [/td][/tr] -[tr][td]xchan_photo_m[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] +[tr][td]xchan_photo_m[/td][td]photo url 80 px[/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] [/td][/tr] -[tr][td]xchan_photo_s[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] +[tr][td]xchan_photo_s[/td][td]photo url 48 px[/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] [/td][/tr] -[tr][td]xchan_addr[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan_addr[/td][td]user@host[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xchan_url[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan_url[/td][td]url of channel page on primary hub location[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xchan_connurl[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan_connurl[/td]poco url[td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xchan_follow[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan_follow[/td]url template for following %s[td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xchan_connpage[/td][td][/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] +[tr][td]xchan_connpage[/td][td]for premium channels url of channel to display when connecting[/td][td]char(255)[/td][td]NO[/td][td][/td][td][/td][td] [/td][/tr] -[tr][td]xchan_name[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan_name[/td][td]human readabl name of channel[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xchan_network[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan_network[/td][td]network of channel for instance 'zot', 'diaspora', 'unknown'[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xchan_instance_url[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan_instance_url[/td][td]no longer used[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xchan_flags[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[tr][td]xchan_flags[/td][td]no longer used[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [/td][/tr] -[tr][td]xchan_photo_date[/td][td][/td][td]datetime[/td][td]NO[/td][td][/td][td]0000-00-00 00:00:00[/td][td] +[tr][td]xchan_photo_date[/td][td]timestamp of last photo change in GMT[/td][td]datetime[/td][td]NO[/td][td][/td][td]0000-00-00 00:00:00[/td][td] [/td][/tr] -[tr][td]xchan_name_date[/td][td][/td][td]datetime[/td][td]NO[/td][td][/td][td]0000-00-00 00:00:00[/td][td] +[tr][td]xchan_name_date[/td][td]timestamp of last name change in GMT[/td][td]datetime[/td][td]NO[/td][td][/td][td]0000-00-00 00:00:00[/td][td] [/td][/tr] +[tr][td]xchan_hidden[/td][td]flag - channel is hidden[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] +[tr][td]xchan_orphan[/td][td]flag - channel has no known hubloc locations[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] +[tr][td]xchan_censored[/td][td]flag - channel has been censored[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] +[tr][td]xchan_selfcensored[/td][td]flag - channel is self censored (adult or nsfw)[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] +[tr][td]xchan_system[/td][td]flag - this represents a system channel[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] +[tr][td]xchan_pubforum[/td][td]flag - channel is a public forum[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] +[tr][td]xchan_deleted[/td][td]flag - channel was deleted[/td][td]int(10) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] + [/table] Return to [zrl=[baseurl]/help/database]database documentation[/zrl]
\ No newline at end of file diff --git a/doc/database/db_xign.bb b/doc/database/db_xign.bb index e216e11cc..63c6569de 100644 --- a/doc/database/db_xign.bb +++ b/doc/database/db_xign.bb @@ -1,11 +1,12 @@ +xign - holds xchan information for channels that have been ignored in 'friend suggestions' [table] [tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra [/th][/tr] -[tr][td]id[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment +[tr][td]id[/td][td]sequential ID[/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment [/td][/tr] -[tr][td]uid[/td][td][/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[tr][td]uid[/td][td]local channel.channel_id[/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [/td][/tr] -[tr][td]xchan[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xchan[/td][td]xchan.xchan_hash of ignored channel[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] [/table] diff --git a/doc/database/db_xlink.bb b/doc/database/db_xlink.bb index 2eefec14a..528f8da19 100644 --- a/doc/database/db_xlink.bb +++ b/doc/database/db_xlink.bb @@ -1,15 +1,21 @@ +xlink - used to store social graph and channel ratings [table] [tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra [/th][/tr] -[tr][td]xlink_id[/td][td][/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment +[tr][td]xlink_id[/td][td]sequential ID[/td][td]int(10) unsigned[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td]auto_increment [/td][/tr] -[tr][td]xlink_xchan[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xlink_xchan[/td][td]xchan.xchan_hash of controlling channel[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xlink_link[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] +[tr][td]xlink_link[/td][td]xchan.xchan_hash of link target (connection or rating)[/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] -[tr][td]xlink_rating[/td][td][/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[tr][td]xlink_rating[/td][td]int rating[/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [/td][/tr] -[tr][td]xlink_updated[/td][td][/td][td]datetime[/td][td]NO[/td][td]MUL[/td][td]0000-00-00 00:00:00[/td][td] +[tr][td]xlink_rating_txt[/td][td]rating text[/td][td]mediumtext[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] +[tr][td]xlink_updated[/td][td]timestamp of update in GMT[/td][td]datetime[/td][td]NO[/td][td]MUL[/td][td]0000-00-00 00:00:00[/td][td] +[tr][td]xlink_static[/td][td]0 for social graph, 1 for ratings[/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[/td][/tr] +[tr][td]xlink_sig[/td][td]base64url encoded signature of rating information[/td][td]int(11)[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [/td][/tr] [/table] diff --git a/doc/database/db_xprof.bb b/doc/database/db_xprof.bb index d98fb3f17..bed79e9ca 100644 --- a/doc/database/db_xprof.bb +++ b/doc/database/db_xprof.bb @@ -1,9 +1,10 @@ +xprof - stores searchable public profile information on directory servers [table] [tr][th]Field[/th][th]Description[/th][th]Type[/th][th]Null[/th][th]Key[/th][th]Default[/th][th]Extra [/th][/tr] -[tr][td]xprof_hash[/td][td][/td][td]char(255)[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td] +[tr][td]xprof_hash[/td][td]xchan.xchan_hash of this channel[/td][td]char(255)[/td][td]NO[/td][td]PRI[/td][td]NULL[/td][td] [/td][/tr] -[tr][td]xprof_age[/td][td][/td][td]tinyint(3) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] +[tr][td]xprof_age[/td][td]current age (updated monthly)[/td][td]tinyint(3) unsigned[/td][td]NO[/td][td]MUL[/td][td]0[/td][td] [/td][/tr] [tr][td]xprof_desc[/td][td][/td][td]char(255)[/td][td]NO[/td][td]MUL[/td][td][/td][td] [/td][/tr] diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index 708d8e709..1fb3d5c00 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -137,7 +137,7 @@ abstract class dba_driver { } if(strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1')) { - if(! dns_get_record($server, DNS_A + DNS_CNAME + DNS_PTR)) { + if((! dns_get_record($server, DNS_A + DNS_CNAME + DNS_PTR)) && (! filter_var($server, FILTER_VALIDATE_IP))) { $this->error = sprintf( t('Cannot locate DNS info for database server \'%s\''), $server); $this->connected = false; $this->db = null; diff --git a/mod/item.php b/mod/item.php index 34484eff7..f32ff8844 100644 --- a/mod/item.php +++ b/mod/item.php @@ -810,7 +810,7 @@ function item_post(&$a) { - if(feature_enabled($profile_uid,'suppress_duplicates')) { + if(feature_enabled($profile_uid,'suppress_duplicates') && (! $orig_post)) { $z = q("select created from item where uid = %d and body = '%s'", intval($profile_uid), diff --git a/version.inc b/version.inc index c6bcb1648..211f6c438 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-11-22.1224 +2015-11-23.1225 diff --git a/view/js/main.js b/view/js/main.js index 8bd4357cc..ca7d50b90 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -247,6 +247,7 @@ var pageHasMoreContent = true; var updateCountsOnly = false; var divmore_height = 400; var last_filestorage_id = null; +var mediaPlaying = false; $(function() { $.ajaxSetup({cache: false}); @@ -359,7 +360,7 @@ function NavUpdate() { if(liking) $('.like-rotator').spin(false); - if(! stopped) { + if((! stopped) && (! mediaPlaying)) { var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : ''); $.get(pingCmd,function(data) { @@ -595,6 +596,24 @@ function updateConvItems(mode,data) { $('body').css('cursor', 'auto'); } + $('video').off('playing'); + $('video').off('pause'); + $('audio').off('playing'); + $('audio').off('pause'); + + $('video').on('playing', function() { + mediaPlaying = true; + }); + $('video').on('pause', function() { + mediaPlaying = false; + }); + $('audio').on('playing', function() { + mediaPlaying = true; + }); + $('audio').on('pause', function() { + mediaPlaying = false; + }); + /* autocomplete @nicknames */ $(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index b405e4ac8..84fccc105 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -190,15 +190,27 @@ function enableOnUser(){ } function jotGetLink() { - reply = prompt("{{$linkurl}}"); - if(reply && reply.length) { - reply = bin2hex(reply); - $('#profile-rotator').spin('tiny'); - $.get('{{$baseurl}}/linkinfo?f=&binurl=' + reply, function(data) { - addeditortext(data); - $('#profile-rotator').spin(false); - }); - } + textarea = document.getElementById('profile-jot-text'); + if (textarea.selectionStart || textarea.selectionStart == "0") { + var start = textarea.selectionStart; + var end = textarea.selectionEnd; + if (end > start) { + reply = prompt("{{$linkurl}}"); + if(reply && reply.length) { + textarea.value = textarea.value.substring(0, start) + "[url=" + reply + "]" + textarea.value.substring(start, end) + "[/url]" + textarea.value.substring(end, textarea.value.length); + } + } else { + reply = prompt("{{$linkurl}}"); + if(reply && reply.length) { + reply = bin2hex(reply); + $('#profile-rotator').spin('tiny'); + $.get('{{$baseurl}}/linkinfo?f=&binurl=' + reply, function(data) { + addeditortext(data); + $('#profile-rotator').spin(false); + }); + } + } + } } function jotVideoURL() { |