Removed unneeded stuff
This commit is contained in:
parent
eac4bc1960
commit
ec879f3194
1 changed files with 9 additions and 19 deletions
20
mod/item.php
20
mod/item.php
|
@ -13,9 +13,6 @@
|
|||
*
|
||||
* All of these become an "item" which is our basic unit of
|
||||
* information.
|
||||
*
|
||||
* Posts that originate externally or do not fall into the above
|
||||
* posting categories go through item_store() instead of this function.
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
|
@ -37,7 +34,6 @@ require_once 'include/text.php';
|
|||
require_once 'include/items.php';
|
||||
|
||||
function item_post(App $a) {
|
||||
|
||||
if (!local_user() && !remote_user() && !x($_REQUEST, 'commenter')) {
|
||||
return;
|
||||
}
|
||||
|
@ -132,7 +128,6 @@ function item_post(App $a) {
|
|||
$parent = $r[0]['id'];
|
||||
|
||||
// multi-level threading - preserve the info but re-parent to our single level threading
|
||||
//if(($parid) && ($parid != $parent))
|
||||
$thr_parent = $parent_uri;
|
||||
|
||||
if ($parent_item['contact-id'] && $uid) {
|
||||
|
@ -276,7 +271,7 @@ function item_post(App $a) {
|
|||
* been supplied via a form.
|
||||
*/
|
||||
/// @TODO use x($_REQUEST, 'foo') here
|
||||
if (($api_source)
|
||||
if ($api_source
|
||||
&& !array_key_exists('contact_allow', $_REQUEST)
|
||||
&& !array_key_exists('group_allow', $_REQUEST)
|
||||
&& !array_key_exists('contact_deny', $_REQUEST)
|
||||
|
@ -813,15 +808,6 @@ function item_post(App $a) {
|
|||
killme();
|
||||
}
|
||||
|
||||
// Fill the cache field
|
||||
put_item_in_cache($datarray);
|
||||
|
||||
$datarray = store_conversation($datarray);
|
||||
|
||||
unset($datarray['edit']);
|
||||
unset($datarray['self']);
|
||||
unset($datarray['api_source']);
|
||||
|
||||
if ($orig_post) {
|
||||
$fields = array(
|
||||
'title' => $datarray['title'],
|
||||
|
@ -853,6 +839,10 @@ function item_post(App $a) {
|
|||
$post_id = 0;
|
||||
}
|
||||
|
||||
unset($datarray['edit']);
|
||||
unset($datarray['self']);
|
||||
unset($datarray['api_source']);
|
||||
|
||||
$post_id = item_store($datarray);
|
||||
|
||||
$datarray["id"] = $post_id;
|
||||
|
|
Loading…
Reference in a new issue