function getTopicAccessName($topic_access)
 {
     $_messageResources =& Subscriptions::getMessageResources();
     $names = Subscriptions::getTopicAccessesNames();
     return isset($names[$topic_access]) ? $names[$topic_access] : $_messageResources->getMessage('TOPIC_ACCESS_UNKNOWN');
 }
예제 #2
0
 function getTopicAccessSelect($select_name, $selected_access = null)
 {
     $statuses = Subscriptions::getTopicAccessesNames();
     if (empty($selected_access)) {
         $selected_access = SUBSCRIPTION_TOPIC_FULL_ACCESS;
     }
     $options = array();
     foreach ($statuses as $status => $status_name) {
         $options[] = array('value' => $status, 'contents' => $status_name);
     }
     return HtmlForm::getRadio(array('select_name' => $select_name, 'values' => $options, 'selected_value' => $selected_access));
 }