diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 6b9e249b8..f5f584600 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1082,15 +1082,15 @@ class Activity { $ret['id'] = $i['mid']; - $token = IConfig::get($i,'ocap','relay'); - if ($token) { - if (defined('USE_BEARCAPS')) { - $ret['id'] = 'bear:?u=' . $ret['id'] . '&t=' . $token; - } - else { - $ret['id'] = $ret['id'] . '?token=' . $token; - } - } +// $token = IConfig::get($i,'ocap','relay'); +// if ($token) { +// if (defined('USE_BEARCAPS')) { +// $ret['id'] = 'bear:?u=' . $ret['id'] . '&t=' . $token; +// } +// else { +// $ret['id'] = $ret['id'] . '?token=' . $token; +// } +// } $ret['published'] = datetime_convert('UTC','UTC',$i['created'],ATOM_TIME); if ($i['created'] !== $i['edited']) { diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 667e77f18..05ccb578e 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -1440,9 +1440,14 @@ class Item extends Controller { echo json_encode(array('preview' => $o)); killme(); } - if($orig_post) + + // Let 'post_local' event listeners know if this is an edit. + // We will unset it immediately afterward. + + if ($orig_post) { $datarray['edit'] = true; - + } + // suppress duplicates, *unless* you're editing an existing post. This could get picked up // as a duplicate if you're editing it very soon after posting it initially and you edited // some attribute besides the content, such as title or categories. @@ -1464,17 +1469,21 @@ class Item extends Controller { } call_hooks('post_local',$datarray); - - if(x($datarray,'cancel')) { + + // This is no longer needed + unset($datarray['edit']); + + if (x($datarray,'cancel')) { logger('mod_item: post cancelled by plugin or duplicate suppressed.'); - if($return_path) + if ($return_path) { goaway(z_root() . "/" . $return_path); - if($api_source) - return ( [ 'success' => false, 'message' => 'operation cancelled' ] ); + } + if ($api_source) { + return ( [ 'success' => false, 'message' => 'operation cancelled' ] ); + } $json = array('cancel' => 1); $json['reload'] = z_root() . '/' . $_REQUEST['jsreload']; - echo json_encode($json); - killme(); + json_return_and_die($json); } diff --git a/boot.php b/boot.php index 46b68ea9a..1e0d65294 100755 --- a/boot.php +++ b/boot.php @@ -17,7 +17,7 @@ use Zotlabs\Daemon\Run; * @brief This file defines some global constants and includes the central App class. */ -define ( 'STD_VERSION', '21.06.26' ); +define ( 'STD_VERSION', '21.07.02' ); define ( 'ZOT_REVISION', '10.0' ); define ( 'DB_UPDATE_VERSION', 1248 );