Skip to content

Commit

Permalink
added ability to change anonymous owner to not say Everyone lists ove…
Browse files Browse the repository at this point in the history
…rview page
  • Loading branch information
joshdentremont committed Oct 30, 2015
1 parent 9c45b4a commit 27e4d03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions includes/admin.form.inc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ function islandora_bookmark_admin_settings(array $form, array &$form_state) {
'#description' => t('The unpluralized name of the type of lists such as bookmark or favorite.'),
'#default_value' => variable_get('islandora_bookmark_type', 'bookmark'),
),
'anonymous_owner' => array(
'#type' => 'textfield',
'#title' => t('The owner name to display for anonymous users.'),
'#description' => t('The name to display in the owner column for users who are not logged in.'),
'#default_value' => variable_get('islandora_bookmark_owner', 'Me'),
),
'overview_page_elements' => array(
'#type' => 'textfield',
'#title' => t('Bookmarks overview table'),
Expand Down Expand Up @@ -120,6 +126,7 @@ function islandora_bookmark_admin_settings_submit(array $form, array &$form_stat
variable_set('islandora_bookmark_overview_page_elements', $form_state['values']['overview_page_elements']);
variable_set('islandora_bookmark_detailed_page_elements', $form_state['values']['detailed_page_elements']);
variable_set('islandora_bookmark_type', $form_state['values']['list_type']);
variable_set('islandora_bookmark_owner', $form_state['values']['anonymous_owner']);
variable_set('islandora_bookmark_create_user_default_lists', $form_state['values']['create_user_default_lists']);
if ($form_state['values']['create_user_default_lists']) {
variable_set('islandora_bookmark_default_list_name', $form_state['values']['default_list_name']);
Expand All @@ -132,6 +139,7 @@ function islandora_bookmark_admin_settings_submit(array $form, array &$form_stat
variable_del('islandora_bookmark_overview_page_elements');
variable_del('islandora_bookmark_detailed_page_elements');
variable_del('islandora_bookmark_type');
variable_del('islandora_bookmark_owner');
variable_del('islandora_bookmark_create_user_default_lists');
variable_del('islandora_bookmark_default_list_name');
variable_del('islandora_bookmark_share_default_list');
Expand Down
3 changes: 2 additions & 1 deletion islandora_bookmark.module
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,8 @@ function islandora_bookmark_form_overview_table(array $bookmark_objs) {
foreach ($bookmark_objs as $bookmark) {
$owner = user_load($bookmark->bookmarkOwner);
if ($bookmark->bookmarkOwner == 0) {
$owner_output = t('Everyone');
$owner_output = variable_get('islandora_bookmark_owner', 'Me');
;
}
else {
$owner_output = $owner->name;
Expand Down

0 comments on commit 27e4d03

Please sign in to comment.