diff --git a/upload/install/data/install_data.sql b/upload/install/data/install_data.sql index b8c148cb23b49a32600a88fb92fd436be806288d..64301010a7ea08231e5efe945135e59df6340362 100644 --- a/upload/install/data/install_data.sql +++ b/upload/install/data/install_data.sql @@ -559,6 +559,7 @@ INSERT INTO pre_common_setting VALUES ('report_receive', 'a:2:{s:9:"adminuser";a INSERT INTO pre_common_setting VALUES ('leftsideopen', '0'); INSERT INTO pre_common_setting VALUES ('showexif', '0'); INSERT INTO pre_common_setting VALUES ('followretainday', '7'); +INSERT INTO pre_common_setting VALUES ('followaddnotice', '0'); INSERT INTO pre_common_setting VALUES ('newbie', '20'); INSERT INTO pre_common_setting VALUES ('collectionteamworkernum', '3'); INSERT INTO pre_common_setting VALUES ('collectionnum', '10'); diff --git a/upload/source/admincp/admincp_setting.php b/upload/source/admincp/admincp_setting.php index d87b7e6cc00a61530b955e62739b5b977d72c8c1..d3582bb8a3f373843761b2f02cd802c2f40e6ac8 100644 --- a/upload/source/admincp/admincp_setting.php +++ b/upload/source/admincp/admincp_setting.php @@ -221,6 +221,7 @@ if(!submitcheck('settingsubmit')) { /*search={"setting_follow":"action=setting&operation=follow","setting_follow_base":"action=setting&operation=follow&anchor=base"}*/ showtableheader('', 'nobottom', 'id="base"'.($_GET['anchor'] != 'base' ? ' style="display: none"' : '')); showsetting('setting_follow_base_default_follow_retain_day', 'settingnew[followretainday]', $setting['followretainday'], 'text'); + showsetting('setting_follow_base_default_follow_add_notice', 'settingnew[followaddnotice]', $setting['followaddnotice'], 'radio'); showsetting('setting_follow_base_default_view_profile', 'settingnew[allowquickviewprofile]', $setting['allowquickviewprofile'], 'radio'); showtablefooter(); /*search*/ diff --git a/upload/source/include/spacecp/spacecp_follow.php b/upload/source/include/spacecp/spacecp_follow.php index 56c40df8de492072ba663cc1164a896b64b66785..f75cd5567f9191ec9affb36afe7c339b03196f10 100644 --- a/upload/source/include/spacecp/spacecp_follow.php +++ b/upload/source/include/spacecp/spacecp_follow.php @@ -46,7 +46,9 @@ if($op == 'add') { C::t('home_follow')->insert($followdata, false, true); C::t('common_member_count')->increase($_G['uid'], array('following' => 1)); C::t('common_member_count')->increase($followuid, array('follower' => 1, 'newfollower' => 1)); - notification_add($followuid, 'follower', 'member_follow_add', array('count' => $count, 'from_id'=>$_G['uid'], 'from_idtype' => 'following'), 1); + if($_G['setting']['followaddnotice']) { + notification_add($followuid, 'follower', 'member_follow_add', array('count' => $count, 'from_id'=>$_G['uid'], 'from_idtype' => 'following'), 1); + } } elseif($special) { $status = $special == 1 ? 1 : 0; C::t('home_follow')->update_by_uid_followuid($_G['uid'], $followuid, array('status'=>$status)); diff --git a/upload/source/language/lang_admincp.php b/upload/source/language/lang_admincp.php index 04d0369853b1cc2243ee9d9fd3dbd575113a0a53..0d86ab922eb322f5b0d6df051e89cd764889f9b7 100644 --- a/upload/source/language/lang_admincp.php +++ b/upload/source/language/lang_admincp.php @@ -1171,6 +1171,8 @@ $lang = array 'setting_follow_base_default_follow_retain_day_comment' => '广播超过多少天移入存档表(单位:天)', 'setting_follow_base_default_view_profile' => '默认查看个人资料', 'setting_follow_base_default_view_profile_comment' => '该设置对管理员有效,开启后默认管理员查看将直接查看个人资料页面', + 'setting_follow_base_default_follow_add_notice' => '被关注时通知被关注者', + 'setting_follow_base_default_follow_add_notice_comment' => '开启后用户被关注时将会收到通知', 'setting_home' => '空间设置', 'setting_home_base' => '基本设置', 'setting_home_base_feedday' => '动态保留天数',