]> git.mxchange.org Git - friendica.git/commitdiff
Ther eis now a user setting to disabled notices. The Diaspora reshare now checks...
authorMichael Vogel <icarus@dabo.de>
Sat, 26 Apr 2014 00:22:30 +0000 (02:22 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 26 Apr 2014 00:22:30 +0000 (02:22 +0200)
boot.php
include/diaspora.php
mod/settings.php
view/templates/settings_display.tpl
view/theme/vier/style.css

index 139564ec551b81f3df4279379c1657a30344777e..3a9e8c3e725678f1a82f6c102e479c1e2c05bb38 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1255,6 +1255,10 @@ if(! function_exists('info')) {
         */
        function info($s) {
                $a = get_app();
+
+               if (local_user() AND get_pconfig(local_user(),'system','ignore_info'))
+                       return;
+
                if(! x($_SESSION,'sysmsg_info')) $_SESSION['sysmsg_info'] = array();
                if($a->interactive)
                        $_SESSION['sysmsg_info'][] = $s;
index 0b0790f0224f8e141b56bd6b184fde4f30ba03a8..3673b1fc2e308aada6fcbc949c27c61d91449035 100755 (executable)
@@ -2341,7 +2341,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
 
        $return_code = diaspora_transmit($owner,$contact,$slap,$public_batch);
 
-       logger('diaspora_send_status: guid: '.$item['guid'].' root_guid: '.$ret['root_guid'].' result '.$return_code, LOGGER_DEBUG);
+       logger('diaspora_send_status: guid: '.$item['guid'].' result '.$return_code, LOGGER_DEBUG);
 
        if(count($images)) {
                diaspora_send_images($item,$owner,$contact,$images,$public_batch);
@@ -2379,7 +2379,7 @@ function diaspora_is_reshare($body) {
         $ret= array();
 
         $ret["root_handle"] = preg_replace("=https?://(.*)/u/(.*)=ism", "$2@$1", $profile);
-        if ($ret["root_handle"] == $profile)
+        if (($ret["root_handle"] == $profile) OR ($ret["root_handle"] == ""))
                 return(false);
 
         $link = "";
@@ -2392,7 +2392,7 @@ function diaspora_is_reshare($body) {
                 $link = $matches[1];
 
         $ret["root_guid"] = preg_replace("=https?://(.*)/posts/(.*)=ism", "$2", $link);
-        if ($ret["root_guid"] == $link)
+        if (($ret["root_guid"] == $link) OR ($ret["root_guid"] == ""))
                 return(false);
 
         return($ret);
index c86ca69bb9b738e46ec65cbb3dec95f963077a3e..2519928b6da0a3f79972e97d0dc991796e0ce9af 100644 (file)
@@ -265,6 +265,7 @@ function settings_post(&$a) {
                $theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme']))  : $a->user['theme']);
                $mobile_theme = ((x($_POST,'mobile_theme')) ? notags(trim($_POST['mobile_theme']))  : '');
                $nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile'])  : 0);
+               $noinfo = ((x($_POST,'noinfo')) ? intval($_POST['noinfo'])  : 0);
                $infinite_scroll = ((x($_POST,'infinite_scroll')) ? intval($_POST['infinite_scroll'])  : 0);
                $browser_update   = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
                $browser_update   = $browser_update * 1000;
@@ -287,6 +288,7 @@ function settings_post(&$a) {
                set_pconfig(local_user(),'system','itemspage_network', $itemspage_network);
                set_pconfig(local_user(),'system','itemspage_mobile_network', $itemspage_mobile_network);
                set_pconfig(local_user(),'system','no_smilies',$nosmile);
+               set_pconfig(local_user(),'system','ignore_info',$noinfo);
                set_pconfig(local_user(),'system','infinite_scroll',$infinite_scroll);
 
 
@@ -850,6 +852,9 @@ function settings_content(&$a) {
                $nosmile = get_pconfig(local_user(),'system','no_smilies');
                $nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
 
+               $noinfo = get_pconfig(local_user(),'system','ignore_info');
+               $noinfo = (($noinfo===false)? '0': $noinfo); // default if not set: 0
+
                $infinite_scroll = get_pconfig(local_user(),'system','infinite_scroll');
                $infinite_scroll = (($infinite_scroll===false)? '0': $infinite_scroll); // default if not set: 0
 
@@ -873,6 +878,7 @@ function settings_content(&$a) {
                        '$itemspage_network'   => array('itemspage_network',  t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')),
                        '$itemspage_mobile_network'   => array('itemspage_mobile_network',  t("Number of items to display per page when viewed from mobile device:"), $itemspage_mobile_network, t('Maximum of 100 items')),
                        '$nosmile'      => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
+                       '$noinfo'       => array('noinfo', t("Don't show notices"), $noinfo, ''),
                        '$infinite_scroll'      => array('infinite_scroll', t("Infinite scroll"), $infinite_scroll, ''),
 
                        '$theme_config' => $theme_config,
index 5da575049fa5aaceaa43989bf12a16f88082dd79..a135842cf377eac91c66bbc01b8df25ebc980198 100644 (file)
@@ -14,6 +14,7 @@
 {{include file="field_input.tpl" field=$itemspage_mobile_network}}
 {{include file="field_input.tpl" field=$ajaxint}}
 {{include file="field_checkbox.tpl" field=$nosmile}}
+{{include file="field_checkbox.tpl" field=$noinfo}}
 {{include file="field_checkbox.tpl" field=$infinite_scroll}}
 
 
index 57eb6725bfc1e9735705b95af1c7dc9bfcd0d6a5..5e8d97418c412f2686175ae13444ece2acf06151 100644 (file)
@@ -1425,8 +1425,9 @@ h2 {
   /* width: 700px; */
   width: 100%;
   padding: 0;
-  margin: 10px 0;
+  margin: 10px 0px 0px 0px;
   border-bottom: 0px;
+  box-shadow: none;
 }
 
 .wall-item-bottom .comment-edit-preview {