more work on the mid/uuid conversion
This commit is contained in:
parent
5162459e4a
commit
e42a401987
@ -2,6 +2,16 @@
|
|||||||
|
|
||||||
namespace Zotlabs\Module;
|
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
|
* 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');
|
|
||||||
|
|
||||||
|
class Item extends Controller {
|
||||||
use \Zotlabs\Lib as Zlib;
|
|
||||||
|
|
||||||
class Item extends \Zotlabs\Web\Controller {
|
|
||||||
|
|
||||||
function post() {
|
function post() {
|
||||||
|
|
||||||
@ -911,12 +913,12 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
$datarray['title'] = mb_substr($datarray['title'],0,191);
|
$datarray['title'] = mb_substr($datarray['title'],0,191);
|
||||||
|
|
||||||
if($webpage) {
|
if($webpage) {
|
||||||
Zlib\IConfig::Set($datarray,'system', webpage_to_namespace($webpage),
|
IConfig::Set($datarray,'system', webpage_to_namespace($webpage),
|
||||||
(($pagetitle) ? $pagetitle : substr($datarray['mid'],0,16)),true);
|
(($pagetitle) ? $pagetitle : basename($datarray['mid'])), true);
|
||||||
}
|
}
|
||||||
elseif($namespace) {
|
elseif($namespace) {
|
||||||
Zlib\IConfig::Set($datarray,'system', $namespace,
|
IConfig::Set($datarray,'system', $namespace,
|
||||||
(($remote_id) ? $remote_id : substr($datarray['mid'],0,16)),true);
|
(($remote_id) ? $remote_id : basename($datarray['mid'])), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -948,7 +950,7 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(! $nopush)
|
if(! $nopush)
|
||||||
\Zotlabs\Daemon\Master::Summon(array('Notifier', 'edit_post', $post_id));
|
Master::Summon([ 'Notifier', 'edit_post', $post_id ]);
|
||||||
|
|
||||||
|
|
||||||
if($api_source)
|
if($api_source)
|
||||||
@ -983,7 +985,7 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
// otherwise it will happen during delivery
|
// otherwise it will happen during delivery
|
||||||
|
|
||||||
if(($datarray['owner_xchan'] != $datarray['author_xchan']) && (intval($parent_item['item_wall']))) {
|
if(($datarray['owner_xchan'] != $datarray['author_xchan']) && (intval($parent_item['item_wall']))) {
|
||||||
Zlib\Enotify::submit(array(
|
Enotify::submit(array(
|
||||||
'type' => NOTIFY_COMMENT,
|
'type' => NOTIFY_COMMENT,
|
||||||
'from_xchan' => $datarray['author_xchan'],
|
'from_xchan' => $datarray['author_xchan'],
|
||||||
'to_xchan' => $datarray['owner_xchan'],
|
'to_xchan' => $datarray['owner_xchan'],
|
||||||
@ -1001,7 +1003,7 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
$parent = $post_id;
|
$parent = $post_id;
|
||||||
|
|
||||||
if(($datarray['owner_xchan'] != $datarray['author_xchan']) && ($datarray['item_type'] == ITEM_TYPE_POST)) {
|
if(($datarray['owner_xchan'] != $datarray['author_xchan']) && ($datarray['item_type'] == ITEM_TYPE_POST)) {
|
||||||
Zlib\Enotify::submit(array(
|
Enotify::submit(array(
|
||||||
'type' => NOTIFY_WALL,
|
'type' => NOTIFY_WALL,
|
||||||
'from_xchan' => $datarray['author_xchan'],
|
'from_xchan' => $datarray['author_xchan'],
|
||||||
'to_xchan' => $datarray['owner_xchan'],
|
'to_xchan' => $datarray['owner_xchan'],
|
||||||
@ -1063,7 +1065,7 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
call_hooks('post_local_end', $datarray);
|
call_hooks('post_local_end', $datarray);
|
||||||
|
|
||||||
if(! $nopush)
|
if(! $nopush)
|
||||||
\Zotlabs\Daemon\Master::Summon(array('Notifier', $notify_type, $post_id));
|
Master::Summon([ 'Notifier', $notify_type, $post_id ]);
|
||||||
|
|
||||||
logger('post_complete');
|
logger('post_complete');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user