aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Filestorage.php10
-rw-r--r--Zotlabs/Module/Sharedwithme.php5
-rwxr-xr-xboot.php2
-rw-r--r--include/attach.php23
-rw-r--r--install/schema_mysql.sql1
-rw-r--r--install/schema_postgres.sql1
-rw-r--r--install/update.php14
7 files changed, 25 insertions, 31 deletions
diff --git a/Zotlabs/Module/Filestorage.php b/Zotlabs/Module/Filestorage.php
index 0b83dea34..55713027a 100644
--- a/Zotlabs/Module/Filestorage.php
+++ b/Zotlabs/Module/Filestorage.php
@@ -5,14 +5,6 @@ namespace Zotlabs\Module;
*
*/
-require_once('include/attach.php');
-
-
-/**
- *
- * @param object &$a
- */
-
class Filestorage extends \Zotlabs\Web\Controller {
function post() {
@@ -36,7 +28,7 @@ class Filestorage extends \Zotlabs\Web\Controller {
$channel = \App::get_channel();
$acl = new \Zotlabs\Access\AccessList($channel);
- $acl->set_from_array($_REQUEST);
+ $acl->set_from_array($_POST);
$x = $acl->get();
$url = get_cloud_url($channel_id, $channel['channel_address'], $resource);
diff --git a/Zotlabs/Module/Sharedwithme.php b/Zotlabs/Module/Sharedwithme.php
index 5d6d0f7da..2c97e9726 100644
--- a/Zotlabs/Module/Sharedwithme.php
+++ b/Zotlabs/Module/Sharedwithme.php
@@ -4,6 +4,11 @@ require_once('include/conversation.php');
require_once('include/text.php');
+/**
+ * @file Zotlabs/Module/Sharedwithme.php
+ *
+ */
+
class Sharedwithme extends \Zotlabs\Web\Controller {
function get() {
diff --git a/boot.php b/boot.php
index 69b4db269..5b8c3006d 100755
--- a/boot.php
+++ b/boot.php
@@ -52,7 +52,7 @@ define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '2.7.0' );
define ( 'ZOT_REVISION', '1.3' );
-define ( 'DB_UPDATE_VERSION', 1192 );
+define ( 'DB_UPDATE_VERSION', 1193 );
define ( 'PROJECT_BASE', __DIR__ );
diff --git a/include/attach.php b/include/attach.php
index 75235d7e1..d19de2ea3 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1684,17 +1684,9 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
$arr['obj'] = $u_jsonobject;
$arr['body'] = '';
- $post = item_store($arr);
- $item_id = $post['item_id'];
- if($item_id) {
- Zotlabs\Daemon\Master::Summon(array('Notifier','activity',$item_id));
- }
-
- call_hooks('post_local_end', $arr);
+ post_activity_item($arr);
$update = false;
-
- //notice( t('File activity updated') . EOL);
}
//don't create new activity if notify was not enabled
@@ -1719,16 +1711,7 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
$arr['obj'] = (($update) ? $u_jsonobject : $jsonobject);
$arr['body'] = '';
- $post = item_store($arr);
- $item_id = $post['item_id'];
-
- if($item_id) {
- Zotlabs\Daemon\Master::Summon(array('Notifier','activity',$item_id));
- }
-
- call_hooks('post_local_end', $arr);
-
- //(($verb === 'post') ? notice( t('File activity posted') . EOL) : notice( t('File activity dropped') . EOL));
+ post_activity_item($arr);
return;
}
@@ -1894,7 +1877,7 @@ function recursive_activity_recipients($arr_allow_cid, $arr_allow_gid, $arr_deny
//if none is allowed restrict to self
if(($r_arr_allow_gid === false) && ($r_arr_allow_cid === false)) {
- $ret['allow_cid'] = $poster['xchan_hash'];
+ $ret['allow_cid'] = [$poster['xchan_hash']];
} else {
$ret['allow_gid'] = $r_arr_allow_gid;
$ret['allow_cid'] = $r_arr_allow_cid;
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 4430e9f10..9e2e401b5 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -660,6 +660,7 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `item_flags` (`item_flags`),
KEY `commented` (`commented`),
KEY `verb` (`verb`),
+ KEY `obj_type` (`obj_type`),
KEY `item_private` (`item_private`),
KEY `llink` (`llink`),
KEY `expires` (`expires`),
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index f3cead9b7..0bc783692 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -631,6 +631,7 @@ create index "item_restrict" on item ("item_restrict");
create index "item_flags" on item ("item_flags");
create index "item_commented" on item ("commented");
create index "item_verb" on item ("verb");
+create index "item_obj_type" on item ("obj_type");
create index "item_private" on item ("item_private");
create index "item_llink" on item ("llink");
create index "item_expires" on item ("expires");
diff --git a/install/update.php b/install/update.php
index ac560f4db..8798a3d69 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1192 );
+define( 'UPDATE_VERSION' , 1193 );
/**
*
@@ -2963,6 +2963,18 @@ function update_r1191() {
return UPDATE_FAILED;
}
}
+}
+function update_r1192() {
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ $r1 = q("CREATE INDEX item_obj_type ON item (obj_type)");
+ }
+ else {
+ $r1 = q("ALTER TABLE item ADD INDEX (obj_type)");
+ }
+
+ if($r1)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
}