aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-23 15:21:50 -0800
committerzotlabs <mike@macgirvin.com>2017-11-23 15:21:50 -0800
commita99ebd42ec47ea531496f8ca5c07bf2868e21467 (patch)
treeec417053a87c0e501cb93c70c8ad3adc07abd8b2 /Zotlabs
parent0cfe2ecd7bd77e2208e444350804682652686acc (diff)
downloadvolse-hubzilla-a99ebd42ec47ea531496f8ca5c07bf2868e21467.tar.gz
volse-hubzilla-a99ebd42ec47ea531496f8ca5c07bf2868e21467.tar.bz2
volse-hubzilla-a99ebd42ec47ea531496f8ca5c07bf2868e21467.zip
change to bbcode calling parameters: important: will require pulling addons;
also some extra checking of server headers in upload functions
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/File_upload.php16
-rw-r--r--Zotlabs/Module/Wall_attach.php10
2 files changed, 16 insertions, 10 deletions
diff --git a/Zotlabs/Module/File_upload.php b/Zotlabs/Module/File_upload.php
index e99118417..296dab708 100644
--- a/Zotlabs/Module/File_upload.php
+++ b/Zotlabs/Module/File_upload.php
@@ -30,8 +30,8 @@ class File_upload extends \Zotlabs\Web\Controller {
$_REQUEST['allow_cid'] = perms2str($_REQUEST['contact_allow']);
$_REQUEST['allow_gid'] = perms2str($_REQUEST['group_allow']);
- $_REQUEST['deny_cid'] = perms2str($_REQUEST['contact_deny']);
- $_REQUEST['deny_gid'] = perms2str($_REQUEST['group_deny']);
+ $_REQUEST['deny_cid'] = perms2str($_REQUEST['contact_deny']);
+ $_REQUEST['deny_gid'] = perms2str($_REQUEST['group_deny']);
if($_REQUEST['filename']) {
$r = attach_mkdir($channel, get_observer_hash(), $_REQUEST);
@@ -51,10 +51,14 @@ class File_upload extends \Zotlabs\Web\Controller {
$matches = [];
$partial = false;
- $x = preg_match('/bytes (\d*)\-(\d*)\/(\d*)/',$_SERVER['HTTP_CONTENT_RANGE'],$matches);
- if($x) {
- // logger('Content-Range: ' . print_r($matches,true));
- $partial = true;
+
+
+ if(array_key_exists('HTTP_CONTENT_RANGE',$_SERVER)) {
+ $pm = preg_match('/bytes (\d*)\-(\d*)\/(\d*)/',$_SERVER['HTTP_CONTENT_RANGE'],$matches);
+ if($pm) {
+ // logger('Content-Range: ' . print_r($matches,true));
+ $partial = true;
+ }
}
if($partial) {
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php
index e001ad929..2250e6e44 100644
--- a/Zotlabs/Module/Wall_attach.php
+++ b/Zotlabs/Module/Wall_attach.php
@@ -41,10 +41,12 @@ class Wall_attach extends \Zotlabs\Web\Controller {
$matches = [];
$partial = false;
- $x = preg_match('/bytes (\d*)\-(\d*)\/(\d*)/',$_SERVER['HTTP_CONTENT_RANGE'],$matches);
- if($x) {
- // logger('Content-Range: ' . print_r($matches,true));
- $partial = true;
+ if(array_key_exists('HTTP_CONTENT_RANGE',$_SERVER)) {
+ $pm = preg_match('/bytes (\d*)\-(\d*)\/(\d*)/',$_SERVER['HTTP_CONTENT_RANGE'],$matches);
+ if($pm) {
+ // logger('Content-Range: ' . print_r($matches,true));
+ $partial = true;
+ }
}
if($partial) {