diff --git a/boot.php b/boot.php index 139564ec55..3a9e8c3e72 100644 --- 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; diff --git a/include/diaspora.php b/include/diaspora.php index 0b0790f022..3673b1fc2e 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -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); diff --git a/mod/settings.php b/mod/settings.php index c86ca69bb9..2519928b6d 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -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, diff --git a/view/templates/settings_display.tpl b/view/templates/settings_display.tpl index 5da575049f..a135842cf3 100644 --- a/view/templates/settings_display.tpl +++ b/view/templates/settings_display.tpl @@ -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}} diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 57eb6725bf..5e8d97418c 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -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 {