]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
don't allow blocked/unverified users to reset their password.
[friendica.git] / mod / item.php
index e8714f955ffa2a4225d4205952ff2769cd268ad7..f87b6074a8e736d2616f3890cf0a1e71a7a58d8d 100644 (file)
@@ -61,6 +61,7 @@ function item_post(&$a) {
 
        $profile_uid = ((x($_POST,'profile_uid')) ? intval($_POST['profile_uid']) : 0);
        $post_id     = ((x($_POST['post_id']))    ? intval($_POST['post_id'])     : 0);
+       $app         = ((x($_POST['source']))     ? strip_tags($_POST['source'])  : '');
 
        if(! can_write_wall($a,$profile_uid)) {
                notice( t('Permission denied.') . EOL) ;
@@ -102,6 +103,7 @@ function item_post(&$a) {
                $coord             = $orig_post['coord'];
                $verb              = $orig_post['verb'];
                $emailcc           = $orig_post['emailcc'];
+               $app                       = $orig_post['app'];
 
                $body              = escape_tags(trim($_POST['body']));
                $private           = $orig_post['private'];
@@ -417,10 +419,12 @@ function item_post(&$a) {
        $datarray['author-avatar'] = $author['thumb'];
        $datarray['created']       = datetime_convert();
        $datarray['edited']        = datetime_convert();
+       $datarray['received']      = datetime_convert();
        $datarray['changed']       = datetime_convert();
        $datarray['uri']           = $uri;
        $datarray['title']         = $title;
        $datarray['body']          = $body;
+       $datarray['app']           = $app;
        $datarray['location']      = $location;
        $datarray['coord']         = $coord;
        $datarray['tag']           = $str_tags;
@@ -442,6 +446,7 @@ function item_post(&$a) {
 
        $datarray['parent']        = $parent;
        $datarray['self']          = $self;
+       $datarray['prvnets']       = $user['prvnets'];
 
        if($orig_post)
                $datarray['edit']      = true;
@@ -469,9 +474,9 @@ function item_post(&$a) {
 
 
        $r = q("INSERT INTO `item` (`uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, 
-               `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `changed`, `uri`, `title`, `body`, `location`, `coord`, 
+               `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `received`, `changed`, `uri`, `title`, `body`, `app`, `location`, `coord`, 
                `tag`, `inform`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach` )
-               VALUES( %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s' )",
+               VALUES( %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s' )",
                intval($datarray['uid']),
                dbesc($datarray['type']),
                intval($datarray['wall']),
@@ -485,10 +490,12 @@ function item_post(&$a) {
                dbesc($datarray['author-avatar']),
                dbesc($datarray['created']),
                dbesc($datarray['edited']),
+               dbesc($datarray['received']),
                dbesc($datarray['changed']),
                dbesc($datarray['uri']),
                dbesc($datarray['title']),
                dbesc($datarray['body']),
+               dbesc($datarray['app']),
                dbesc($datarray['location']),
                dbesc($datarray['coord']),
                dbesc($datarray['tag']),