diff --git a/images/bug-x.gif b/images/bug-x.gif new file mode 100644 index 000000000..10936caa7 Binary files /dev/null and b/images/bug-x.gif differ diff --git a/include/items.php b/include/items.php index 3c55fbb4f..fdff6b642 100755 --- a/include/items.php +++ b/include/items.php @@ -1595,6 +1595,14 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) if((activity_match($datarray['verb'],ACTIVITY_LIKE)) || (activity_match($datarray['verb'],ACTIVITY_DISLIKE))) { $datarray['type'] = 'activity'; $datarray['gravity'] = GRAVITY_LIKE; + // only one like or dislike per person + $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1", + intval($datarray['uid']), + intval($datarray['contact-id']), + dbesc($datarray['verb']) + ); + if($r && count($r)) + continue; } if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) { @@ -2148,6 +2156,14 @@ function local_delivery($importer,$data) { $datarray['type'] = 'activity'; $datarray['gravity'] = GRAVITY_LIKE; $datarray['last-child'] = 0; + // only one like or dislike per person + $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1", + intval($datarray['uid']), + intval($datarray['contact-id']), + dbesc($datarray['verb']) + ); + if($r && count($r)) + continue; } if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) { @@ -2297,6 +2313,15 @@ function local_delivery($importer,$data) { if(($datarray['verb'] == ACTIVITY_LIKE) || ($datarray['verb'] == ACTIVITY_DISLIKE)) { $datarray['type'] = 'activity'; $datarray['gravity'] = GRAVITY_LIKE; + // only one like or dislike per person + $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1", + intval($datarray['uid']), + intval($datarray['contact-id']), + dbesc($datarray['verb']) + ); + if($r && count($r)) + continue; + } if(($datarray['verb'] === ACTIVITY_TAG) && ($datarray['object-type'] === ACTIVITY_OBJ_TAGTERM)) { diff --git a/include/text.php b/include/text.php index 042ee982c..c8c03174e 100755 --- a/include/text.php +++ b/include/text.php @@ -737,7 +737,7 @@ function smilies($s, $sample = false) { ':headdesk', '~friendika', '~friendica', - 'Diaspora*' +// 'Diaspora*' ); $icons = array( @@ -778,7 +778,7 @@ function smilies($s, $sample = false) { ':headdesk', '~friendika ~friendika', '~friendica ~friendica', - 'DiasporaDiaspora*', +// 'DiasporaDiaspora*', ); diff --git a/library/spam/b8/storage/storage_frndc.php b/library/spam/b8/storage/storage_frndc.php index 7702c108b..62909d471 100644 --- a/library/spam/b8/storage/storage_frndc.php +++ b/library/spam/b8/storage/storage_frndc.php @@ -174,20 +174,44 @@ class b8_storage_frndc extends b8_storage_base array_push($where, $token); } - $where = 'token IN ("' . implode('", "', $where) . '")'; + $where = 'term IN ("' . implode('", "', $where) . '")'; } else { $token = dbesc($token); - $where = 'token = "' . $token . '"'; + $where = 'term = "' . $token . '"'; } # ... and fetch the data $result = q(' - SELECT * - FROM ' . $this->config['table_name'] . ' - WHERE ' . $where . ' AND uid = ' . $uid ); + SELECT * FROM spam WHERE ' . $where . ' AND uid = ' . $uid ); + + + $returned_tokens = array(); + if(count($result)) { + foreach($result as $rr) + $returned_tokens[] = $rr['term']; + } + $to_create = array(); + + if(count($tokens) > 0) { + foreach($tokens as $token) + if(! in_array($token,$returned_tokens)) + $to_create[] = str_tolower($token); + } + if(count($to_create)) { + $sql = ''; + foreach($to_create as $term) { + if(strlen($sql)) + $sql .= ','; + $sql .= sprintf("(term,datetime,uid) values('%s','%s',%d)", + dbesc(str_tolower($term)) + dbesc(datetime_convert()), + intval($uid) + ); + q("insert into spam " . $sql); + } return $result; diff --git a/view/theme/diabook/icons/bug-x.gif b/view/theme/diabook/icons/bug-x.gif new file mode 100644 index 000000000..10936caa7 Binary files /dev/null and b/view/theme/diabook/icons/bug-x.gif differ diff --git a/view/theme/diabook/icons/community.png b/view/theme/diabook/icons/community.png new file mode 100644 index 000000000..7c91e8b75 Binary files /dev/null and b/view/theme/diabook/icons/community.png differ diff --git a/view/theme/diabook/icons/dislike.png b/view/theme/diabook/icons/dislike.png index fcf340258..23de426c5 100644 Binary files a/view/theme/diabook/icons/dislike.png and b/view/theme/diabook/icons/dislike.png differ diff --git a/view/theme/diabook/icons/globe.png b/view/theme/diabook/icons/globe.png old mode 100755 new mode 100644 index bf27a8f3f..6bb9bc09d Binary files a/view/theme/diabook/icons/globe.png and b/view/theme/diabook/icons/globe.png differ diff --git a/view/theme/diabook/icons/language.png b/view/theme/diabook/icons/language.png new file mode 100644 index 000000000..8029c0155 Binary files /dev/null and b/view/theme/diabook/icons/language.png differ diff --git a/view/theme/diabook/icons/like.png b/view/theme/diabook/icons/like.png index c9543afd5..b65edccc0 100644 Binary files a/view/theme/diabook/icons/like.png and b/view/theme/diabook/icons/like.png differ diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index 34a37ad2e..1f2f64f6a 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -1,6 +1,7 @@
- {# $langselector version 0.01#} - + + +
$sitelocation
@@ -53,7 +54,15 @@
  • $emptynotifications
  • - {{ endif }} + {{ endif }} + + {{ if $nav.search}} + + {{ endif }}