aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php2
-rw-r--r--include/features.php1
-rw-r--r--include/follow.php23
-rwxr-xr-xinclude/oembed.php2
-rw-r--r--include/photos.php17
-rw-r--r--include/socgraph.php2
6 files changed, 24 insertions, 23 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 33017c011..5504dce7a 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -746,7 +746,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$Text = preg_replace_callback("/\[video\](.*?\.(ogg|ogv|oga|ogm|webm|mp4))\[\/video\]/ism", 'tryzrlvideo', $Text);
}
if (strpos($Text,'[/audio]') !== false) {
- $Text = preg_replace_callback("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3))\[\/audio\]/ism", 'tryzrlaudio', $Text);
+ $Text = preg_replace_callback("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3|opus))\[\/audio\]/ism", 'tryzrlaudio', $Text);
}
// Try to Oembed
diff --git a/include/features.php b/include/features.php
index 1a4b2654f..6b4bc34c6 100644
--- a/include/features.php
+++ b/include/features.php
@@ -57,6 +57,7 @@ function get_features() {
t('Post Composition Features'),
// array('richtext', t('Richtext Editor'), t('Enable richtext editor'),false),
array('markdown', t('Use Markdown'), t('Allow use of "Markdown" to format posts'),false),
+ array('large_photos', t('Large Photos'), t('Include large (640px) photo thumbnails in posts. If not enabled, use small (320px) photo thumbnails'),false),
array('channel_sources', t('Channel Sources'), t('Automatically import channel content from other channels or feeds'),false),
array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false),
array('adult_photo_flagging', t('Flag Adult Photos'), t('Provide photo edit option to hide adult photos from default album view'),false),
diff --git a/include/follow.php b/include/follow.php
index 1abd0e3b9..06c0c5c62 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -66,14 +66,15 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
$my_perms = get_channel_default_perms($uid);
- if($is_red && $j) {
+ $role = get_pconfig($uid,'system','permissions_role');
+ if($role) {
+ $x = get_role_perms($role);
+ if($x['perms_follow'])
+ $my_perms = $x['perms_follow'];
+ }
- $role = get_pconfig($uid,'system','permissions_role');
- if($role) {
- $x = get_role_perms($role);
- if($x['perms_follow'])
- $my_perms = $x['perms_follow'];
- }
+
+ if($is_red && $j) {
logger('follow: ' . $url . ' ' . print_r($j,true), LOGGER_DEBUG);
@@ -105,7 +106,6 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
$xchan_hash = $x['hash'];
-
$their_perms = 0;
$global_perms = get_perms();
@@ -163,12 +163,6 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
if($r) {
$xchan_hash = $r[0]['xchan_hash'];
$their_perms = 0;
- $role = get_pconfig($uid,'system','permissions_role');
- if($role) {
- $x = get_role_perms($role);
- if($x['perms_follow'])
- $my_perms = $x['perms_follow'];
- }
}
}
@@ -198,6 +192,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
}
if($is_http) {
+
if(! intval(get_config('system','feed_contacts'))) {
$result['message'] = t('Protocol disabled.');
return $result;
diff --git a/include/oembed.php b/include/oembed.php
index e08b287d1..38c433e99 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -21,7 +21,7 @@ function oembed_fetch_url($embedurl){
// These media files should now be caught in bbcode.php
// left here as a fallback in case this is called from another source
- $noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm");
+ $noexts = array("mp3","mp4","ogg","ogv","oga","ogm","webm","opus");
$ext = pathinfo(strtolower($embedurl),PATHINFO_EXTENSION);
diff --git a/include/photos.php b/include/photos.php
index 2e5e22968..ee94bac60 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -251,19 +251,24 @@ function photo_upload($channel, $observer, $args) {
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $arr['mid'];
- if ($width_x_height)
- $tag = '[zmg=' . $width_x_height. ']';
- else
- $tag = '[zmg]';
+ // We should also put a width_x_height on large photos. Left as an exercise for
+ // devs looking fo simple stuff to fix.
- $preferred = intval(get_pconfig($channel['channel_id'],'system','post_photores'));
- if($preferred == 1) {
+ $larger = feature_enabled($channel['channel_id'],'large_photos');
+ if($larger) {
$tag = '[zmg]';
if($r2)
$smallest = 1;
else
$smallest = 0;
}
+ else {
+ if ($width_x_height)
+ $tag = '[zmg=' . $width_x_height. ']';
+ else
+ $tag = '[zmg]';
+ }
+
$arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']'
. $tag . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]'
diff --git a/include/socgraph.php b/include/socgraph.php
index 15ef480f6..5aa72f0be 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -119,7 +119,7 @@ function poco_load($xchan = '',$url = null) {
$name = $entry['displayName'];
$hash = $entry['hash'];
- $rating = ((array_key_exists('rating',$entry)) ? intval($entry['rating']) : 0);
+ $rating = ((array_key_exists('rating',$entry) && (! is_array($entry['rating']))) ? intval($entry['rating']) : 0);
$rating_text = ((array_key_exists('rating_text',$entry)) ? escape_tags($entry['rating_text']) :'');
if(x($entry,'urls') && is_array($entry['urls'])) {