aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_request.php4
-rw-r--r--mod/item.php53
-rw-r--r--mod/settings.php2
3 files changed, 39 insertions, 20 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index cec2d7f8b..eabde30b9 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -827,7 +827,7 @@ function dfrn_request_content(&$a) {
$o .= replace_macros($tpl,array(
'$header' => t('Friend/Connection Request'),
- '$desc' => t('Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca'),
+ '$desc' => t('Examples: jojo@zothub.com, bob@example.com'),
'$pls_answer' => t('Please answer the following:'),
'$does_know' => sprintf( t('Does %s know you?'),$a->profile['name']),
'$yes' => t('Yes'),
@@ -838,7 +838,7 @@ function dfrn_request_content(&$a) {
'$statusnet' => t('StatusNet/Federated Social Web'),
'$diaspora' => t('Diaspora'),
'$diasnote' => sprintf (t(' - please do not use this form. Instead, enter %s into your Diaspora search bar.'),$target_addr),
- '$your_address' => t('Your Identity Address:'),
+ '$your_address' => t('Your webbie (web-id):'),
'$invite_desc' => $invite_desc,
'$emailnet' => $emailnet,
'$submit' => t('Submit Request'),
diff --git a/mod/item.php b/mod/item.php
index 2236fd536..7dd4eff76 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -44,6 +44,7 @@ function item_post(&$a) {
$api_source = ((x($_REQUEST,'api_source') && $_REQUEST['api_source']) ? true : false);
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
$preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0);
+ $categories = ((x($_REQUEST['category'])) ? escape_tags($_REQUEST['category']) : '');
/**
* Is this a reply to something?
@@ -176,7 +177,7 @@ function item_post(&$a) {
$verb = $orig_post['verb'];
$emailcc = $orig_post['emailcc'];
$app = $orig_post['app'];
- $categories = $orig_post['file'];
+// $categories = $orig_post['file'];
$title = escape_tags(trim($_REQUEST['title']));
$body = escape_tags(trim($_REQUEST['body']));
$private = $orig_post['private'];
@@ -262,18 +263,6 @@ function item_post(&$a) {
}
}
- if(strlen($categories)) {
- // get the "fileas" tags for this post
- $filedas = file_tag_file_to_list($categories, 'file');
- }
- // save old and new categories, so we can determine what needs to be deleted from pconfig
- $categories_old = $categories;
- $categories = file_tag_list_to_file(trim($_REQUEST['category']), 'category');
- $categories_new = $categories;
- if(strlen($filedas)) {
- // append the fileas stuff to the new categories list
- $categories .= file_tag_list_to_file($filedas, 'file');
- }
// Work around doubled linefeeds in Tinymce 3.5b2
// First figure out if it's a status post that would've been
@@ -465,12 +454,14 @@ function item_post(&$a) {
continue;
$success = handle_tag($a, $body, $inform, $str_tags, (local_user()) ? local_user() : $profile_uid , $tag);
+ logger('handle_tag: ' . print_r($success,tue));
+
if($success['replaced']) {
$tagged[] = $tag;
$post_tags[] = array(
'uid' => $profile_uid,
'type' => $success['termtype'],
- 'otype' => TAG_OBJ_POST,
+ 'otype' => TERM_OBJ_POST,
'term' => substr($tag,1),
'url' => $success['url']
);
@@ -482,6 +473,21 @@ function item_post(&$a) {
}
}
+ if(strlen($categories)) {
+ $cats = explode(',',$categories);
+ foreach($cats as $cat) {
+ $post_tags[] = array(
+ 'uid' => $profile_uid,
+ 'type' => TERM_CATEGORY,
+ 'otype' => TERM_OBJ_POST,
+ 'term' => trim($cat),
+ 'url' => ''
+ );
+ }
+ }
+
+ logger('post_tags: ' . print_r($post_tags,true));
+
if(($private_forum) && (! $parent) && (! $private)) {
// we tagged a private forum in a top level post and the message was public.
// Restrict it.
@@ -684,8 +690,21 @@ function item_post(&$a) {
$post_id = $r[0]['id'];
logger('mod_item: saved item ' . $post_id);
- // update filetags in pconfig
- file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
+
+ if(count($post_tags)) {
+ foreach($post_tags as $tag) {
+ if(strlen(trim($tag['term']))) {
+ q("insert into term (uid,oid,otype,type,term,url) values (%d,%d,%d,%d,'%s','%s')",
+ intval($tag['uid']),
+ intval($post_id),
+ intval($tag['otype']),
+ intval($tag['type']),
+ dbesc(trim($tag['term'])),
+ dbesc(trim($tag['url']))
+ );
+ }
+ }
+ }
if($parent) {
@@ -915,7 +934,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
$str_tags .= ',';
$str_tags .= $newtag;
}
- return $replaced;
+ return array('replaced' => $replaced, 'termtype' => $termtype, 'url' => $url, 'contact' => $r[0]);
}
//is it a person tag?
if(strpos($tag,'@') === 0) {
diff --git a/mod/settings.php b/mod/settings.php
index b1c3cf7d4..9c580f3bc 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -941,7 +941,7 @@ function settings_content(&$a) {
$tpl_addr = get_markup_template("settings_nick_set.tpl");
$prof_addr = replace_macros($tpl_addr,array(
- '$desc' => t('Your Identity Address is'),
+ '$desc' => t('Your webbie (web-id) is'),
'$nickname' => $nickname,
'$subdir' => $subdir,
'$basepath' => $a->get_hostname()