The "ignore" feature can be disabled and enabled, the value will now be retrieved.
This commit is contained in:
parent
e32e458cb8
commit
56f0af2067
|
@ -60,6 +60,7 @@ function get_features() {
|
||||||
array('filing', t('Saved Folders'), t('Ability to file posts under folders')),
|
array('filing', t('Saved Folders'), t('Ability to file posts under folders')),
|
||||||
array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments')),
|
array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments')),
|
||||||
array('star_posts', t('Star Posts'), t('Ability to mark special posts with a star indicator')),
|
array('star_posts', t('Star Posts'), t('Ability to mark special posts with a star indicator')),
|
||||||
|
array('ignore_posts', t('Mute Post Notifications'), t('Ability to mute notifications for a thread')),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -199,14 +199,21 @@ class Item extends BaseObject {
|
||||||
'classundo' => (($item['starred']) ? "" : "hidden"),
|
'classundo' => (($item['starred']) ? "" : "hidden"),
|
||||||
'starred' => t('starred'),
|
'starred' => t('starred'),
|
||||||
);
|
);
|
||||||
$ignore = array(
|
$r = q("SELECT `ignored` FROM `thread` WHERE `uid` = %d AND `iid` = %d LIMIT 1",
|
||||||
'do' => t("ignore thread"),
|
intval($item['uid']),
|
||||||
'undo' => t("unignore thread"),
|
intval($item['id'])
|
||||||
'toggle' => t("toggle ignore status"),
|
|
||||||
'classdo' => (($item['starred']) ? "hidden" : ""),
|
|
||||||
'classundo' => (($item['starred']) ? "" : "hidden"),
|
|
||||||
'ignored' => t('ignored'),
|
|
||||||
);
|
);
|
||||||
|
if (count($r)) {
|
||||||
|
$ignore = array(
|
||||||
|
'do' => t("ignore thread"),
|
||||||
|
'undo' => t("unignore thread"),
|
||||||
|
'toggle' => t("toggle ignore status"),
|
||||||
|
'classdo' => (($r[0]['ignored']) ? "hidden" : ""),
|
||||||
|
'classundo' => (($r[0]['ignored']) ? "" : "hidden"),
|
||||||
|
'ignored' => t('ignored'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$tagger = '';
|
$tagger = '';
|
||||||
if(feature_enabled($conv->get_profile_owner(),'commtag')) {
|
if(feature_enabled($conv->get_profile_owner(),'commtag')) {
|
||||||
$tagger = array(
|
$tagger = array(
|
||||||
|
@ -344,8 +351,7 @@ class Item extends BaseObject {
|
||||||
'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
|
'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
|
||||||
'isstarred' => $isstarred,
|
'isstarred' => $isstarred,
|
||||||
'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''),
|
'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''),
|
||||||
/* 'ignore' => ((feature_enabled($conv->get_profile_owner(),'ignore_posts')) ? $ignore : ''), */
|
'ignore' => ((feature_enabled($conv->get_profile_owner(),'ignore_posts')) ? $ignore : ''),
|
||||||
'ignore' => $ignore,
|
|
||||||
'tagger' => $tagger,
|
'tagger' => $tagger,
|
||||||
'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
|
'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
|
||||||
'drop' => $drop,
|
'drop' => $drop,
|
||||||
|
|
Loading…
Reference in a new issue