diff options
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Impel.php | 8 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 36 | ||||
-rw-r--r-- | Zotlabs/Module/Like.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Mood.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Nojs.php | 15 | ||||
-rw-r--r-- | Zotlabs/Module/React.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Subthread.php | 6 |
7 files changed, 38 insertions, 41 deletions
diff --git a/Zotlabs/Module/Impel.php b/Zotlabs/Module/Impel.php index 0c372bd96..e05027d9f 100644 --- a/Zotlabs/Module/Impel.php +++ b/Zotlabs/Module/Impel.php @@ -133,9 +133,11 @@ class Impel extends \Zotlabs\Web\Controller { $arr['author_xchan'] = (($j['author_xchan']) ? $j['author_xchan'] : get_observer_hash()); $arr['mimetype'] = (($j['mimetype']) ? $j['mimetype'] : 'text/bbcode'); - if(! $j['mid']) - $j['mid'] = item_message_id(); - + if(! $j['mid']) { + $j['uuid'] = item_message_id(); + $j['mid'] = z_root() . '/item/' . $j['uuid']; + } + $arr['uuid'] = $j['uuid']; $arr['mid'] = $arr['parent_mid'] = $j['mid']; diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 464daa516..1d64ef60c 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -2,6 +2,16 @@ namespace Zotlabs\Module; +use Zotlabs\Lib\IConfig; +use Zotlabs\Lib\Enotify; +use Zotlabs\Web\Controller; +use Zotlabs\Daemon\Master; + +require_once('include/crypto.php'); +require_once('include/items.php'); +require_once('include/security.php'); + + /** * * This is the POST destination for most all locally posted @@ -17,16 +27,8 @@ namespace Zotlabs\Module; * */ -require_once('include/crypto.php'); -require_once('include/items.php'); -require_once('include/attach.php'); -require_once('include/bbcode.php'); -require_once('include/security.php'); - - -use \Zotlabs\Lib as Zlib; -class Item extends \Zotlabs\Web\Controller { +class Item extends Controller { function post() { @@ -911,12 +913,12 @@ class Item extends \Zotlabs\Web\Controller { $datarray['title'] = mb_substr($datarray['title'],0,191); if($webpage) { - Zlib\IConfig::Set($datarray,'system', webpage_to_namespace($webpage), - (($pagetitle) ? $pagetitle : substr($datarray['mid'],0,16)),true); + IConfig::Set($datarray,'system', webpage_to_namespace($webpage), + (($pagetitle) ? $pagetitle : basename($datarray['mid'])), true); } elseif($namespace) { - Zlib\IConfig::Set($datarray,'system', $namespace, - (($remote_id) ? $remote_id : substr($datarray['mid'],0,16)),true); + IConfig::Set($datarray,'system', $namespace, + (($remote_id) ? $remote_id : basename($datarray['mid'])), true); } @@ -948,7 +950,7 @@ class Item extends \Zotlabs\Web\Controller { } } if(! $nopush) - \Zotlabs\Daemon\Master::Summon(array('Notifier', 'edit_post', $post_id)); + Master::Summon([ 'Notifier', 'edit_post', $post_id ]); if($api_source) @@ -983,7 +985,7 @@ class Item extends \Zotlabs\Web\Controller { // otherwise it will happen during delivery if(($datarray['owner_xchan'] != $datarray['author_xchan']) && (intval($parent_item['item_wall']))) { - Zlib\Enotify::submit(array( + Enotify::submit(array( 'type' => NOTIFY_COMMENT, 'from_xchan' => $datarray['author_xchan'], 'to_xchan' => $datarray['owner_xchan'], @@ -1001,7 +1003,7 @@ class Item extends \Zotlabs\Web\Controller { $parent = $post_id; if(($datarray['owner_xchan'] != $datarray['author_xchan']) && ($datarray['item_type'] == ITEM_TYPE_POST)) { - Zlib\Enotify::submit(array( + Enotify::submit(array( 'type' => NOTIFY_WALL, 'from_xchan' => $datarray['author_xchan'], 'to_xchan' => $datarray['owner_xchan'], @@ -1063,7 +1065,7 @@ class Item extends \Zotlabs\Web\Controller { call_hooks('post_local_end', $datarray); if(! $nopush) - \Zotlabs\Daemon\Master::Summon(array('Notifier', $notify_type, $post_id)); + Master::Summon([ 'Notifier', $notify_type, $post_id ]); logger('post_complete'); diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php index 4e216f08b..c39726b88 100644 --- a/Zotlabs/Module/Like.php +++ b/Zotlabs/Module/Like.php @@ -371,10 +371,13 @@ class Like extends \Zotlabs\Web\Controller { } } - $mid = item_message_id(); + $uuid = item_message_id(); $arr = array(); + $arr['uuid'] = $uuid; + $arr['mid'] = z_root() . '/item/' . $uuid; + if($extended_like) { $arr['item_thread_top'] = 1; $arr['item_origin'] = 1; @@ -476,7 +479,6 @@ class Like extends \Zotlabs\Web\Controller { } - $arr['mid'] = $mid; $arr['aid'] = (($extended_like) ? $ch[0]['channel_account_id'] : $owner_aid); $arr['uid'] = $owner_uid; diff --git a/Zotlabs/Module/Mood.php b/Zotlabs/Module/Mood.php index 16ef0b171..453f08f9f 100644 --- a/Zotlabs/Module/Mood.php +++ b/Zotlabs/Module/Mood.php @@ -70,7 +70,8 @@ class Mood extends Controller { $poster = App::get_observer(); - $mid = item_message_id(); + $uuid = item_message_id(); + $mid = z_root() . '/item/' . $uuid; $action = sprintf( t('%1$s is %2$s','mood'), '[zrl=' . $poster['xchan_url'] . ']' . $poster['xchan_name'] . '[/zrl]' , $verbs[$verb]); @@ -78,6 +79,7 @@ class Mood extends Controller { $arr['aid'] = get_account_id(); $arr['uid'] = $uid; + $arr['uuid'] = $uuid; $arr['mid'] = $mid; $arr['parent_mid'] = (($parent_mid) ? $parent_mid : $mid); $arr['author_xchan'] = $poster['xchan_hash']; diff --git a/Zotlabs/Module/Nojs.php b/Zotlabs/Module/Nojs.php deleted file mode 100644 index 5f3d80ecd..000000000 --- a/Zotlabs/Module/Nojs.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -namespace Zotlabs\Module; - - -class Nojs extends \Zotlabs\Web\Controller { - - function init() { - $n = ((argc() > 1) ? intval(argv(1)) : 1); - setcookie('jsdisabled', $n, 0, '/'); - $p = hex2bin($_GET['redir']); - $hasq = strpbrk($p,'?&'); - goaway(z_root() . (($p) ? '/' . $p : '') . (($hasq) ? '' : '?f=' ) . '&jsdisabled=' . $n); - - } -} diff --git a/Zotlabs/Module/React.php b/Zotlabs/Module/React.php index fbb760786..3920301f5 100644 --- a/Zotlabs/Module/React.php +++ b/Zotlabs/Module/React.php @@ -44,6 +44,7 @@ class React extends \Zotlabs\Web\Controller { return; } + $uuid = item_message_id(); $n = array(); $n['aid'] = $channel['channel_account_id']; @@ -52,7 +53,8 @@ class React extends \Zotlabs\Web\Controller { $n['item_type'] = $i[0]['item_type']; $n['parent'] = $postid; $n['parent_mid'] = $i[0]['mid']; - $n['mid'] = item_message_id(); + $n['uuid'] = $uuid; + $n['mid'] = z_root() . '/item/' . $uuid; $n['verb'] = ACTIVITY_REACT . '#' . $emoji; $n['body'] = "\n\n[zmg=32x32]" . z_root() . '/images/emoji/' . $emoji . '.png[/zmg]' . "\n\n"; $n['author_xchan'] = $channel['channel_hash']; diff --git a/Zotlabs/Module/Subthread.php b/Zotlabs/Module/Subthread.php index 1a9caff6c..54343fdfa 100644 --- a/Zotlabs/Module/Subthread.php +++ b/Zotlabs/Module/Subthread.php @@ -106,8 +106,9 @@ class Subthread extends \Zotlabs\Web\Controller { - $mid = item_message_id(); - + $uuid = item_message_id(); + $mid = z_root() . '/item/' . $uuid; + $post_type = (($item['resource_type'] === 'photo') ? t('photo') : t('status')); $links = array(array('rel' => 'alternate','type' => 'text/html', 'href' => $item['plink'])); @@ -145,6 +146,7 @@ class Subthread extends \Zotlabs\Web\Controller { $arr = array(); + $arr['uuid'] = $uuid; $arr['mid'] = $mid; $arr['aid'] = $owner_aid; $arr['uid'] = $owner_uid; |