Removed unneeded stuff
This commit is contained in:
parent
eac4bc1960
commit
ec879f3194
20
mod/item.php
20
mod/item.php
@ -13,9 +13,6 @@
|
|||||||
*
|
*
|
||||||
* All of these become an "item" which is our basic unit of
|
* All of these become an "item" which is our basic unit of
|
||||||
* information.
|
* 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\App;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
@ -37,7 +34,6 @@ require_once 'include/text.php';
|
|||||||
require_once 'include/items.php';
|
require_once 'include/items.php';
|
||||||
|
|
||||||
function item_post(App $a) {
|
function item_post(App $a) {
|
||||||
|
|
||||||
if (!local_user() && !remote_user() && !x($_REQUEST, 'commenter')) {
|
if (!local_user() && !remote_user() && !x($_REQUEST, 'commenter')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -132,7 +128,6 @@ function item_post(App $a) {
|
|||||||
$parent = $r[0]['id'];
|
$parent = $r[0]['id'];
|
||||||
|
|
||||||
// multi-level threading - preserve the info but re-parent to our single level threading
|
// multi-level threading - preserve the info but re-parent to our single level threading
|
||||||
//if(($parid) && ($parid != $parent))
|
|
||||||
$thr_parent = $parent_uri;
|
$thr_parent = $parent_uri;
|
||||||
|
|
||||||
if ($parent_item['contact-id'] && $uid) {
|
if ($parent_item['contact-id'] && $uid) {
|
||||||
@ -276,7 +271,7 @@ function item_post(App $a) {
|
|||||||
* been supplied via a form.
|
* been supplied via a form.
|
||||||
*/
|
*/
|
||||||
/// @TODO use x($_REQUEST, 'foo') here
|
/// @TODO use x($_REQUEST, 'foo') here
|
||||||
if (($api_source)
|
if ($api_source
|
||||||
&& !array_key_exists('contact_allow', $_REQUEST)
|
&& !array_key_exists('contact_allow', $_REQUEST)
|
||||||
&& !array_key_exists('group_allow', $_REQUEST)
|
&& !array_key_exists('group_allow', $_REQUEST)
|
||||||
&& !array_key_exists('contact_deny', $_REQUEST)
|
&& !array_key_exists('contact_deny', $_REQUEST)
|
||||||
@ -813,15 +808,6 @@ function item_post(App $a) {
|
|||||||
killme();
|
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) {
|
if ($orig_post) {
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'title' => $datarray['title'],
|
'title' => $datarray['title'],
|
||||||
@ -853,6 +839,10 @@ function item_post(App $a) {
|
|||||||
$post_id = 0;
|
$post_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($datarray['edit']);
|
||||||
|
unset($datarray['self']);
|
||||||
|
unset($datarray['api_source']);
|
||||||
|
|
||||||
$post_id = item_store($datarray);
|
$post_id = item_store($datarray);
|
||||||
|
|
||||||
$datarray["id"] = $post_id;
|
$datarray["id"] = $post_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user