Code Duplication    Length = 8-8 lines in 5 locations

modules/commons/commons_documents/commons_documents.module 1 location

@@ 65-72 (lines=8) @@
62
/**
63
 * Implements hook_views_pre_render().
64
 */
65
function commons_documents_views_pre_render(&$view) {
66
  // Improve the browsing widget empty text when displayed outside of a group.
67
  // TODO: Enable og_context and check group context instead of looking for an
68
  // empty first argument.
69
  if (empty($view->args[0]) && $view->name == 'commons_bw_documents') {
70
    $view->display_handler->handlers['empty']['area']->options['content'] = t('No documents have been created.');
71
  }
72
}
73

modules/commons/commons_groups/commons_groups.module 1 location

@@ 1183-1190 (lines=8) @@
1180
/**
1181
 * Implements hook_views_pre_render().
1182
 */
1183
function commons_groups_views_pre_render(&$view) {
1184
  // Improve the browsing widget empty text when displayed outside of a group.
1185
  // TODO: Enable og_context and check group context instead of looking for an
1186
  // empty first argument.
1187
  if (empty($view->args[0]) && $view->name == 'commons_bw_all') {
1188
    $view->display_handler->handlers['empty']['area']->options['content'] = t('Nobody has posted yet.');
1189
  }
1190
}
1191
1192
/**
1193
 * Special Commons implementation of hook_features_rebuild().

modules/commons/commons_polls/commons_polls.module 1 location

@@ 123-130 (lines=8) @@
120
/**
121
 * Implements hook_views_pre_render().
122
 */
123
function commons_polls_views_pre_render(&$view) {
124
  // Improve the browsing widget empty text when displayed outside of a group.
125
  // TODO: Enable og_context and check group context instead of looking for an
126
  // empty first argument.
127
  if (empty($view->args[0]) && $view->name == 'commons_bw_polls') {
128
    $view->display_handler->handlers['empty']['area']->options['content'] = t('No polls have been created.');
129
  }
130
}
131

modules/commons/commons_posts/commons_posts.module 1 location

@@ 89-96 (lines=8) @@
86
/**
87
 * Implements hook_views_pre_render().
88
 */
89
function commons_posts_views_pre_render(&$view) {
90
  // Improve the browsing widget empty text when displayed outside of a group.
91
  // TODO: Enable og_context and check group context instead of looking for an
92
  // empty first argument.
93
  if (empty($view->args[0]) && $view->name == 'commons_bw_posts') {
94
    $view->display_handler->handlers['empty']['area']->options['content'] = t('No posts have been created.');
95
  }
96
}
97

modules/commons/commons_wikis/commons_wikis.module 1 location

@@ 168-175 (lines=8) @@
165
/**
166
 * Implements hook_views_pre_render().
167
 */
168
function commons_wikis_views_pre_render(&$view) {
169
  // Improve the browsing widget empty text when displayed outside of a group.
170
  // TODO: Enable og_context and check group context instead of looking for an
171
  // empty first argument.
172
  if (empty($view->args[0]) && $view->name == 'commons_bw_wikis') {
173
    $view->display_handler->handlers['empty']['area']->options['content'] = t('No wikis have been created.');
174
  }
175
}
176