clean up the awful descriptive text on thing input

This commit is contained in:
friendica 2014-06-23 17:05:03 -07:00
parent 181623030b
commit b2feb26492
2 changed files with 7 additions and 4 deletions

View File

@ -266,7 +266,7 @@ function obj_verb_selector($current = '') {
$o .= '<select class="obj-verb-selector" name="verb" >'; $o .= '<select class="obj-verb-selector" name="verb" >';
foreach($verbs as $k => $v) { foreach($verbs as $k => $v) {
$selected = (($k == $current) ? ' selected="selected" ' : ''); $selected = (($k == $current) ? ' selected="selected" ' : '');
$o .= '<option value="' . urlencode($k) . '"' . $selected . '>' . $v[0] . '</option>'; $o .= '<option value="' . urlencode($k) . '"' . $selected . '>' . $v[1] . '</option>';
} }
$o .= '</select>'; $o .= '</select>';
return $o; return $o;

View File

@ -243,12 +243,15 @@ function thing_content(&$a) {
} }
} }
if(! local_user()) { $channel = $a->get_channel();
if(! (local_user() && $channel)) {
notice( t('Permission denied.') . EOL); notice( t('Permission denied.') . EOL);
return; return;
} }
$thing_hash = ''; $thing_hash = '';
if(argc() == 3 && argv(1) === 'edit') { if(argc() == 3 && argv(1) === 'edit') {
$thing_hash = argv(2); $thing_hash = argv(2);
@ -270,7 +273,7 @@ function thing_content(&$a) {
'$multiprof' => feature_enabled(local_user(),'multi_profiles'), '$multiprof' => feature_enabled(local_user(),'multi_profiles'),
'$profile_lbl' => t('Select a profile'), '$profile_lbl' => t('Select a profile'),
'$profile_select' => contact_profile_assign($r[0]['obj_page']), '$profile_select' => contact_profile_assign($r[0]['obj_page']),
'$verb_lbl' => t('Select a category of stuff. e.g. I ______ something'), '$verb_lbl' => $channel['channel_name'],
'$verb_select' => obj_verb_selector($r[0]['obj_verb']), '$verb_select' => obj_verb_selector($r[0]['obj_verb']),
'$activity' => array('activity',t('Post an activity'),true,t('Only sends to viewers of the applicable profile')), '$activity' => array('activity',t('Post an activity'),true,t('Only sends to viewers of the applicable profile')),
'$thing_hash' => $thing_hash, '$thing_hash' => $thing_hash,
@ -317,7 +320,7 @@ function thing_content(&$a) {
'$multiprof' => feature_enabled(local_user(),'multi_profiles'), '$multiprof' => feature_enabled(local_user(),'multi_profiles'),
'$profile_lbl' => t('Select a profile'), '$profile_lbl' => t('Select a profile'),
'$profile_select' => contact_profile_assign(''), '$profile_select' => contact_profile_assign(''),
'$verb_lbl' => t('Select a category of stuff. e.g. I ______ something'), '$verb_lbl' => $channel['channel_name'],
'$activity' => array('activity',t('Post an activity'),true,t('Only sends to viewers of the applicable profile')), '$activity' => array('activity',t('Post an activity'),true,t('Only sends to viewers of the applicable profile')),
'$verb_select' => obj_verb_selector(), '$verb_select' => obj_verb_selector(),
'$thing_lbl' => t('Name of thing e.g. something'), '$thing_lbl' => t('Name of thing e.g. something'),