aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-22 16:17:10 -0700
committerfriendica <info@friendica.com>2012-03-22 16:17:10 -0700
commit528d795fb68a8ae53cb7b9ad8479aeaa2b1f975f (patch)
treeb3a778af971ba29592c412c640112123e78e41d6 /mod/item.php
parent622b25df5f2d1ab21c9e23047bc0c98bfe72bad0 (diff)
downloadvolse-hubzilla-528d795fb68a8ae53cb7b9ad8479aeaa2b1f975f.tar.gz
volse-hubzilla-528d795fb68a8ae53cb7b9ad8479aeaa2b1f975f.tar.bz2
volse-hubzilla-528d795fb68a8ae53cb7b9ad8479aeaa2b1f975f.zip
ability to change tags in edited posts
Diffstat (limited to 'mod/item.php')
-rwxr-xr-xmod/item.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/mod/item.php b/mod/item.php
index ee6c5c9a7..fc1c5fd0f 100755
--- a/mod/item.php
+++ b/mod/item.php
@@ -177,10 +177,11 @@ function item_post(&$a) {
$verb = $orig_post['verb'];
$emailcc = $orig_post['emailcc'];
$app = $orig_post['app'];
-
+ $categories = $orig_post['file'];
$body = escape_tags(trim($_REQUEST['body']));
$private = $orig_post['private'];
$pubmail_enable = $orig_post['pubmail'];
+
}
else {
@@ -213,8 +214,10 @@ function item_post(&$a) {
$coord = notags(trim($_REQUEST['coord']));
$verb = notags(trim($_REQUEST['verb']));
$emailcc = notags(trim($_REQUEST['emailcc']));
-
$body = escape_tags(trim($_REQUEST['body']));
+
+ // $categories = TODO
+
$private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0);
if(($parent_item) &&
@@ -242,8 +245,6 @@ function item_post(&$a) {
}
}
-
-
if(! strlen($body)) {
if($preview)
killme();
@@ -500,6 +501,7 @@ function item_post(&$a) {
$datarray['location'] = $location;
$datarray['coord'] = $coord;
$datarray['tag'] = $str_tags;
+ $datarray['file'] = $categories;
$datarray['inform'] = $inform;
$datarray['verb'] = $verb;
$datarray['allow_cid'] = $str_contact_allow;
@@ -559,9 +561,12 @@ function item_post(&$a) {
if($orig_post) {
- $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
- dbesc($title),
- dbesc($body),
+ $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `attach` = '%s', `file` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ dbesc($datarray['title']),
+ dbesc($datarray['body']),
+ dbesc($datarray['tag']),
+ dbesc($datarray['attach']),
+ dbesc($datarray['file']),
dbesc(datetime_convert()),
intval($post_id),
intval($profile_uid)