@@ -38,8 +38,7 @@ discard block |
||
| 38 | 38 | foreach($words as &$word) { |
| 39 | 39 | if(is_numeric($word)) { |
| 40 | 40 | $word = '<span class="notification-count">' . $word . '</span>'; |
| 41 | - } |
|
| 42 | - else { |
|
| 41 | + } else { |
|
| 43 | 42 | $word = '<span class="notification-label element-invisible">' . $word . '</span>'; |
| 44 | 43 | } |
| 45 | 44 | } |
@@ -321,8 +320,7 @@ discard block |
||
| 321 | 320 | if ($name != 'comment_forbidden' && $name != 'answer-add' && !is_string($link['attributes']['class'])) { |
| 322 | 321 | $link['attributes']['class'][] = 'action-item-small'; |
| 323 | 322 | $link['attributes']['class'][] = 'action-item-inline'; |
| 324 | - } |
|
| 325 | - elseif ($name != 'comment_forbidden' && $name != 'answer-add') { |
|
| 323 | + } elseif ($name != 'comment_forbidden' && $name != 'answer-add') { |
|
| 326 | 324 | $link['attributes']['class'] .= ' action-item-small action-item-inline'; |
| 327 | 325 | } |
| 328 | 326 | } |
@@ -343,8 +341,7 @@ discard block |
||
| 343 | 341 | foreach ($chunks as &$chunk) { |
| 344 | 342 | if ($chunk == $variables['comment_count']) { |
| 345 | 343 | $chunk = '<span class="action-item-small-append">' . $variables['comment_count'] . '</span>'; |
| 346 | - } |
|
| 347 | - else { |
|
| 344 | + } else { |
|
| 348 | 345 | $chunk = '<span class="element-invisible">' . $chunk . '</span>'; |
| 349 | 346 | } |
| 350 | 347 | } |
@@ -473,8 +470,7 @@ discard block |
||
| 473 | 470 | // Style the flag links like buttons. |
| 474 | 471 | if ($variables['last_action'] == 'flagged') { |
| 475 | 472 | $variables['flag_classes_array'][] = 'action-item-small-active'; |
| 476 | - } |
|
| 477 | - else { |
|
| 473 | + } else { |
|
| 478 | 474 | $variables['flag_classes_array'][] = 'action-item-small'; |
| 479 | 475 | } |
| 480 | 476 | $variables['flag_classes'] = implode(' ', $variables['flag_classes_array']); |
@@ -612,8 +608,7 @@ discard block |
||
| 612 | 608 | foreach ($view->result as $id => $result) { |
| 613 | 609 | if (isset($result->node_type)) { |
| 614 | 610 | $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-' . $result->node_type); |
| 615 | - } |
|
| 616 | - else if (($view->name == 'commons_events_upcoming' && $view->override_path != 'events') || $view->name == 'commons_events_user_upcoming_events') { |
|
| 611 | + } else if (($view->name == 'commons_events_upcoming' && $view->override_path != 'events') || $view->name == 'commons_events_user_upcoming_events') { |
|
| 617 | 612 | $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-event'); |
| 618 | 613 | } |
| 619 | 614 | } |
@@ -651,8 +646,7 @@ discard block |
||
| 651 | 646 | // Roll the classes into the attributes. |
| 652 | 647 | if (empty($variables['attributes_array']['class'])) { |
| 653 | 648 | $variables['attributes_array']['class'] = $variables['classes_array']; |
| 654 | - } |
|
| 655 | - else { |
|
| 649 | + } else { |
|
| 656 | 650 | $variables['attributes_array']['class'] = array_merge($variables['attributes_array']['class'], $variables['classes_array']); |
| 657 | 651 | } |
| 658 | 652 | |
@@ -834,8 +828,7 @@ discard block |
||
| 834 | 828 | return '<span class="' . $classes . '" id="rate-button-' . $id . '">' . |
| 835 | 829 | '<span class="element-invisible">' . check_plain($text) . '</span>' . |
| 836 | 830 | '</span>'; |
| 837 | - } |
|
| 838 | - else { |
|
| 831 | + } else { |
|
| 839 | 832 | return '<a class="' . $classes . '" id="rate-button-' . $id . '" rel="nofollow" href="' . htmlentities($href) . '" title="' . check_plain($text) . '">' . |
| 840 | 833 | '<span class="element-invisible">' . check_plain($text) . '</span>' . |
| 841 | 834 | '</a>'; |
@@ -851,8 +844,7 @@ discard block |
||
| 851 | 844 | if (is_array($form['#theme'])) { |
| 852 | 845 | $hooks = array('form_content'); |
| 853 | 846 | $form['#theme'] = array_merge($form['#theme'], $hooks); |
| 854 | - } |
|
| 855 | - else { |
|
| 847 | + } else { |
|
| 856 | 848 | $form['#theme'] = array( |
| 857 | 849 | $form['#theme'], |
| 858 | 850 | 'form_content', |
@@ -1000,8 +992,7 @@ discard block |
||
| 1000 | 992 | if (isset($link['href'])) { |
| 1001 | 993 | // Pass in $link as $options, they share the same keys. |
| 1002 | 994 | $output .= l($link['title'], $link['href'], $link); |
| 1003 | - } |
|
| 1004 | - elseif (!empty($link['title'])) { |
|
| 995 | + } elseif (!empty($link['title'])) { |
|
| 1005 | 996 | // Some links are actually not links, but we wrap these in <span> for adding title and class attributes. |
| 1006 | 997 | if (empty($link['html'])) { |
| 1007 | 998 | $link['title'] = check_plain($link['title']); |
@@ -1098,8 +1089,7 @@ discard block |
||
| 1098 | 1089 | } |
| 1099 | 1090 | if (isset($item['#href']) && strpos($item['#href'], 'messages')) { |
| 1100 | 1091 | $item['#options']['attributes']['class'][] = 'message-contact'; |
| 1101 | - } |
|
| 1102 | - elseif (isset($item['#href'])) { |
|
| 1092 | + } elseif (isset($item['#href'])) { |
|
| 1103 | 1093 | $item['#options']['attributes']['class'][] = 'trusted-status-request'; |
| 1104 | 1094 | } |
| 1105 | 1095 | } |
@@ -1118,8 +1108,7 @@ discard block |
||
| 1118 | 1108 | |
| 1119 | 1109 | if (!isset($element['#value'])) { |
| 1120 | 1110 | return '<' . $element['#tag'] . $attributes . " />\n"; |
| 1121 | - } |
|
| 1122 | - else { |
|
| 1111 | + } else { |
|
| 1123 | 1112 | $output = '<' . $element['#tag'] . $attributes . '>'; |
| 1124 | 1113 | if (isset($element['#value_prefix'])) { |
| 1125 | 1114 | $output .= $element['#value_prefix']; |
@@ -1152,8 +1141,7 @@ discard block |
||
| 1152 | 1141 | if (isset($item['#type']) && $item['#type'] == 'link') { |
| 1153 | 1142 | if (strpos($item['#href'], '/subscribe')) { |
| 1154 | 1143 | $item['#options']['attributes']['class'][] = 'action-item-primary'; |
| 1155 | - } |
|
| 1156 | - else { |
|
| 1144 | + } else { |
|
| 1157 | 1145 | $item['#options']['attributes']['class'][] = 'action-item'; |
| 1158 | 1146 | } |
| 1159 | 1147 | } |
@@ -1181,8 +1169,7 @@ discard block |
||
| 1181 | 1169 | // validating that the administrative area has been populated. |
| 1182 | 1170 | if (!empty($address['#address']['administrative_area'])) { |
| 1183 | 1171 | _commons_origins_format_address($address); |
| 1184 | - } |
|
| 1185 | - else { |
|
| 1172 | + } else { |
|
| 1186 | 1173 | // Deny access to incomplete addresses. |
| 1187 | 1174 | $address['#access'] = FALSE; |
| 1188 | 1175 | } |
@@ -1220,8 +1207,7 @@ discard block |
||
| 1220 | 1207 | // If an address is incomplete, remove it and tell the system a |
| 1221 | 1208 | // rebuild is needed. |
| 1222 | 1209 | unset($variables['row']->field_field_address[$key]); |
| 1223 | - } |
|
| 1224 | - else { |
|
| 1210 | + } else { |
|
| 1225 | 1211 | _commons_origins_format_address($address['rendered']); |
| 1226 | 1212 | } |
| 1227 | 1213 | } |
@@ -1294,8 +1280,7 @@ discard block |
||
| 1294 | 1280 | if (module_exists('timeago') && variable_get('timeago_node', 1)) { |
| 1295 | 1281 | $variables['date'] = timeago_format_date($node->created, $variables['date']); |
| 1296 | 1282 | $use_timeago_date_format = TRUE; |
| 1297 | - } |
|
| 1298 | - else { |
|
| 1283 | + } else { |
|
| 1299 | 1284 | $use_timeago_date_format = FALSE; |
| 1300 | 1285 | } |
| 1301 | 1286 | |
@@ -1318,16 +1303,13 @@ discard block |
||
| 1318 | 1303 | $placeholders['!group'] = l($wrapper->{OG_AUDIENCE_FIELD}->get(0)->label(), 'node/' . $wrapper->{OG_AUDIENCE_FIELD}->get(0)->getIdentifier()); |
| 1319 | 1304 | if ($use_timeago_date_format == TRUE) { |
| 1320 | 1305 | $variables['submitted'] = t('!type created !date in the !group group by !user', $placeholders); |
| 1321 | - } |
|
| 1322 | - else { |
|
| 1306 | + } else { |
|
| 1323 | 1307 | $variables['submitted'] = t('!type created @interval ago in the !group group by !user', $placeholders); |
| 1324 | 1308 | } |
| 1325 | - } |
|
| 1326 | - else { |
|
| 1309 | + } else { |
|
| 1327 | 1310 | if ($use_timeago_date_format == TRUE) { |
| 1328 | 1311 | $variables['submitted'] = t('!type created !date by !user', $placeholders); |
| 1329 | - } |
|
| 1330 | - else { |
|
| 1312 | + } else { |
|
| 1331 | 1313 | $variables['submitted'] = t('!type created @interval ago by !user', $placeholders); |
| 1332 | 1314 | } |
| 1333 | 1315 | } |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | // @see commons_origins_form_alter(). |
| 16 | 16 | 'form_content' => array( |
| 17 | 17 | 'render element' => 'form', |
| 18 | - 'path' => drupal_get_path('theme', 'commons_origins') . '/templates/form', |
|
| 18 | + 'path' => drupal_get_path('theme', 'commons_origins').'/templates/form', |
|
| 19 | 19 | 'template' => 'form-content', |
| 20 | 20 | 'pattern' => 'form_content__', |
| 21 | 21 | ), |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | foreach ($iconify as $name) { |
| 36 | 36 | if (isset($element[$name])) { |
| 37 | 37 | $words = explode(' ', $element[$name]['title']); |
| 38 | - foreach($words as &$word) { |
|
| 39 | - if(is_numeric($word)) { |
|
| 40 | - $word = '<span class="notification-count">' . $word . '</span>'; |
|
| 38 | + foreach ($words as &$word) { |
|
| 39 | + if (is_numeric($word)) { |
|
| 40 | + $word = '<span class="notification-count">'.$word.'</span>'; |
|
| 41 | 41 | } |
| 42 | 42 | else { |
| 43 | - $word = '<span class="notification-label element-invisible">' . $word . '</span>'; |
|
| 43 | + $word = '<span class="notification-label element-invisible">'.$word.'</span>'; |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | $element[$name]['title'] = implode(' ', $words); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | // Video and rich type must have HTML content. |
| 60 | 60 | // Wrap the HTML content in a <div> to allow it to be made responsive. |
| 61 | 61 | if (in_array($type, array('video', 'rich'))) { |
| 62 | - $variables['content'] = '<div class="oembed">' . $content . '</div>'; |
|
| 62 | + $variables['content'] = '<div class="oembed">'.$content.'</div>'; |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
@@ -103,12 +103,12 @@ discard block |
||
| 103 | 103 | function commons_origins_apachesolr_search_browse_blocks($vars) { |
| 104 | 104 | $result = ''; |
| 105 | 105 | if ($vars['content']['#children']) { |
| 106 | - $result .= '<div class="apachesolr-browse-blocks">' . "\n"; |
|
| 107 | - $result .= ' <h2 class="search-results-title">' . t('Browse available categories') . '</h2>' . "\n"; |
|
| 108 | - $result .= ' <div class="commons-pod">' . "\n"; |
|
| 109 | - $result .= ' <p>' . t('Pick a category to launch a search.') . '</p>' . "\n"; |
|
| 110 | - $result .= $vars['content']['#children'] . "\n"; |
|
| 111 | - $result .= ' </div>' . "\n"; |
|
| 106 | + $result .= '<div class="apachesolr-browse-blocks">'."\n"; |
|
| 107 | + $result .= ' <h2 class="search-results-title">'.t('Browse available categories').'</h2>'."\n"; |
|
| 108 | + $result .= ' <div class="commons-pod">'."\n"; |
|
| 109 | + $result .= ' <p>'.t('Pick a category to launch a search.').'</p>'."\n"; |
|
| 110 | + $result .= $vars['content']['#children']."\n"; |
|
| 111 | + $result .= ' </div>'."\n"; |
|
| 112 | 112 | $result .= '</div>'; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | $variables['classes_array'] = array_merge($variables['classes_array'], $variables['message_classes']); |
| 193 | 193 | } |
| 194 | 194 | $variables['classes_array'][] = 'clearfix'; |
| 195 | - $variables['attributes_array']['id'] = 'privatemsg-mid-' . $variables['mid']; |
|
| 195 | + $variables['attributes_array']['id'] = 'privatemsg-mid-'.$variables['mid']; |
|
| 196 | 196 | $variables['content_attributes_array']['class'][] = 'privatemsg-message-content'; |
| 197 | 197 | |
| 198 | 198 | // Add a distinct class to the "Delete" action. |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | $output = ''; |
| 215 | 215 | $path_to_at_core = drupal_get_path('theme', 'adaptivetheme'); |
| 216 | 216 | |
| 217 | - include_once($path_to_at_core . '/inc/get.inc'); |
|
| 217 | + include_once($path_to_at_core.'/inc/get.inc'); |
|
| 218 | 218 | |
| 219 | 219 | global $theme_key; |
| 220 | 220 | $theme_name = $theme_key; |
@@ -229,15 +229,15 @@ discard block |
||
| 229 | 229 | |
| 230 | 230 | if (at_get_setting('extra_menu_classes', $theme_name) == 1 && !empty($element['#original_link'])) { |
| 231 | 231 | if (!empty($element['#original_link']['depth'])) { |
| 232 | - $element['#attributes']['class'][] = 'menu-depth-' . $element['#original_link']['depth']; |
|
| 232 | + $element['#attributes']['class'][] = 'menu-depth-'.$element['#original_link']['depth']; |
|
| 233 | 233 | } |
| 234 | 234 | if (!empty($element['#original_link']['mlid'])) { |
| 235 | - $element['#attributes']['class'][] = 'menu-item-' . $element['#original_link']['mlid']; |
|
| 235 | + $element['#attributes']['class'][] = 'menu-item-'.$element['#original_link']['mlid']; |
|
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | if (at_get_setting('menu_item_span_elements', $theme_name) == 1 && !empty($element['#title'])) { |
| 240 | - $element['#title'] = '<span>' . $element['#title'] . '</span>'; |
|
| 240 | + $element['#title'] = '<span>'.$element['#title'].'</span>'; |
|
| 241 | 241 | $element['#localized_options']['html'] = TRUE; |
| 242 | 242 | } |
| 243 | 243 | |
@@ -246,15 +246,15 @@ discard block |
||
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | $output = l($element['#title'], $element['#href'], $element['#localized_options']); |
| 249 | - return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>"; |
|
| 249 | + return '<li'.drupal_attributes($element['#attributes']).'>'.$output.$sub_menu."</li>"; |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | /** |
| 253 | 253 | * Helper function to examine menu links and return the appropriate class. |
| 254 | 254 | */ |
| 255 | -function commons_origins_menu_link_class(&$element) { |
|
| 255 | +function commons_origins_menu_link_class(&$element) { |
|
| 256 | 256 | if ($element['#original_link']['menu_name'] == 'main-menu') { |
| 257 | - $element['#attributes']['class'][] = drupal_html_class($element['#original_link']['menu_name'] . '-' . $element['#original_link']['router_path']); |
|
| 257 | + $element['#attributes']['class'][] = drupal_html_class($element['#original_link']['menu_name'].'-'.$element['#original_link']['router_path']); |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | // Only load the media styles if Commons Media is enabled. |
| 281 | 281 | if (module_exists('commons_media')) { |
| 282 | - drupal_add_css(drupal_get_path('theme', 'commons_origins') . '/css/commons-media.css', array('media' => 'screen', 'group' => CSS_THEME)); |
|
| 282 | + drupal_add_css(drupal_get_path('theme', 'commons_origins').'/css/commons-media.css', array('media' => 'screen', 'group' => CSS_THEME)); |
|
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 | |
@@ -342,10 +342,10 @@ discard block |
||
| 342 | 342 | // Add appropriate classes to words in the title. |
| 343 | 343 | foreach ($chunks as &$chunk) { |
| 344 | 344 | if ($chunk == $variables['comment_count']) { |
| 345 | - $chunk = '<span class="action-item-small-append">' . $variables['comment_count'] . '</span>'; |
|
| 345 | + $chunk = '<span class="action-item-small-append">'.$variables['comment_count'].'</span>'; |
|
| 346 | 346 | } |
| 347 | 347 | else { |
| 348 | - $chunk = '<span class="element-invisible">' . $chunk . '</span>'; |
|
| 348 | + $chunk = '<span class="element-invisible">'.$chunk.'</span>'; |
|
| 349 | 349 | } |
| 350 | 350 | } |
| 351 | 351 | $comments_link['title'] = implode(' ', $chunks); |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | 'field_related_question', |
| 400 | 400 | 'field_topics', |
| 401 | 401 | ); |
| 402 | - foreach($related_information as $field) { |
|
| 402 | + foreach ($related_information as $field) { |
|
| 403 | 403 | if (!empty($variables['content'][$field])) { |
| 404 | 404 | $variables['content']['related_information'][$field] = $variables['content'][$field]; |
| 405 | 405 | hide($variables['content'][$field]); |
@@ -509,13 +509,13 @@ discard block |
||
| 509 | 509 | */ |
| 510 | 510 | function commons_origins_preprocess_panelizer_view_mode(&$variables, $hook) { |
| 511 | 511 | // Add classed to identity the entity type being overridden. |
| 512 | - $variables['classes_array'][] = drupal_html_class('panelizer-' . $variables['element']['#entity_type']); |
|
| 513 | - $variables['title_attributes_array']['class'][] = drupal_html_class($variables['element']['#entity_type'] . '-title'); |
|
| 514 | - $variables['title_attributes_array']['class'][] = drupal_html_class('panelizer-' . $variables['element']['#entity_type'] . '-title'); |
|
| 512 | + $variables['classes_array'][] = drupal_html_class('panelizer-'.$variables['element']['#entity_type']); |
|
| 513 | + $variables['title_attributes_array']['class'][] = drupal_html_class($variables['element']['#entity_type'].'-title'); |
|
| 514 | + $variables['title_attributes_array']['class'][] = drupal_html_class('panelizer-'.$variables['element']['#entity_type'].'-title'); |
|
| 515 | 515 | |
| 516 | 516 | // Add some extra theme hooks for the subthemers. |
| 517 | - $variables['hook_theme_suggestions'][] = $hook . '__' . $variables['element']['#entity_type']; |
|
| 518 | - $variables['hook_theme_suggestions'][] = $hook . '__' . $variables['element']['#entity_type'] . '__' . $variables['element']['#bundle']; |
|
| 517 | + $variables['hook_theme_suggestions'][] = $hook.'__'.$variables['element']['#entity_type']; |
|
| 518 | + $variables['hook_theme_suggestions'][] = $hook.'__'.$variables['element']['#entity_type'].'__'.$variables['element']['#bundle']; |
|
| 519 | 519 | } |
| 520 | 520 | |
| 521 | 521 | /** |
@@ -611,10 +611,10 @@ discard block |
||
| 611 | 611 | // node type information. |
| 612 | 612 | foreach ($view->result as $id => $result) { |
| 613 | 613 | if (isset($result->node_type)) { |
| 614 | - $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-' . $result->node_type); |
|
| 614 | + $variables['classes_array'][$id] .= ' '.drupal_html_class('row-type-'.$result->node_type); |
|
| 615 | 615 | } |
| 616 | 616 | else if (($view->name == 'commons_events_upcoming' && $view->override_path != 'events') || $view->name == 'commons_events_user_upcoming_events') { |
| 617 | - $variables['classes_array'][$id] .= ' ' . drupal_html_class('row-type-event'); |
|
| 617 | + $variables['classes_array'][$id] .= ' '.drupal_html_class('row-type-event'); |
|
| 618 | 618 | } |
| 619 | 619 | } |
| 620 | 620 | } |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | /** |
| 623 | 623 | * Implements hook_preprocess_pager(). |
| 624 | 624 | */ |
| 625 | -function commons_origins_preprocess_pager_link (&$variables, $hook) { |
|
| 625 | +function commons_origins_preprocess_pager_link(&$variables, $hook) { |
|
| 626 | 626 | // Style pager links like buttons. |
| 627 | 627 | $variables['attributes']['class'][] = 'action-item'; |
| 628 | 628 | $variables['attributes']['class'][] = 'action-item-inline'; |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | } |
| 686 | 686 | |
| 687 | 687 | // Set an identifying class to the event attendance form. |
| 688 | - if(strpos($element['#id'], 'commons-events-attend-event-form') === 0) { |
|
| 688 | + if (strpos($element['#id'], 'commons-events-attend-event-form') === 0) { |
|
| 689 | 689 | $variables['attributes_array']['class'][] = 'node-actions'; |
| 690 | 690 | } |
| 691 | 691 | |
@@ -760,7 +760,7 @@ discard block |
||
| 760 | 760 | $variables['form']['actions']['submit']['#attributes']['class'][] = 'action-item-primary'; |
| 761 | 761 | |
| 762 | 762 | if (isset($variables['form']['title'])) { |
| 763 | - $variables['form']['title']['#markup'] = '<h3 class="partial-node-form-title">' . $variables['form']['title']['#markup'] . '</h3>'; |
|
| 763 | + $variables['form']['title']['#markup'] = '<h3 class="partial-node-form-title">'.$variables['form']['title']['#markup'].'</h3>'; |
|
| 764 | 764 | } |
| 765 | 765 | } |
| 766 | 766 | |
@@ -827,17 +827,17 @@ discard block |
||
| 827 | 827 | |
| 828 | 828 | $classes = 'rate-button'; |
| 829 | 829 | if ($class) { |
| 830 | - $classes .= ' ' . $class; |
|
| 830 | + $classes .= ' '.$class; |
|
| 831 | 831 | } |
| 832 | 832 | if (empty($href)) { |
| 833 | 833 | // Widget is disabled or closed. |
| 834 | - return '<span class="' . $classes . '" id="rate-button-' . $id . '">' . |
|
| 835 | - '<span class="element-invisible">' . check_plain($text) . '</span>' . |
|
| 834 | + return '<span class="'.$classes.'" id="rate-button-'.$id.'">'. |
|
| 835 | + '<span class="element-invisible">'.check_plain($text).'</span>'. |
|
| 836 | 836 | '</span>'; |
| 837 | 837 | } |
| 838 | 838 | else { |
| 839 | - return '<a class="' . $classes . '" id="rate-button-' . $id . '" rel="nofollow" href="' . htmlentities($href) . '" title="' . check_plain($text) . '">' . |
|
| 840 | - '<span class="element-invisible">' . check_plain($text) . '</span>' . |
|
| 839 | + return '<a class="'.$classes.'" id="rate-button-'.$id.'" rel="nofollow" href="'.htmlentities($href).'" title="'.check_plain($text).'">'. |
|
| 840 | + '<span class="element-invisible">'.check_plain($text).'</span>'. |
|
| 841 | 841 | '</a>'; |
| 842 | 842 | } |
| 843 | 843 | } |
@@ -929,10 +929,10 @@ discard block |
||
| 929 | 929 | function commons_origins_css_alter(&$css) { |
| 930 | 930 | // Remove preset styles that interfere with theming. |
| 931 | 931 | $unset = array( |
| 932 | - drupal_get_path('module', 'search') . '/search.css', |
|
| 933 | - drupal_get_path('module', 'rich_snippets') . '/rich_snippets.css', |
|
| 934 | - drupal_get_path('module', 'commons_like') . '/commons-like.css', |
|
| 935 | - drupal_get_path('module', 'panels') . '/css/panels.css', |
|
| 932 | + drupal_get_path('module', 'search').'/search.css', |
|
| 933 | + drupal_get_path('module', 'rich_snippets').'/rich_snippets.css', |
|
| 934 | + drupal_get_path('module', 'commons_like').'/commons-like.css', |
|
| 935 | + drupal_get_path('module', 'panels').'/css/panels.css', |
|
| 936 | 936 | ); |
| 937 | 937 | foreach ($unset as $path) { |
| 938 | 938 | if (isset($css[$path])) { |
@@ -969,14 +969,14 @@ discard block |
||
| 969 | 969 | 'level' => 'h2', |
| 970 | 970 | ); |
| 971 | 971 | } |
| 972 | - $output .= '<' . $heading['level']; |
|
| 972 | + $output .= '<'.$heading['level']; |
|
| 973 | 973 | if (!empty($heading['class'])) { |
| 974 | 974 | $output .= drupal_attributes(array('class' => $heading['class'])); |
| 975 | 975 | } |
| 976 | - $output .= '>' . check_plain($heading['text']) . '</' . $heading['level'] . '>'; |
|
| 976 | + $output .= '>'.check_plain($heading['text']).'</'.$heading['level'].'>'; |
|
| 977 | 977 | } |
| 978 | 978 | |
| 979 | - $output .= '<ul' . drupal_attributes($attributes) . '>'; |
|
| 979 | + $output .= '<ul'.drupal_attributes($attributes).'>'; |
|
| 980 | 980 | |
| 981 | 981 | $num_links = count($links); |
| 982 | 982 | $i = 1; |
@@ -995,7 +995,7 @@ discard block |
||
| 995 | 995 | if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page())) && (empty($link['language']) || $link['language']->language == $language_url->language)) { |
| 996 | 996 | $class[] = 'active'; |
| 997 | 997 | } |
| 998 | - $output .= '<li' . drupal_attributes(array('class' => $class)) . '>'; |
|
| 998 | + $output .= '<li'.drupal_attributes(array('class' => $class)).'>'; |
|
| 999 | 999 | |
| 1000 | 1000 | if (isset($link['href'])) { |
| 1001 | 1001 | // Pass in $link as $options, they share the same keys. |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | if (isset($link['attributes'])) { |
| 1011 | 1011 | $span_attributes = drupal_attributes($link['attributes']); |
| 1012 | 1012 | } |
| 1013 | - $output .= '<span' . $span_attributes . '>' . $link['title'] . '</span>'; |
|
| 1013 | + $output .= '<span'.$span_attributes.'>'.$link['title'].'</span>'; |
|
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | 1016 | $i++; |
@@ -1034,14 +1034,14 @@ discard block |
||
| 1034 | 1034 | element_set_attributes($element, array('id')); |
| 1035 | 1035 | _form_set_class($element, array('form-wrapper')); |
| 1036 | 1036 | |
| 1037 | - $output = '<fieldset' . drupal_attributes($element['#attributes']) . '>'; |
|
| 1037 | + $output = '<fieldset'.drupal_attributes($element['#attributes']).'>'; |
|
| 1038 | 1038 | if (!empty($element['#title'])) { |
| 1039 | 1039 | // Always wrap fieldset legends in a SPAN for CSS positioning. |
| 1040 | - $output .= '<legend><span class="fieldset-legend">' . $element['#title'] . '</span></legend>'; |
|
| 1040 | + $output .= '<legend><span class="fieldset-legend">'.$element['#title'].'</span></legend>'; |
|
| 1041 | 1041 | } |
| 1042 | 1042 | $output .= '<div class="fieldset-wrapper">'; |
| 1043 | 1043 | if (!empty($element['#description'])) { |
| 1044 | - $output .= '<div class="fieldset-description">' . $element['#description'] . '</div>'; |
|
| 1044 | + $output .= '<div class="fieldset-description">'.$element['#description'].'</div>'; |
|
| 1045 | 1045 | } |
| 1046 | 1046 | $output .= $element['#children']; |
| 1047 | 1047 | if (isset($element['#value'])) { |
@@ -1049,7 +1049,7 @@ discard block |
||
| 1049 | 1049 | } |
| 1050 | 1050 | $output .= '</div>'; |
| 1051 | 1051 | $output .= "</fieldset>\n"; |
| 1052 | - return '<div class="fieldset-outer-wrapper">' . $output . '</div>'; |
|
| 1052 | + return '<div class="fieldset-outer-wrapper">'.$output.'</div>'; |
|
| 1053 | 1053 | } |
| 1054 | 1054 | |
| 1055 | 1055 | /** |
@@ -1117,10 +1117,10 @@ discard block |
||
| 1117 | 1117 | $attributes = drupal_attributes($element['#attributes']); |
| 1118 | 1118 | |
| 1119 | 1119 | if (!isset($element['#value'])) { |
| 1120 | - return '<' . $element['#tag'] . $attributes . " />\n"; |
|
| 1120 | + return '<'.$element['#tag'].$attributes." />\n"; |
|
| 1121 | 1121 | } |
| 1122 | 1122 | else { |
| 1123 | - $output = '<' . $element['#tag'] . $attributes . '>'; |
|
| 1123 | + $output = '<'.$element['#tag'].$attributes.'>'; |
|
| 1124 | 1124 | if (isset($element['#value_prefix'])) { |
| 1125 | 1125 | $output .= $element['#value_prefix']; |
| 1126 | 1126 | } |
@@ -1128,7 +1128,7 @@ discard block |
||
| 1128 | 1128 | if (isset($element['#value_suffix'])) { |
| 1129 | 1129 | $output .= $element['#value_suffix']; |
| 1130 | 1130 | } |
| 1131 | - $output .= '</' . $element['#tag'] . ">\n"; |
|
| 1131 | + $output .= '</'.$element['#tag'].">\n"; |
|
| 1132 | 1132 | return $output; |
| 1133 | 1133 | } |
| 1134 | 1134 | } |
@@ -1143,11 +1143,11 @@ discard block |
||
| 1143 | 1143 | |
| 1144 | 1144 | // Render the label, if it's not hidden. |
| 1145 | 1145 | if (!$variables['label_hidden']) { |
| 1146 | - $output .= '<div class="field-label"' . $variables['title_attributes'] . '>' . $variables['label'] . ': </div>'; |
|
| 1146 | + $output .= '<div class="field-label"'.$variables['title_attributes'].'>'.$variables['label'].': </div>'; |
|
| 1147 | 1147 | } |
| 1148 | 1148 | |
| 1149 | 1149 | // Render the items. |
| 1150 | - $output .= '<div class="field-items"' . $variables['content_attributes'] . '>'; |
|
| 1150 | + $output .= '<div class="field-items"'.$variables['content_attributes'].'>'; |
|
| 1151 | 1151 | foreach ($variables['items'] as $delta => $item) { |
| 1152 | 1152 | if (isset($item['#type']) && $item['#type'] == 'link') { |
| 1153 | 1153 | if (strpos($item['#href'], '/subscribe')) { |
@@ -1158,13 +1158,13 @@ discard block |
||
| 1158 | 1158 | } |
| 1159 | 1159 | } |
| 1160 | 1160 | |
| 1161 | - $classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even'); |
|
| 1162 | - $output .= '<div class="' . $classes . '"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</div>'; |
|
| 1161 | + $classes = 'field-item '.($delta % 2 ? 'odd' : 'even'); |
|
| 1162 | + $output .= '<div class="'.$classes.'"'.$variables['item_attributes'][$delta].'>'.drupal_render($item).'</div>'; |
|
| 1163 | 1163 | } |
| 1164 | 1164 | $output .= '</div>'; |
| 1165 | 1165 | |
| 1166 | 1166 | // Render the top-level DIV. |
| 1167 | - $output = '<div class="' . $variables['classes'] . '"' . $variables['attributes'] . '>' . $output . '</div>'; |
|
| 1167 | + $output = '<div class="'.$variables['classes'].'"'.$variables['attributes'].'>'.$output.'</div>'; |
|
| 1168 | 1168 | |
| 1169 | 1169 | return $output; |
| 1170 | 1170 | } |
@@ -1176,7 +1176,7 @@ discard block |
||
| 1176 | 1176 | $output = ''; |
| 1177 | 1177 | |
| 1178 | 1178 | // Add Microformat classes to each address. |
| 1179 | - foreach($variables['items'] as &$address) { |
|
| 1179 | + foreach ($variables['items'] as &$address) { |
|
| 1180 | 1180 | // Only display an address if it has been populated. We determine this by |
| 1181 | 1181 | // validating that the administrative area has been populated. |
| 1182 | 1182 | if (!empty($address['#address']['administrative_area'])) { |
@@ -1190,19 +1190,19 @@ discard block |
||
| 1190 | 1190 | |
| 1191 | 1191 | // Render the label, if it's not hidden. |
| 1192 | 1192 | if (!$variables['label_hidden']) { |
| 1193 | - $output .= '<div class="field-label"' . $variables['title_attributes'] . '>' . $variables['label'] . ':</div> '; |
|
| 1193 | + $output .= '<div class="field-label"'.$variables['title_attributes'].'>'.$variables['label'].':</div> '; |
|
| 1194 | 1194 | } |
| 1195 | 1195 | |
| 1196 | 1196 | // Render the items. |
| 1197 | - $output .= '<div class="field-items"' . $variables['content_attributes'] . '>'; |
|
| 1197 | + $output .= '<div class="field-items"'.$variables['content_attributes'].'>'; |
|
| 1198 | 1198 | foreach ($variables['items'] as $delta => $item) { |
| 1199 | - $classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even'); |
|
| 1200 | - $output .= '<div class="' . $classes . '"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</div>'; |
|
| 1199 | + $classes = 'field-item '.($delta % 2 ? 'odd' : 'even'); |
|
| 1200 | + $output .= '<div class="'.$classes.'"'.$variables['item_attributes'][$delta].'>'.drupal_render($item).'</div>'; |
|
| 1201 | 1201 | } |
| 1202 | 1202 | $output .= '</div>'; |
| 1203 | 1203 | |
| 1204 | 1204 | // Render the top-level DIV. |
| 1205 | - $output = '<div class="' . $variables['classes'] . '"' . $variables['attributes'] . '>' . $output . '</div>'; |
|
| 1205 | + $output = '<div class="'.$variables['classes'].'"'.$variables['attributes'].'>'.$output.'</div>'; |
|
| 1206 | 1206 | |
| 1207 | 1207 | return $output; |
| 1208 | 1208 | } |
@@ -1260,7 +1260,7 @@ discard block |
||
| 1260 | 1260 | $variables['user_profile'][$action]['#access'] = FALSE; |
| 1261 | 1261 | } |
| 1262 | 1262 | } |
| 1263 | - if (!module_exists('commons_trusted_contacts') && isset( $variables['user_profile']['user_actions']['group_group'])) { |
|
| 1263 | + if (!module_exists('commons_trusted_contacts') && isset($variables['user_profile']['user_actions']['group_group'])) { |
|
| 1264 | 1264 | $variables['user_profile']['user_actions']['group_group']['#access'] = FALSE; |
| 1265 | 1265 | } |
| 1266 | 1266 | if (!empty($variables['user_profile']['user_actions'])) { |
@@ -1301,21 +1301,21 @@ discard block |
||
| 1301 | 1301 | |
| 1302 | 1302 | // Replace the submitted text on nodes with something a bit more pertinent to |
| 1303 | 1303 | // the content type. |
| 1304 | - if (variable_get('node_submitted_' . $node->type, TRUE)) { |
|
| 1304 | + if (variable_get('node_submitted_'.$node->type, TRUE)) { |
|
| 1305 | 1305 | $node_type_info = node_type_get_type($variables['node']); |
| 1306 | 1306 | $type_attributes = array('class' => array( |
| 1307 | 1307 | 'node-content-type', |
| 1308 | - drupal_html_class('node-content-type-' . $node->type), |
|
| 1308 | + drupal_html_class('node-content-type-'.$node->type), |
|
| 1309 | 1309 | )); |
| 1310 | 1310 | $placeholders = array( |
| 1311 | - '!type' => '<span' . drupal_attributes($type_attributes) . '>' . check_plain($node_type_info->name) . '</span>', |
|
| 1311 | + '!type' => '<span'.drupal_attributes($type_attributes).'>'.check_plain($node_type_info->name).'</span>', |
|
| 1312 | 1312 | '!user' => $variables['name'], |
| 1313 | 1313 | '!date' => $variables['date'], |
| 1314 | 1314 | '@interval' => format_interval(REQUEST_TIME - $node->created), |
| 1315 | 1315 | ); |
| 1316 | 1316 | // Show what group the content belongs to if applicable. |
| 1317 | 1317 | if (!empty($node->{OG_AUDIENCE_FIELD}) && $wrapper->{OG_AUDIENCE_FIELD}->count() == 1) { |
| 1318 | - $placeholders['!group'] = l($wrapper->{OG_AUDIENCE_FIELD}->get(0)->label(), 'node/' . $wrapper->{OG_AUDIENCE_FIELD}->get(0)->getIdentifier()); |
|
| 1318 | + $placeholders['!group'] = l($wrapper->{OG_AUDIENCE_FIELD}->get(0)->label(), 'node/'.$wrapper->{OG_AUDIENCE_FIELD}->get(0)->getIdentifier()); |
|
| 1319 | 1319 | if ($use_timeago_date_format == TRUE) { |
| 1320 | 1320 | $variables['submitted'] = t('!type created !date in the !group group by !user', $placeholders); |
| 1321 | 1321 | } |
@@ -1335,6 +1335,6 @@ discard block |
||
| 1335 | 1335 | |
| 1336 | 1336 | // Append a feature label to featured node teasers. |
| 1337 | 1337 | if ($variables['teaser'] && $variables['promote']) { |
| 1338 | - $variables['submitted'] .= ' <span class="featured-node-tooltip">' . t('Featured') . ' ' . $variables['type'] . '</span>'; |
|
| 1338 | + $variables['submitted'] .= ' <span class="featured-node-tooltip">'.t('Featured').' '.$variables['type'].'</span>'; |
|
| 1339 | 1339 | } |
| 1340 | 1340 | } |
@@ -33,8 +33,7 @@ |
||
| 33 | 33 | $permission = "create $bundle content"; |
| 34 | 34 | if ($group_id && !og_user_access('node', $group_id, $permission)) { |
| 35 | 35 | return; |
| 36 | - } |
|
| 37 | - elseif (!user_access($permission)) { |
|
| 36 | + } elseif (!user_access($permission)) { |
|
| 38 | 37 | return; |
| 39 | 38 | } |
| 40 | 39 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | // should be moved to this position from previously rendered form. |
| 43 | 43 | // See partial_node_form.js. |
| 44 | 44 | if (!empty($cache[$bundle])) { |
| 45 | - return '<div class="partial-node-form-placeholder" data-bundle="' . $bundle . '"></div>'; |
|
| 45 | + return '<div class="partial-node-form-placeholder" data-bundle="'.$bundle.'"></div>'; |
|
| 46 | 46 | } |
| 47 | 47 | $cache[$bundle] = TRUE; |
| 48 | 48 | |
@@ -118,11 +118,9 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | if(!empty($form_state['field'][$field_name][LANGUAGE_NONE]['instance']['display_in_partial_form'])) { |
| 120 | 120 | $display_default = $form_state['field'][$field_name][LANGUAGE_NONE]['instance']['display_in_partial_form']; |
| 121 | - } |
|
| 122 | - else if (isset($form_state['build_info']['args'][0]['display_in_partial_form'])) { |
|
| 121 | + } else if (isset($form_state['build_info']['args'][0]['display_in_partial_form'])) { |
|
| 123 | 122 | $display_default = $form_state['build_info']['args'][0]['display_in_partial_form']; |
| 124 | - } |
|
| 125 | - else { |
|
| 123 | + } else { |
|
| 126 | 124 | $display_default = FALSE; |
| 127 | 125 | } |
| 128 | 126 | |
@@ -174,13 +172,11 @@ discard block |
||
| 174 | 172 | if (module_exists('locale')) { |
| 175 | 173 | if (locale_multilingual_node_type($node->type)) { |
| 176 | 174 | $node->language = $language->language; |
| 177 | - } |
|
| 178 | - else { |
|
| 175 | + } else { |
|
| 179 | 176 | $default = language_default(); |
| 180 | 177 | $node->language = $default->language; |
| 181 | 178 | } |
| 182 | - } |
|
| 183 | - else { |
|
| 179 | + } else { |
|
| 184 | 180 | $node->language = LANGUAGE_NONE; |
| 185 | 181 | } |
| 186 | 182 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | if (!isset($node_types)) { |
| 48 | 48 | foreach (module_implements('node_info') as $module) { |
| 49 | - $node_types[$module] = call_user_func($module . '_node_info'); |
|
| 49 | + $node_types[$module] = call_user_func($module.'_node_info'); |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | function commons_bw_form_views_exposed_form_alter(&$form, &$form_state, $form_id) { |
| 97 | 97 | // Implements tweaks to exposed filters and sorts per the Commons designs. |
| 98 | - if (strpos($form['#id'],'views-exposed-form-commons-bw') === 0) { |
|
| 98 | + if (strpos($form['#id'], 'views-exposed-form-commons-bw') === 0) { |
|
| 99 | 99 | // Remove the sort order (eg, descending vs ascending). |
| 100 | 100 | $form['sort_order']['#access'] = FALSE; |
| 101 | 101 | $form['sort_by']['#title'] = t('Sorted by'); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | // See if we're building for the first time, or getting pre-saved values. |
| 117 | 117 | $field_name = $form['#field']['field_name']; |
| 118 | 118 | |
| 119 | - if(!empty($form_state['field'][$field_name][LANGUAGE_NONE]['instance']['display_in_partial_form'])) { |
|
| 119 | + if (!empty($form_state['field'][$field_name][LANGUAGE_NONE]['instance']['display_in_partial_form'])) { |
|
| 120 | 120 | $display_default = $form_state['field'][$field_name][LANGUAGE_NONE]['instance']['display_in_partial_form']; |
| 121 | 121 | } |
| 122 | 122 | else if (isset($form_state['build_info']['args'][0]['display_in_partial_form'])) { |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $instances = field_info_instances('node', $bundle); |
| 156 | 156 | |
| 157 | 157 | // Remove all fields except those marked as "display_in_partial_form". |
| 158 | - foreach($instances as $field_name => $instance) { |
|
| 158 | + foreach ($instances as $field_name => $instance) { |
|
| 159 | 159 | if (empty($instance['display_in_partial_form'])) { |
| 160 | 160 | unset($instances[$field_name]); |
| 161 | 161 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | field_attach_form('node', $node, $form, $form_state, entity_language('node', $node)); |
| 188 | 188 | |
| 189 | - foreach(element_children($form) as $field_name) { |
|
| 189 | + foreach (element_children($form) as $field_name) { |
|
| 190 | 190 | if (empty($instances[$field_name])) { |
| 191 | 191 | $form[$field_name]['#access'] = FALSE; |
| 192 | 192 | } |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | // Attach the browsing widget JS and give it a higher weight than |
| 231 | 231 | // quicktabs.js. |
| 232 | 232 | $form['#attached']['js'][] = array( |
| 233 | - 'data' => drupal_get_path('module', 'commons_bw') . '/js/partial_node_form.js', |
|
| 233 | + 'data' => drupal_get_path('module', 'commons_bw').'/js/partial_node_form.js', |
|
| 234 | 234 | 'type' => 'file', |
| 235 | 235 | 'weight' => 100, |
| 236 | 236 | ); |
@@ -238,13 +238,13 @@ discard block |
||
| 238 | 238 | // Add in some descriptive classes for css down the line. |
| 239 | 239 | $form['#attributes']['class'][] = 'node'; |
| 240 | 240 | $form['#attributes']['class'][] = 'commons-bw-partial-node-form'; |
| 241 | - $form['#attributes']['class'][] = 'commons-bw-partial-node-form-' . $bundle; |
|
| 241 | + $form['#attributes']['class'][] = 'commons-bw-partial-node-form-'.$bundle; |
|
| 242 | 242 | |
| 243 | 243 | // Add a link to the full node form. |
| 244 | 244 | $form['full_form'] = array( |
| 245 | 245 | '#theme' => 'link', |
| 246 | 246 | '#text' => t('Go to full form'), |
| 247 | - '#path' => 'node/add/' . str_replace('_', '-', $bundle), |
|
| 247 | + '#path' => 'node/add/'.str_replace('_', '-', $bundle), |
|
| 248 | 248 | '#options' => array( |
| 249 | 249 | 'attributes' => array('class' => array('full-form')), |
| 250 | 250 | 'html' => FALSE, |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | * An array of return values of the hook implementations. |
| 357 | 357 | */ |
| 358 | 358 | function commons_bw_get_tab_definitions($widget_type = 'group') { |
| 359 | - $hook_name = 'commons_bw_' . $widget_type . '_widget'; |
|
| 359 | + $hook_name = 'commons_bw_'.$widget_type.'_widget'; |
|
| 360 | 360 | |
| 361 | 361 | $tabs = module_invoke_all($hook_name); |
| 362 | 362 | |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | uasort($items, 'element_sort'); |
| 400 | 400 | |
| 401 | 401 | foreach ($items as $module => $item) { |
| 402 | - $links[] = $item['link'] . ' ' . $item['text']; |
|
| 402 | + $links[] = $item['link'].' '.$item['text']; |
|
| 403 | 403 | |
| 404 | 404 | // Populate the default content creation link. |
| 405 | 405 | if (isset($item['default']) && $item['default']) { |
@@ -410,10 +410,10 @@ discard block |
||
| 410 | 410 | $output = ''; |
| 411 | 411 | |
| 412 | 412 | if (!empty($default)) { |
| 413 | - $output .= $default['link'] . '<a class="commons-bw-create-choose"><span></span></a>'; |
|
| 413 | + $output .= $default['link'].'<a class="commons-bw-create-choose"><span></span></a>'; |
|
| 414 | 414 | } |
| 415 | 415 | |
| 416 | - $output .= '<div class="commons-bw-create-choose-bg"></div><div class="commons-bw-create-choose-holder">' . theme('item_list', array('items' => $links, 'type' => 'ul', 'attributes' => array('class' => 'commons-bw-create-all-widget-types'))) . '</div>'; |
|
| 416 | + $output .= '<div class="commons-bw-create-choose-bg"></div><div class="commons-bw-create-choose-holder">'.theme('item_list', array('items' => $links, 'type' => 'ul', 'attributes' => array('class' => 'commons-bw-create-all-widget-types'))).'</div>'; |
|
| 417 | 417 | |
| 418 | 418 | return $output; |
| 419 | 419 | } |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | $view->execute(); |
| 464 | 464 | |
| 465 | 465 | // Append the result count to the tab title. |
| 466 | - $tabs[$machine_name]['title'] = $tabs[$machine_name]['title'] . ' <span class="commons-bw-result-count">'. $view->total_rows . '</span>'; |
|
| 466 | + $tabs[$machine_name]['title'] = $tabs[$machine_name]['title'].' <span class="commons-bw-result-count">'.$view->total_rows.'</span>'; |
|
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | // Use the current tab as the quicktabs default if the tab settings specify. |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | $path = drupal_get_path('module', 'commons_bw'); |
| 483 | 483 | |
| 484 | 484 | return array( |
| 485 | - $path . '/plugins/quicktabs_styles/commons_pills/commons_pills.css' => t('Commons Pills'), |
|
| 486 | - $path . '/plugins/quicktabs_styles/commons_tabs/commons_tabs.css' => t('Commons Tabs'), |
|
| 485 | + $path.'/plugins/quicktabs_styles/commons_pills/commons_pills.css' => t('Commons Pills'), |
|
| 486 | + $path.'/plugins/quicktabs_styles/commons_tabs/commons_tabs.css' => t('Commons Tabs'), |
|
| 487 | 487 | ); |
| 488 | 488 | } |
@@ -44,8 +44,7 @@ discard block |
||
| 44 | 44 | // We're using faceted core search, so change Site search key to reflect |
| 45 | 45 | // the change of search engines. |
| 46 | 46 | $site_key = 'o-search_facetapi'; |
| 47 | - } |
|
| 48 | - else { |
|
| 47 | + } else { |
|
| 49 | 48 | if (module_exists('apachesolr_search')) { |
| 50 | 49 | // Are we using Apache Solr? If so change the Site search key to reflect |
| 51 | 50 | // the change of search engines. |
@@ -106,14 +105,12 @@ discard block |
||
| 106 | 105 | // specified group. |
| 107 | 106 | $qm = (strpos($form_state['redirect'], '?') !== FALSE ? '' : '?'); |
| 108 | 107 | $form_state['redirect'] .= $qm . '&f[1]=sm_og_group_ref:node:' . $form_state['search_group_id']; |
| 109 | - } |
|
| 110 | - else { |
|
| 108 | + } else { |
|
| 111 | 109 | // Using core search to search within a group doesn't work, so we simply |
| 112 | 110 | // use a view with exposed search terms to do the searching. |
| 113 | 111 | drupal_goto('search/group/' . $form_state['search_group_id'], array('query' => array('keys' => $keys))); |
| 114 | 112 | } |
| 115 | - } |
|
| 116 | - else { |
|
| 113 | + } else { |
|
| 117 | 114 | if ($form_state['values']['custom_search_types'] == 'c-user') { |
| 118 | 115 | // Force update the redirect on User search since Custom Search is weird. |
| 119 | 116 | $keys = check_plain($form_state['values']['search_block_form']); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $keys = arg(2); |
| 88 | 88 | if (!module_exists('commons_search_solr') && !empty($keys)) { |
| 89 | 89 | // Remove the search keys from the form action only if we're using core search. |
| 90 | - $form['#action'] = str_replace("/" . check_plain(arg(2)), '', $form['#action']); |
|
| 90 | + $form['#action'] = str_replace("/".check_plain(arg(2)), '', $form['#action']); |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | } |
@@ -105,19 +105,19 @@ discard block |
||
| 105 | 105 | // Add on a filter to the solr query to only list results within the |
| 106 | 106 | // specified group. |
| 107 | 107 | $qm = (strpos($form_state['redirect'], '?') !== FALSE ? '' : '?'); |
| 108 | - $form_state['redirect'] .= $qm . '&f[1]=sm_og_group_ref:node:' . $form_state['search_group_id']; |
|
| 108 | + $form_state['redirect'] .= $qm.'&f[1]=sm_og_group_ref:node:'.$form_state['search_group_id']; |
|
| 109 | 109 | } |
| 110 | 110 | else { |
| 111 | 111 | // Using core search to search within a group doesn't work, so we simply |
| 112 | 112 | // use a view with exposed search terms to do the searching. |
| 113 | - drupal_goto('search/group/' . $form_state['search_group_id'], array('query' => array('keys' => $keys))); |
|
| 113 | + drupal_goto('search/group/'.$form_state['search_group_id'], array('query' => array('keys' => $keys))); |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | else { |
| 117 | 117 | if ($form_state['values']['custom_search_types'] == 'c-user') { |
| 118 | 118 | // Force update the redirect on User search since Custom Search is weird. |
| 119 | 119 | $keys = check_plain($form_state['values']['search_block_form']); |
| 120 | - $form_state['redirect'] = 'search/user/' . $keys; |
|
| 120 | + $form_state['redirect'] = 'search/user/'.$keys; |
|
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | && preg_match('/sm_og_group_ref:"node:([0-9]+)"&/', urldecode($variables['response']->request), $match) |
| 135 | 135 | ) { |
| 136 | 136 | $group = node_load($match[1]); |
| 137 | - $title = t('Search within !group', array('!group' => '<em>' . $group->title . '</em>')); |
|
| 137 | + $title = t('Search within !group', array('!group' => '<em>'.$group->title.'</em>')); |
|
| 138 | 138 | $variables['title'] = $title; |
| 139 | 139 | } |
| 140 | 140 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | $commons_groups_entity_types = commons_topics_get_entity_types_with_topics(); |
| 15 | 15 | if (!empty($commons_groups_entity_types)) { |
| 16 | 16 | foreach ($commons_groups_entity_types as $entity_type => $bundles) { |
| 17 | - foreach(array_keys($bundles) as $bundle) { |
|
| 17 | + foreach (array_keys($bundles) as $bundle) { |
|
| 18 | 18 | commons_topics_field_definition($field_instances, $entity_type, $bundle); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | function commons_posts_commons_bw_create_all_widget($group) { |
| 41 | 41 | if (og_user_access('node', $group->nid, 'create post content')) { |
| 42 | - $link = l(t('Create a post'),'node/add/post', |
|
| 42 | + $link = l(t('Create a post'), 'node/add/post', |
|
| 43 | 43 | array('attributes' => array('class' => 'commons-posts-create'), 'query' => array('og_group_ref' => $group->nid)) |
| 44 | 44 | ); |
| 45 | 45 | return array( |
@@ -71,8 +71,7 @@ discard block |
||
| 71 | 71 | set, an administrator can dismiss the update notice.") . '</p>'; |
| 72 | 72 | if ($path == 'admin/content/groups/update') { |
| 73 | 73 | return $message; |
| 74 | - } |
|
| 75 | - elseif ($arg[0] == 'node' && $arg[2] == 'edit') { |
|
| 74 | + } elseif ($arg[0] == 'node' && $arg[2] == 'edit') { |
|
| 76 | 75 | $node = menu_get_object(); |
| 77 | 76 | if($node->type == 'group' && empty($node->field_og_subscribe_settings)) { |
| 78 | 77 | return $message; |
@@ -178,11 +177,9 @@ discard block |
||
| 178 | 177 | |
| 179 | 178 | if (!empty($permissions['subscribe without approval'])) { |
| 180 | 179 | $subscribe_type = 'anyone'; |
| 181 | - } |
|
| 182 | - elseif (!empty($permissions['subscribe'])) { |
|
| 180 | + } elseif (!empty($permissions['subscribe'])) { |
|
| 183 | 181 | $subscribe_type = 'approval'; |
| 184 | - } |
|
| 185 | - else { |
|
| 182 | + } else { |
|
| 186 | 183 | $subscribe_type = 'invitation'; |
| 187 | 184 | } |
| 188 | 185 | |
@@ -313,8 +310,7 @@ discard block |
||
| 313 | 310 | $topics_text .= '!topic-' . $topic->tid; |
| 314 | 311 | if ($topic == end($topics)) { |
| 315 | 312 | $topics_text .= '.'; |
| 316 | - } |
|
| 317 | - else { |
|
| 313 | + } else { |
|
| 318 | 314 | $topics_text .= ', '; |
| 319 | 315 | } |
| 320 | 316 | $t_args['!topic-' . $topic->tid] = l(t($topic->name), 'taxonomy/term/' . $topic->tid); |
@@ -971,8 +967,7 @@ discard block |
||
| 971 | 967 | if (!empty($account->picture->uri)) { |
| 972 | 968 | $filepath = $account->picture->uri; |
| 973 | 969 | } |
| 974 | - } |
|
| 975 | - elseif (variable_get('user_picture_default', '')) { |
|
| 970 | + } elseif (variable_get('user_picture_default', '')) { |
|
| 976 | 971 | $filepath = variable_get('user_picture_default', ''); |
| 977 | 972 | } |
| 978 | 973 | |
@@ -1099,8 +1094,7 @@ discard block |
||
| 1099 | 1094 | $links['href'] = "group/$entity_type/$id/unsubscribe"; |
| 1100 | 1095 | } |
| 1101 | 1096 | } |
| 1102 | - } |
|
| 1103 | - else { |
|
| 1097 | + } else { |
|
| 1104 | 1098 | // Check if user can subscribe to the field. |
| 1105 | 1099 | if (empty($settings['field_name']) && $audience_field_name = og_get_best_group_audience_field('user', $account, $entity_type, $bundle)) { |
| 1106 | 1100 | $settings['field_name'] = $audience_field_name; |
@@ -1147,13 +1141,11 @@ discard block |
||
| 1147 | 1141 | $links['title'] = t('Join group'); |
| 1148 | 1142 | if ($account->uid) { |
| 1149 | 1143 | $links['href'] = $url; |
| 1150 | - } |
|
| 1151 | - else { |
|
| 1144 | + } else { |
|
| 1152 | 1145 | $links['href'] = 'user/login'; |
| 1153 | 1146 | $links['options'] = array('query' => array('destination' => $url)); |
| 1154 | 1147 | } |
| 1155 | - } |
|
| 1156 | - else { |
|
| 1148 | + } else { |
|
| 1157 | 1149 | $element[0] = array('#markup' => '<div class="subscription-type">' . t('Invite-only group') . '</div>'); |
| 1158 | 1150 | return $element; |
| 1159 | 1151 | } |
@@ -1228,8 +1220,7 @@ discard block |
||
| 1228 | 1220 | foreach ($roles as $rid => $rolename) { |
| 1229 | 1221 | if (in_array($rolename, $details['roles'])) { |
| 1230 | 1222 | $grant[$rid][] = $perm; |
| 1231 | - } |
|
| 1232 | - else { |
|
| 1223 | + } else { |
|
| 1233 | 1224 | $revoke[$rid][] = $perm; |
| 1234 | 1225 | } |
| 1235 | 1226 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $hidden_permissions = array('subscribe', 'subscribe without approval'); |
| 29 | 29 | foreach ($hidden_permissions as $permission) { |
| 30 | 30 | if (isset($form['permission'][$permission])) { |
| 31 | - $form['permission'][$permission]['#markup'] .= ' ' . t('<strong>Disabled by the Commons Groups module.<strong>'); |
|
| 31 | + $form['permission'][$permission]['#markup'] .= ' '.t('<strong>Disabled by the Commons Groups module.<strong>'); |
|
| 32 | 32 | } |
| 33 | 33 | foreach ($form['checkboxes'] as $index => $elements) { |
| 34 | 34 | if (isset($elements['#options'][$permission])) { |
@@ -67,14 +67,14 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | function commons_groups_help($path, $arg) { |
| 69 | 69 | if (variable_get('commons_groups_needs_update', FALSE)) { |
| 70 | - $message = '<p>' . t("Drupal Commons 3.3 added a new, required field to control group privacy. Please edit your group(s) select one of the privacy options. Once all groups are |
|
| 71 | - set, an administrator can dismiss the update notice.") . '</p>'; |
|
| 70 | + $message = '<p>'.t("Drupal Commons 3.3 added a new, required field to control group privacy. Please edit your group(s) select one of the privacy options. Once all groups are |
|
| 71 | + set, an administrator can dismiss the update notice.").'</p>'; |
|
| 72 | 72 | if ($path == 'admin/content/groups/update') { |
| 73 | 73 | return $message; |
| 74 | 74 | } |
| 75 | 75 | elseif ($arg[0] == 'node' && $arg[2] == 'edit') { |
| 76 | 76 | $node = menu_get_object(); |
| 77 | - if($node->type == 'group' && empty($node->field_og_subscribe_settings)) { |
|
| 77 | + if ($node->type == 'group' && empty($node->field_og_subscribe_settings)) { |
|
| 78 | 78 | return $message; |
| 79 | 79 | } |
| 80 | 80 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $breadcrumb[] = l(t('Groups'), 'groups'); |
| 98 | 98 | $group = node_load($entity->og_group_ref[LANGUAGE_NONE][0]['target_id']); |
| 99 | 99 | if (node_access('view', $group)) { |
| 100 | - $breadcrumb[] = l($group->title, 'node/' . $group->nid); |
|
| 100 | + $breadcrumb[] = l($group->title, 'node/'.$group->nid); |
|
| 101 | 101 | } |
| 102 | 102 | drupal_set_breadcrumb($breadcrumb); |
| 103 | 103 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | function commons_groups_form_node_form_alter(&$form, &$form_state, $form_id) { |
| 110 | 110 | $node = $form['#node']; |
| 111 | 111 | |
| 112 | - list(, , $bundle) = entity_extract_ids('node', $node); |
|
| 112 | + list(,, $bundle) = entity_extract_ids('node', $node); |
|
| 113 | 113 | |
| 114 | 114 | // Customizations to the node form for entities that are group content. |
| 115 | 115 | $group_content_entity_types = commons_groups_get_group_content_entity_types(); |
@@ -135,14 +135,14 @@ discard block |
||
| 135 | 135 | // is selected. |
| 136 | 136 | $form['field_og_access_default_value']['#states'] = array( |
| 137 | 137 | 'visible' => array( |
| 138 | - ':input[name="field_og_subscribe_settings[' . LANGUAGE_NONE . ']"]' => array('value' => 'approval'), |
|
| 138 | + ':input[name="field_og_subscribe_settings['.LANGUAGE_NONE.']"]' => array('value' => 'approval'), |
|
| 139 | 139 | ), |
| 140 | 140 | ); |
| 141 | 141 | |
| 142 | 142 | $form['#after_build'] = array('commons_groups_form_group_node_after_build'); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - $form['#attached']['css'][] = drupal_get_path('module', 'commons_groups') . '/css/commons_groups.css'; |
|
| 145 | + $form['#attached']['css'][] = drupal_get_path('module', 'commons_groups').'/css/commons_groups.css'; |
|
| 146 | 146 | |
| 147 | 147 | // The group access is set on commons_groups_node_presave(). |
| 148 | 148 | $form['group_access'][LANGUAGE_NONE]['#required'] = FALSE; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | return ''; |
| 300 | 300 | } |
| 301 | 301 | $contributors_count = $view->total_rows; |
| 302 | - $output .= l(format_plural($contributors_count, '1 contributor', '@count contributors'), 'node/' . $group->nid . '/contributors'); |
|
| 302 | + $output .= l(format_plural($contributors_count, '1 contributor', '@count contributors'), 'node/'.$group->nid.'/contributors'); |
|
| 303 | 303 | } |
| 304 | 304 | // Format the list of topics: |
| 305 | 305 | if (!empty($group->field_topics[LANGUAGE_NONE])) { |
@@ -310,14 +310,14 @@ discard block |
||
| 310 | 310 | $topics_text = ' discussing the @topics '; |
| 311 | 311 | $t_args = array('@topics' => format_plural(count($topics), 'topic', 'topics')); |
| 312 | 312 | foreach ($topics as $topic) { |
| 313 | - $topics_text .= '!topic-' . $topic->tid; |
|
| 313 | + $topics_text .= '!topic-'.$topic->tid; |
|
| 314 | 314 | if ($topic == end($topics)) { |
| 315 | 315 | $topics_text .= '.'; |
| 316 | 316 | } |
| 317 | 317 | else { |
| 318 | 318 | $topics_text .= ', '; |
| 319 | 319 | } |
| 320 | - $t_args['!topic-' . $topic->tid] = l(t($topic->name), 'taxonomy/term/' . $topic->tid); |
|
| 320 | + $t_args['!topic-'.$topic->tid] = l(t($topic->name), 'taxonomy/term/'.$topic->tid); |
|
| 321 | 321 | } |
| 322 | 322 | $output .= t($topics_text, $t_args); |
| 323 | 323 | } |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | if ($form_id == 'edit_profile_user_profile_form' || substr($form_id, -10) === '_node_form') { |
| 362 | 362 | $internal_fields = array('field_unread_invitations', 'field_unread_messages', 'user_trusted_contacts', 'og_user_group_ref', 'group_access'); |
| 363 | 363 | foreach ($internal_fields as $field_name) { |
| 364 | - if(isset($form[$field_name])) { |
|
| 364 | + if (isset($form[$field_name])) { |
|
| 365 | 365 | $form[$field_name]['#access'] = FALSE; |
| 366 | 366 | } |
| 367 | 367 | } |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | function commons_groups_node_in_group_submit(&$form, &$form_state) { |
| 382 | 382 | if (isset($form_state['values']['og_group_ref'][LANGUAGE_NONE][0])) { |
| 383 | 383 | $group = $form_state['values']['og_group_ref'][LANGUAGE_NONE][0]['target_id']; |
| 384 | - $form_state['redirect'] = 'node/' . $group; |
|
| 384 | + $form_state['redirect'] = 'node/'.$group; |
|
| 385 | 385 | } |
| 386 | 386 | } |
| 387 | 387 | |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | |
| 455 | 455 | if (!isset($commons_entity_integrations)) { |
| 456 | 456 | foreach (module_implements('commons_entity_integration') as $module) { |
| 457 | - $commons_entity_integrations[$module] = call_user_func($module . '_commons_entity_integration'); |
|
| 457 | + $commons_entity_integrations[$module] = call_user_func($module.'_commons_entity_integration'); |
|
| 458 | 458 | } |
| 459 | 459 | } |
| 460 | 460 | |
@@ -647,14 +647,14 @@ discard block |
||
| 647 | 647 | function commons_groups_related_groups_text($related_groups) { |
| 648 | 648 | // In 1 group: "in the x group" |
| 649 | 649 | if (count($related_groups) == 1) { |
| 650 | - return t(' in the !group group', array('!group' => l($related_groups[0]->title, 'node/' . $related_groups[0]->nid))); |
|
| 650 | + return t(' in the !group group', array('!group' => l($related_groups[0]->title, 'node/'.$related_groups[0]->nid))); |
|
| 651 | 651 | } |
| 652 | 652 | |
| 653 | 653 | // In 2 groups: "in the x and y groups" |
| 654 | 654 | if (count($related_groups) == 2) { |
| 655 | 655 | return t(' in the !group-0 and !group-1 groups', array( |
| 656 | - '!group-0' => l($related_groups[0]->title, 'node/' . $related_groups[0]->nid), |
|
| 657 | - '!group-1' => l($related_groups[1]->title, 'node/' . $related_groups[1]->nid), |
|
| 656 | + '!group-0' => l($related_groups[0]->title, 'node/'.$related_groups[0]->nid), |
|
| 657 | + '!group-1' => l($related_groups[1]->title, 'node/'.$related_groups[1]->nid), |
|
| 658 | 658 | )); |
| 659 | 659 | } |
| 660 | 660 | |
@@ -666,11 +666,11 @@ discard block |
||
| 666 | 666 | // Prepare tokens for t() for each of the other groups. |
| 667 | 667 | foreach ($related_groups as $key => $this_group) { |
| 668 | 668 | $text .= "!group-$key, "; |
| 669 | - $t_args["!group-$key"] = l($this_group->title, 'node/' . $this_group->nid); |
|
| 669 | + $t_args["!group-$key"] = l($this_group->title, 'node/'.$this_group->nid); |
|
| 670 | 670 | } |
| 671 | 671 | // Prepare the last group token. |
| 672 | 672 | $text .= " and !group-$last_group->nid groups."; |
| 673 | - $t_args["!group-$last_group->nid"] = l($last_group->title, 'node/' . $last_group->nid); |
|
| 673 | + $t_args["!group-$last_group->nid"] = l($last_group->title, 'node/'.$last_group->nid); |
|
| 674 | 674 | // Prepare the full text with all of the groups and their tokens: |
| 675 | 675 | return t($text, $t_args); |
| 676 | 676 | } |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | // Determine whether the group is private according to the subscription |
| 754 | 754 | // field. |
| 755 | 755 | $private = $wrapper->field_og_subscribe_settings->value() == 'invitation'; |
| 756 | - $wrapper->{OG_ACCESS_FIELD}->set((int)$private); |
|
| 756 | + $wrapper->{OG_ACCESS_FIELD}->set((int) $private); |
|
| 757 | 757 | return; |
| 758 | 758 | } |
| 759 | 759 | |
@@ -988,7 +988,7 @@ discard block |
||
| 988 | 988 | 'alt' => $alt, |
| 989 | 989 | ), |
| 990 | 990 | '#path' => array( |
| 991 | - 'path' => 'user/' . $account->uid, |
|
| 991 | + 'path' => 'user/'.$account->uid, |
|
| 992 | 992 | 'options' => array( |
| 993 | 993 | 'attributes' => array( |
| 994 | 994 | 'title' => t("View @user's profile.", array('@user' => format_username($account))), |
@@ -1073,12 +1073,12 @@ discard block |
||
| 1073 | 1073 | return $element; |
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | - list($id, , $bundle) = entity_extract_ids($entity_type, $entity); |
|
| 1076 | + list($id,, $bundle) = entity_extract_ids($entity_type, $entity); |
|
| 1077 | 1077 | |
| 1078 | 1078 | // The user has a pending membership request. Let her know that |
| 1079 | 1079 | // her request is pending review. |
| 1080 | 1080 | if (og_is_member($entity_type, $id, 'user', $account, array(OG_STATE_PENDING))) { |
| 1081 | - $element[0] = array('#markup' => '<div class="subscription-type">' . t('Your membership request is pending review by a group organizer.') . '</div>'); |
|
| 1081 | + $element[0] = array('#markup' => '<div class="subscription-type">'.t('Your membership request is pending review by a group organizer.').'</div>'); |
|
| 1082 | 1082 | return $element; |
| 1083 | 1083 | } |
| 1084 | 1084 | // If user is blocked, they should not be able to apply for membership. |
@@ -1128,7 +1128,7 @@ discard block |
||
| 1128 | 1128 | |
| 1129 | 1129 | $url = "group/$entity_type/$id/subscribe"; |
| 1130 | 1130 | if ($settings['field_name']) { |
| 1131 | - $url .= '/' . $settings['field_name']; |
|
| 1131 | + $url .= '/'.$settings['field_name']; |
|
| 1132 | 1132 | } |
| 1133 | 1133 | // Set the needs update hook if we end up with a group call that is missing |
| 1134 | 1134 | // the subscribe settings. We also check the variable first, because we |
@@ -1154,7 +1154,7 @@ discard block |
||
| 1154 | 1154 | } |
| 1155 | 1155 | } |
| 1156 | 1156 | else { |
| 1157 | - $element[0] = array('#markup' => '<div class="subscription-type">' . t('Invite-only group') . '</div>'); |
|
| 1157 | + $element[0] = array('#markup' => '<div class="subscription-type">'.t('Invite-only group').'</div>'); |
|
| 1158 | 1158 | return $element; |
| 1159 | 1159 | } |
| 1160 | 1160 | } |
@@ -1170,7 +1170,7 @@ discard block |
||
| 1170 | 1170 | ); |
| 1171 | 1171 | |
| 1172 | 1172 | if (!empty($subscription_type)) { |
| 1173 | - $element[0]['#prefix'] = '<div class="subscription-type">' . $subscription_type . '</div>'; |
|
| 1173 | + $element[0]['#prefix'] = '<div class="subscription-type">'.$subscription_type.'</div>'; |
|
| 1174 | 1174 | } |
| 1175 | 1175 | |
| 1176 | 1176 | return $element; |
@@ -130,10 +130,10 @@ |
||
| 130 | 130 | function commons_activity_streams_existing_messages($acting_uid, $target_ids, $target_field, $message_type) { |
| 131 | 131 | $query = new EntityFieldQuery(); |
| 132 | 132 | $query->entityCondition('entity_type', 'message', '=') |
| 133 | - ->propertyCondition('uid', $acting_uid) |
|
| 134 | - ->propertyCondition('type', $message_type, '=') |
|
| 135 | - ->fieldCondition($target_field, 'target_id', $target_ids, 'IN') |
|
| 136 | - ->execute(); |
|
| 133 | + ->propertyCondition('uid', $acting_uid) |
|
| 134 | + ->propertyCondition('type', $message_type, '=') |
|
| 135 | + ->fieldCondition($target_field, 'target_id', $target_ids, 'IN') |
|
| 136 | + ->execute(); |
|
| 137 | 137 | |
| 138 | 138 | if (!empty($query->ordered_results)) { |
| 139 | 139 | $mids = array(); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | if (!empty($query->ordered_results)) { |
| 139 | 139 | $mids = array(); |
| 140 | - foreach($query->ordered_results as $result) { |
|
| 140 | + foreach ($query->ordered_results as $result) { |
|
| 141 | 141 | $mids[] = $result->entity_id; |
| 142 | 142 | } |
| 143 | 143 | return $mids; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | // Create a token to retrieve the user picture formatted using any of the |
| 225 | 225 | // currently defined image styles. |
| 226 | 226 | foreach ($styles as $style_name => $style) { |
| 227 | - $tokens['picture:' . $style_name] = array( |
|
| 227 | + $tokens['picture:'.$style_name] = array( |
|
| 228 | 228 | 'name' => t('Picture: @st image style', array('@st' => $style_name)), |
| 229 | 229 | 'description' => t('Picture: @st image style', array('@st' => $style_name)), |
| 230 | 230 | ); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | |
| 253 | 253 | foreach ($tokens as $token => $original) { |
| 254 | 254 | if (strpos($token, 'picture:') !== FALSE) { |
| 255 | - list( , $style) = explode(':', $token); |
|
| 255 | + list(, $style) = explode(':', $token); |
|
| 256 | 256 | |
| 257 | 257 | // Prefer unique account pictures but fall back to the default user |
| 258 | 258 | // picture if necessary. |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | 'html' => TRUE, |
| 276 | 276 | ); |
| 277 | 277 | |
| 278 | - $replacements[$original] = "<div class='user-picture'>" . l($image, $user_path['path'], $link_options) . "</div>"; |
|
| 278 | + $replacements[$original] = "<div class='user-picture'>".l($image, $user_path['path'], $link_options)."</div>"; |
|
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | 'title' => t('User Follow'), // The item it appears as on the UI, |
| 29 | 29 | 'help' => t('Whether the user is following this content.'), // The help that appears on the UI, |
| 30 | 30 | 'real field' => 'nid', |
| 31 | - // Information for displaying a title as a field |
|
| 31 | + // Information for displaying a title as a field |
|
| 32 | 32 | 'filter' => array( |
| 33 | 33 | 'handler' => 'commons_follow_user_follow_filter', |
| 34 | 34 | 'label' => t('Following'), |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | 'title' => t('User Follow'), // The item it appears as on the UI, |
| 41 | 41 | 'help' => t('Whether the user is following items related to this message.'), // The help that appears on the UI, |
| 42 | 42 | 'real field' => 'mid', |
| 43 | - // Information for displaying a title as a field |
|
| 43 | + // Information for displaying a title as a field |
|
| 44 | 44 | 'filter' => array( |
| 45 | 45 | 'handler' => 'commons_follow_user_follow_filter_message', |
| 46 | 46 | 'label' => t('Following'), |