updates
authorfriendica <info@friendica.com>
Thu, 9 May 2013 08:18:03 +0000 (01:18 -0700)
committerfriendica <info@friendica.com>
Thu, 9 May 2013 08:18:03 +0000 (01:18 -0700)
blockem.tgz
blockem/blockem.php
superblock.tgz
superblock/superblock.php

index 390102e..396e974 100755 (executable)
Binary files a/blockem.tgz and b/blockem.tgz differ
index 85c7fec..f096257 100755 (executable)
@@ -16,6 +16,7 @@ function blockem_install() {
        register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
        register_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
        register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
+       register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
 }
 
 
@@ -26,6 +27,7 @@ function blockem_uninstall() {
        unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
        unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
        unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
+       unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
 
 }
 
@@ -71,6 +73,35 @@ function blockem_addon_settings_post(&$a,&$b) {
        }
 }
 
+
+function blockem_enotify_store(&$a,&$b) {
+
+       $words = get_pconfig($b['uid'],'blockem','words');
+       if($words) {
+               $arr = explode(',',$words);
+       }
+       else {
+               return;
+       }
+
+       $found = false;
+       if(count($arr)) {
+               foreach($arr as $word) {
+                       if(! strlen(trim($word))) {
+                               continue;
+                       }
+
+                       if(link_compare($b['url'],$word)) {
+                               $found = true;
+                               break;
+                       }
+               }
+       }
+       if($found) {
+               $b['abort'] = true;
+       }
+}
+
 function blockem_prepare_body(&$a,&$b) {
 
        if(! local_user())
index 7d9523c..ba5849f 100644 (file)
Binary files a/superblock.tgz and b/superblock.tgz differ
index 420db76..7363c13 100755 (executable)
@@ -15,6 +15,8 @@ function superblock_install() {
        register_hook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
        register_hook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
        register_hook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
+       register_hook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
+
 }
 
 
@@ -24,6 +26,7 @@ function superblock_uninstall() {
        unregister_hook('plugin_settings_post', 'addon/superblock/superblock.php', 'superblock_addon_settings_post');
        unregister_hook('conversation_start', 'addon/superblock/superblock.php', 'superblock_conversation_start');
        unregister_hook('item_photo_menu', 'addon/superblock/superblock.php', 'superblock_item_photo_menu');
+       unregister_hook('enotify_store', 'addon/superblock/superblock.php', 'superblock_enotify_store');
 
 }
 
@@ -69,6 +72,35 @@ function superblock_addon_settings_post(&$a,&$b) {
        }
 }
 
+function superblock_enotify_store(&$a,&$b) {
+
+       $words = get_pconfig($b['uid'],'system','blocked');
+       if($words) {
+               $arr = explode(',',$words);
+       }
+       else {
+               return;
+       }
+
+       $found = false;
+       if(count($arr)) {
+               foreach($arr as $word) {
+                       if(! strlen(trim($word))) {
+                               continue;
+                       }
+
+                       if(link_compare($b['url'],$word)) {
+                               $found = true;
+                               break;
+                       }
+               }
+       }
+       if($found) {
+               $b['abort'] = true;
+       }
+}
+
+
 function superblock_conversation_start(&$a,&$b) {
 
        if(! local_user())