@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | $url = privatemsg_get_link($account); |
26 | 26 | if (!empty($url)) { |
27 | - $variables['privatemsg'] = l('<span>' . t('Send PM') . '</span>', $url, array('attributes' => array('class' => 'author-pane-link', 'title' => t('Send @name a private message', array('@name' => $account_name))), 'html' => TRUE)); |
|
27 | + $variables['privatemsg'] = l('<span>'.t('Send PM').'</span>', $url, array('attributes' => array('class' => 'author-pane-link', 'title' => t('Send @name a private message', array('@name' => $account_name))), 'html' => TRUE)); |
|
28 | 28 | |
29 | 29 | // Early versions of the template used this variable so fill it for |
30 | 30 | // backwards compatability. |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } |
66 | 66 | $count = 0; // This lets us prepare the key as we want it printed. |
67 | 67 | foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) { |
68 | - $options[t('Arguments')]['%' . ++$count] = $handler->ui_name(); |
|
68 | + $options[t('Arguments')]['%'.++$count] = $handler->ui_name(); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $items = array(); |
80 | 80 | $title = t(ucwords($type)); |
81 | 81 | foreach ($options[$type] as $key => $value) { |
82 | - $items[] = $key .' == '. $value; |
|
82 | + $items[] = $key.' == '.$value; |
|
83 | 83 | } |
84 | 84 | $output .= theme('item_list', $items, $title); |
85 | 85 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $form['help'] = array( |
90 | 90 | '#type' => 'markup', |
91 | 91 | '#id' => 'views-tokens-help', |
92 | - '#value' => '<div><fieldset id="views-tokens-help"><legend>' . t('Replacement patterns') . '</legend>' . $output . '</fieldset></div>', |
|
92 | + '#value' => '<div><fieldset id="views-tokens-help"><legend>'.t('Replacement patterns').'</legend>'.$output.'</fieldset></div>', |
|
93 | 93 | ); |
94 | 94 | |
95 | 95 | $form['return'] = array( |
@@ -24,7 +24,7 @@ |
||
24 | 24 | function privatemsg_views_handlers() { |
25 | 25 | return array( |
26 | 26 | 'info' => array( |
27 | - 'path' => drupal_get_path('module', 'privatemsg') . '/views', |
|
27 | + 'path' => drupal_get_path('module', 'privatemsg').'/views', |
|
28 | 28 | ), |
29 | 29 | 'handlers' => array( |
30 | 30 | // field handlers |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | function hook_privatemsg_message_view_alter(&$var) { |
344 | 344 | // add a link to each message |
345 | - $vars['message_links'][] = array('title' => t('My link'), 'href' => '/path/to/my/action/'. $vars['message']['mid']); |
|
345 | + $vars['message_links'][] = array('title' => t('My link'), 'href' => '/path/to/my/action/'.$vars['message']['mid']); |
|
346 | 346 | } |
347 | 347 | |
348 | 348 | /** |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | } |
407 | 407 | |
408 | 408 | $args = array_merge(array($author->uid), array_keys($recipients)); |
409 | - $result = db_query('SELECT recipient FROM {pm_block_user} WHERE author = %d AND recipient IN ('. db_placeholders($recipients) .') GROUP BY recipient', $args); |
|
409 | + $result = db_query('SELECT recipient FROM {pm_block_user} WHERE author = %d AND recipient IN ('.db_placeholders($recipients).') GROUP BY recipient', $args); |
|
410 | 410 | while ($row = db_fetch_array($result)) { |
411 | 411 | $recipient = $recipients[$row['recipient']]; |
412 | 412 | // If there's a rule disallowing blocking of this message, send it anyway. |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | should be displayed automatically in the action form', |
459 | 459 | 'callback' => 'privatemsg_thread_change_status', // Function callback that will be executed. |
460 | 460 | 'callback arguments' => array('status' => PRIVATEMSG_READ), // Additional arguments to above function |
461 | - 'undo callback' => 'privatemsg_thread_change_status', // Provide a function which can "undo" the operation. Optional. |
|
461 | + 'undo callback' => 'privatemsg_thread_change_status', // Provide a function which can "undo" the operation. Optional. |
|
462 | 462 | 'undo callback arguments' => array('status' => PRIVATEMSG_UNREAD), // Additional arguments to above function. |
463 | 463 | ), |
464 | 464 | ); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | ), |
39 | 39 | ); |
40 | 40 | $query = _privatemsg_assemble_query(array('tags', 'privatemsg_filter')); |
41 | - $result = pager_query($query['query'] . tablesort_sql($header), 100); |
|
41 | + $result = pager_query($query['query'].tablesort_sql($header), 100); |
|
42 | 42 | |
43 | 43 | $rows = array(); |
44 | 44 | while ($tag = db_fetch_array($result)) { |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | $row['tag'] = check_plain($tag['tag']); |
47 | 47 | $row['count'] = $tag['count']; |
48 | 48 | $row['public'] = $tag['public'] ? t('Yes') : '-'; |
49 | - $row['operations'] = l(t('edit'), 'admin/settings/messages/tags/edit/' . $tag['tag_id']); |
|
50 | - $row['operations'] .= ' ' . l(t('delete'), 'admin/settings/messages/tags/delete/' . $tag['tag_id']); |
|
49 | + $row['operations'] = l(t('edit'), 'admin/settings/messages/tags/edit/'.$tag['tag_id']); |
|
50 | + $row['operations'] .= ' '.l(t('delete'), 'admin/settings/messages/tags/delete/'.$tag['tag_id']); |
|
51 | 51 | |
52 | 52 | $rows[] = $row; |
53 | 53 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $rows[] = array(array('data' => t('No tags available.'), 'colspan' => count($header))); |
58 | 58 | } |
59 | 59 | |
60 | - return theme('table', $header, $rows) . theme('pager'); |
|
60 | + return theme('table', $header, $rows).theme('pager'); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | |
314 | 314 | function privatemsg_filter_dropdown(&$form_state, $account) { |
315 | 315 | |
316 | - drupal_add_css(drupal_get_path('module', 'privatemsg_filter') .'/privatemsg_filter.css'); |
|
316 | + drupal_add_css(drupal_get_path('module', 'privatemsg_filter').'/privatemsg_filter.css'); |
|
317 | 317 | |
318 | 318 | $form['filter'] = array( |
319 | 319 | '#type' => 'fieldset', |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | if (isset($filter['author'])) { |
378 | 378 | $string = ''; |
379 | 379 | foreach ($filter['author'] as $author) { |
380 | - $string .= $author->name . ', '; |
|
380 | + $string .= $author->name.', '; |
|
381 | 381 | } |
382 | 382 | $form['filter']['author']['#default_value'] = $string; |
383 | 383 | } |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $query['tags'][] = $tag; |
442 | 442 | } |
443 | 443 | } |
444 | - $sql = 'SELECT pmt.tag FROM {pm_tags} pmt WHERE pmt.tag_id IN ('. implode(', ', $filter['tags']) .')'; |
|
444 | + $sql = 'SELECT pmt.tag FROM {pm_tags} pmt WHERE pmt.tag_id IN ('.implode(', ', $filter['tags']).')'; |
|
445 | 445 | $result = db_query($sql); |
446 | 446 | while ($row = db_fetch_object($result)) { |
447 | 447 | $query['tags'][] = $row->tag; |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | ); |
536 | 536 | |
537 | 537 | // JS for hiding the submit buttons. |
538 | - drupal_add_js(drupal_get_path('module', 'privatemsg_filter') .'/privatemsg-filter-list.js'); |
|
538 | + drupal_add_js(drupal_get_path('module', 'privatemsg_filter').'/privatemsg-filter-list.js'); |
|
539 | 539 | } |
540 | 540 | } |
541 | 541 | |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | $tags = array(); |
565 | 565 | |
566 | 566 | foreach ($thread['tags'] as $tag_id => $tag) { |
567 | - $tags[] = l(strlen($tag) > 15 ? substr($tag, 0, 13) . '...' : $tag, 'messages', array( |
|
567 | + $tags[] = l(strlen($tag) > 15 ? substr($tag, 0, 13).'...' : $tag, 'messages', array( |
|
568 | 568 | 'attributes' => array('title' => $tag), |
569 | 569 | 'query' => array('tags' => $tag) |
570 | 570 | )); |
@@ -611,11 +611,11 @@ discard block |
||
611 | 611 | |
612 | 612 | // Check if its a filtered view. |
613 | 613 | if ($argument == 'sent') { |
614 | - $fragments['where'][] = "pm.author = %d"; |
|
615 | - $fragments['query_args']['where'][] = $account->uid; |
|
614 | + $fragments['where'][] = "pm.author = %d"; |
|
615 | + $fragments['query_args']['where'][] = $account->uid; |
|
616 | 616 | } |
617 | 617 | if ($argument == 'inbox') { |
618 | - $fragments['having'][] = '((SELECT pmf.author FROM {pm_message} pmf WHERE pmf.mid = pmi.thread_id) = %d AND COUNT(pmi.thread_id) > 1) OR (SELECT COUNT(*) FROM {pm_message} pmf INNER JOIN {pm_index} pmif ON (pmf.mid = pmif.mid) WHERE pmif.thread_id = pmi.thread_id AND pmf.author <> %d) > 0'; |
|
618 | + $fragments['having'][] = '((SELECT pmf.author FROM {pm_message} pmf WHERE pmf.mid = pmi.thread_id) = %d AND COUNT(pmi.thread_id) > 1) OR (SELECT COUNT(*) FROM {pm_message} pmf INNER JOIN {pm_index} pmif ON (pmf.mid = pmif.mid) WHERE pmif.thread_id = pmi.thread_id AND pmf.author <> %d) > 0'; |
|
619 | 619 | $fragments['query_args']['having'][] = $account->uid; |
620 | 620 | $fragments['query_args']['having'][] = $account->uid; |
621 | 621 | } |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | foreach ($filter['tags'] as $tag) { |
628 | 628 | $fragments['inner_join'][] = "INNER JOIN {pm_tags_index} pmti$count ON (pmti$count.thread_id = pmi.thread_id AND pmti$count.uid = pmi.uid)"; |
629 | 629 | $fragments['where'][] = "pmti$count.tag_id = %d"; |
630 | - $fragments['query_args']['where'][] = $tag; |
|
630 | + $fragments['query_args']['where'][] = $tag; |
|
631 | 631 | $count++; |
632 | 632 | } |
633 | 633 | } |
@@ -636,20 +636,20 @@ discard block |
||
636 | 636 | foreach ($filter['author'] as $author) { |
637 | 637 | $fragments['inner_join'][] = "INNER JOIN {pm_index} pmi$count ON (pmi$count.mid = pm.mid)"; |
638 | 638 | $fragments['where'][] = "pmi$count.uid = %d"; |
639 | - $fragments['query_args']['where'][] = $author->uid; |
|
639 | + $fragments['query_args']['where'][] = $author->uid; |
|
640 | 640 | $count++; |
641 | 641 | } |
642 | 642 | } |
643 | 643 | |
644 | 644 | if (isset($filter['search']) && !empty($filter['search'])) { |
645 | 645 | if (variable_get('privatemsg_filter_searchbody', FALSE)) { |
646 | - $fragments['where'][] = "pm.subject LIKE '%s' OR pm.body LIKE '%s'"; |
|
647 | - $fragments['query_args']['where'][] = '%%'. $filter['search'] .'%%'; |
|
648 | - $fragments['query_args']['where'][] = '%%'. $filter['search'] .'%%'; |
|
646 | + $fragments['where'][] = "pm.subject LIKE '%s' OR pm.body LIKE '%s'"; |
|
647 | + $fragments['query_args']['where'][] = '%%'.$filter['search'].'%%'; |
|
648 | + $fragments['query_args']['where'][] = '%%'.$filter['search'].'%%'; |
|
649 | 649 | } |
650 | 650 | else { |
651 | - $fragments['where'][] = "pm.subject LIKE '%s'"; |
|
652 | - $fragments['query_args']['where'][] = '%%'. $filter['search'] .'%%'; |
|
651 | + $fragments['where'][] = "pm.subject LIKE '%s'"; |
|
652 | + $fragments['query_args']['where'][] = '%%'.$filter['search'].'%%'; |
|
653 | 653 | } |
654 | 654 | } |
655 | 655 | } |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | $count = db_result(db_query($query['count'])); |
679 | 679 | $tags = ''; |
680 | 680 | while ($tag = db_fetch_array($results)) { |
681 | - $tags .= $tag['tag'] . ', '; |
|
681 | + $tags .= $tag['tag'].', '; |
|
682 | 682 | } |
683 | 683 | |
684 | 684 | $form['tags'] = array( |
@@ -755,10 +755,10 @@ discard block |
||
755 | 755 | if (!empty($fragment)) { |
756 | 756 | $query = _privatemsg_assemble_query(array('tags_autocomplete', 'privatemsg_filter'), $fragment, $tags); |
757 | 757 | $result = db_query_range($query['query'], $fragment, 0, 10); |
758 | - $prefix = count($tags) ? implode(", ", $tags) .", " : ''; |
|
758 | + $prefix = count($tags) ? implode(", ", $tags).", " : ''; |
|
759 | 759 | // 3: Build proper suggestions and print. |
760 | 760 | while ($tag = db_fetch_object($result)) { |
761 | - $matches[$prefix . $tag->tag .", "] = $tag->tag; |
|
761 | + $matches[$prefix.$tag->tag.", "] = $tag->tag; |
|
762 | 762 | } |
763 | 763 | } |
764 | 764 | // convert to object to prevent drupal bug, see http://drupal.org/node/175361 |
@@ -817,8 +817,8 @@ discard block |
||
817 | 817 | if (!empty($threads)) { |
818 | 818 | // If the tag list needs to be for specific threads. |
819 | 819 | $fragments['select'][] = 'ti.thread_id'; |
820 | - $fragments['inner_join'][] = 'INNER JOIN {pm_tags_index} ti on ti.tag_id = t.tag_id'; |
|
821 | - $fragments['where'][] = 'ti.thread_id IN (' . db_placeholders($threads) . ')'; |
|
820 | + $fragments['inner_join'][] = 'INNER JOIN {pm_tags_index} ti on ti.tag_id = t.tag_id'; |
|
821 | + $fragments['where'][] = 'ti.thread_id IN ('.db_placeholders($threads).')'; |
|
822 | 822 | $fragments['query_args']['where'] += $threads; |
823 | 823 | } |
824 | 824 | else { |
@@ -875,14 +875,14 @@ discard block |
||
875 | 875 | $fragments['select'][] = 'pmt.tag'; |
876 | 876 | $fragments['where'][] = "pmt.tag LIKE '%s'"; |
877 | 877 | // Escape % to get through the placeholder replacement. |
878 | - $fragments['query_args']['where'][] = $search .'%%'; |
|
878 | + $fragments['query_args']['where'][] = $search.'%%'; |
|
879 | 879 | if (!empty($tags)) { |
880 | 880 | // Exclude tags. |
881 | - $fragments['where'][] = "pmt.tag NOT IN (". db_placeholders($tags, 'text') .")"; |
|
881 | + $fragments['where'][] = "pmt.tag NOT IN (".db_placeholders($tags, 'text').")"; |
|
882 | 882 | $fragments['query_args']['where'] += $tags; |
883 | 883 | } |
884 | 884 | // LEFT JOIN to be able to load public, unused tags. |
885 | - $fragments['inner_join'][] = 'LEFT JOIN {pm_tags_index} pmti ON pmt.tag_id = pmti.tag_id AND pmti.uid = %d'; |
|
885 | + $fragments['inner_join'][] = 'LEFT JOIN {pm_tags_index} pmti ON pmt.tag_id = pmti.tag_id AND pmti.uid = %d'; |
|
886 | 886 | $fragments['query_args']['join'][] = $user->uid; |
887 | 887 | // Autocomplete should only display Tags used by that user or public tags. |
888 | 888 | // This is done to avoid information disclosure as part of tag names. |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $is_new = theme_mark(MARK_NEW); |
96 | 96 | $options['fragment'] = 'new'; |
97 | 97 | } |
98 | - $field['data'] = l($thread['subject'], 'messages/view/' . $thread['thread_id'], $options) . $is_new; |
|
98 | + $field['data'] = l($thread['subject'], 'messages/view/'.$thread['thread_id'], $options).$is_new; |
|
99 | 99 | $field['class'] = 'privatemsg-list-subject'; |
100 | 100 | return $field; |
101 | 101 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $options = array(); |
112 | 112 | if (!empty($thread['is_new']) && $thread['is_new'] < $thread['count']) { |
113 | 113 | $options['fragment'] = 'new'; |
114 | - $field['data'] .= '<br />' . l((format_plural($thread['is_new'], '(1 new)', '(@count new)')), 'messages/view/' . $thread['thread_id'], $options); |
|
114 | + $field['data'] .= '<br />'.l((format_plural($thread['is_new'], '(1 new)', '(@count new)')), 'messages/view/'.$thread['thread_id'], $options); |
|
115 | 115 | } |
116 | 116 | $field['class'] = 'privatemsg-list-count'; |
117 | 117 | return $field; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | function theme_privatemsg_list($form) { |
240 | 240 | $has_posts = !empty($form['#data']); |
241 | 241 | |
242 | - drupal_add_css(drupal_get_path('module', 'privatemsg') .'/styles/privatemsg-list.css'); |
|
242 | + drupal_add_css(drupal_get_path('module', 'privatemsg').'/styles/privatemsg-list.css'); |
|
243 | 243 | |
244 | 244 | // Load the table columns. |
245 | 245 | $columns = array_merge(array('subject', 'last_updated'), array_filter(variable_get('privatemsg_display_fields', array('participants')))); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | if ($no_text) { |
101 | - return implode(', ', $to) . $limit_string; |
|
101 | + return implode(', ', $to).$limit_string; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | $last = array_pop($to); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * @ingroup api |
221 | 221 | */ |
222 | 222 | function privatemsg_user_access($permission = 'read privatemsg', $account = NULL) { |
223 | - if ( $account === NULL ) { |
|
223 | + if ($account === NULL) { |
|
224 | 224 | global $user; |
225 | 225 | $account = $user; |
226 | 226 | } |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | // message overlap. |
345 | 345 | // Note - the last page lists the earliest messages, not the latest. |
346 | 346 | $paging_count = variable_get('privatemsg_view_use_max_as_default', FALSE) ? $thread['message_count'] - variable_get('privatemsg_view_default_amount', 10) : $thread['message_count']; |
347 | - $last_page = $paging_count % $max_amount; |
|
347 | + $last_page = $paging_count%$max_amount; |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | // Sanity check - we cannot start from a negative number. |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | '#options' => $amounts, |
547 | 547 | '#weight' => 20, |
548 | 548 | ); |
549 | - drupal_add_js(drupal_get_path('module', 'privatemsg') .'/privatemsg-admin.js'); |
|
549 | + drupal_add_js(drupal_get_path('module', 'privatemsg').'/privatemsg-admin.js'); |
|
550 | 550 | |
551 | 551 | $form['#submit'][] = 'private_message_settings_submit'; |
552 | 552 | return system_settings_form($form); |
@@ -640,9 +640,9 @@ discard block |
||
640 | 640 | $vars['message_timestamp'] = format_date($message['timestamp'], 'small'); |
641 | 641 | $vars['message_body'] = check_markup($message['body'], $message['format'], FALSE); |
642 | 642 | if (isset($vars['mid']) && isset($vars['thread_id']) && privatemsg_user_access('delete privatemsg')) { |
643 | - $vars['message_actions'][] = array('title' => t('Delete message'), 'href' => 'messages/delete/' . $vars['thread_id'] . '/' . $vars['mid']); |
|
643 | + $vars['message_actions'][] = array('title' => t('Delete message'), 'href' => 'messages/delete/'.$vars['thread_id'].'/'.$vars['mid']); |
|
644 | 644 | } |
645 | - $vars['message_anchors'][] = 'privatemsg-mid-' . $vars['mid']; |
|
645 | + $vars['message_anchors'][] = 'privatemsg-mid-'.$vars['mid']; |
|
646 | 646 | if (!empty($message['is_new'])) { |
647 | 647 | $vars['message_anchors'][] = 'new'; |
648 | 648 | $vars['new'] = drupal_ucfirst(t('new')); |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | |
656 | 656 | $vars['anchors'] = ''; |
657 | 657 | foreach ($vars['message_anchors'] as $anchor) { |
658 | - $vars['anchors'] .= '<a name="' . $anchor . '"></a>'; |
|
658 | + $vars['anchors'] .= '<a name="'.$anchor.'"></a>'; |
|
659 | 659 | } |
660 | 660 | } |
661 | 661 | |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | global $user; |
759 | 759 | $account = $user; |
760 | 760 | } |
761 | - if ( !isset($counts[$account->uid])) { |
|
761 | + if (!isset($counts[$account->uid])) { |
|
762 | 762 | $query = _privatemsg_assemble_query('unread_count', $account); |
763 | 763 | $counts[$account->uid] = db_result(db_query($query['query'])); |
764 | 764 | } |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | 'query' => array('start' => $thread['older_start']), |
786 | 786 | 'title' => t('Display older messages'), |
787 | 787 | ); |
788 | - $older = l(t('<<'), 'messages/view/' . $thread['thread_id'], $options); |
|
788 | + $older = l(t('<<'), 'messages/view/'.$thread['thread_id'], $options); |
|
789 | 789 | } |
790 | 790 | $newer = ''; |
791 | 791 | if (isset($thread['newer_start'])) { |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | 'query' => array('start' => $thread['newer_start']), |
794 | 794 | 'title' => t('Display newer messages'), |
795 | 795 | ); |
796 | - $newer = l(t('>>'), 'messages/view/' . $thread['thread_id'], $options); |
|
796 | + $newer = l(t('>>'), 'messages/view/'.$thread['thread_id'], $options); |
|
797 | 797 | } |
798 | 798 | $substitutions = array('@from' => $thread['from'], '@to' => $thread['to'], '@total' => $thread['message_count'], '!previous_link' => $older, '!newer_link' => $newer); |
799 | 799 | $title = t('!previous_link Displaying messages @from - @to of @total !newer_link', $substitutions); |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | global $user; |
848 | 848 | |
849 | 849 | $recipients_string = ''; |
850 | - $body = ''; |
|
850 | + $body = ''; |
|
851 | 851 | |
852 | 852 | // convert recipients to array of user objects |
853 | 853 | if (!empty($recipients) && is_string($recipients) || is_int($recipients)) { |
@@ -1004,7 +1004,7 @@ discard block |
||
1004 | 1004 | ); |
1005 | 1005 | $recipients_string_themed = implode(', ', $to_themed); |
1006 | 1006 | $form['privatemsg']['recipient_display'] = array( |
1007 | - '#value' => '<p>'. t('<strong>Reply to thread</strong>:<br /> Recipients: !to', array('!to' => $recipients_string_themed)) .'</p>', |
|
1007 | + '#value' => '<p>'.t('<strong>Reply to thread</strong>:<br /> Recipients: !to', array('!to' => $recipients_string_themed)).'</p>', |
|
1008 | 1008 | '#weight' => -10, |
1009 | 1009 | ); |
1010 | 1010 | if (empty($recipients_string)) { |
@@ -1099,7 +1099,7 @@ discard block |
||
1099 | 1099 | // First, check if another module is able to resolve the string into an |
1100 | 1100 | // user object. |
1101 | 1101 | foreach (module_implements('privatemsg_name_lookup') as $module) { |
1102 | - $function = $module . '_privatemsg_name_lookup'; |
|
1102 | + $function = $module.'_privatemsg_name_lookup'; |
|
1103 | 1103 | if (($recipient = $function($string)) && is_object($recipient)) { |
1104 | 1104 | // If there is a match, continue with the next input string. |
1105 | 1105 | $recipients[$recipient->uid] = $recipient; |
@@ -1131,7 +1131,7 @@ discard block |
||
1131 | 1131 | foreach ($form_state['validate_built_message']['recipients'] as $recipient) { |
1132 | 1132 | $recipient_names[] = theme('username', $recipient); |
1133 | 1133 | } |
1134 | - if ($status !== FALSE ) { |
|
1134 | + if ($status !== FALSE) { |
|
1135 | 1135 | drupal_set_message(t('A message has been sent to !recipients.', array('!recipients' => implode(', ', $recipient_names)))); |
1136 | 1136 | } |
1137 | 1137 | else { |
@@ -1173,7 +1173,7 @@ discard block |
||
1173 | 1173 | $fields = array_filter(variable_get('privatemsg_display_fields', array('participants'))); |
1174 | 1174 | |
1175 | 1175 | // Required columns. |
1176 | - $fragments['select'][] = 'pmi.thread_id'; |
|
1176 | + $fragments['select'][] = 'pmi.thread_id'; |
|
1177 | 1177 | // We have to use MIN as the subject might not be the same in some threads. |
1178 | 1178 | // MIN() does not have a useful meaning except that it helps to correctly |
1179 | 1179 | // aggregate the thread on PostgreSQL. |
@@ -1185,32 +1185,32 @@ discard block |
||
1185 | 1185 | // Select number of messages in the thread if the count is |
1186 | 1186 | // set to be displayed. |
1187 | 1187 | if (in_array('count', $fields)) { |
1188 | - $fragments['select'][] = 'COUNT(distinct pmi.mid) as count'; |
|
1188 | + $fragments['select'][] = 'COUNT(distinct pmi.mid) as count'; |
|
1189 | 1189 | } |
1190 | 1190 | if (in_array('participants', $fields)) { |
1191 | 1191 | // Query for a string with uid's, for example "1,6,7". |
1192 | 1192 | // @todo: Replace this with a single query similiar to the tag list. |
1193 | 1193 | if ($GLOBALS['db_type'] == 'pgsql') { |
1194 | 1194 | // PostgreSQL does not know GROUP_CONCAT, so a subquery is required. |
1195 | - $fragments['select'][] = "array_to_string(array(SELECT DISTINCT textin(int4out(pmia.uid)) |
|
1195 | + $fragments['select'][] = "array_to_string(array(SELECT DISTINCT textin(int4out(pmia.uid)) |
|
1196 | 1196 | FROM {pm_index} pmia |
1197 | 1197 | WHERE pmia.thread_id = pmi.thread_id), ',') AS participants"; |
1198 | 1198 | } |
1199 | 1199 | else { |
1200 | - $fragments['select'][] = '(SELECT GROUP_CONCAT(DISTINCT pmia.uid SEPARATOR ",") |
|
1200 | + $fragments['select'][] = '(SELECT GROUP_CONCAT(DISTINCT pmia.uid SEPARATOR ",") |
|
1201 | 1201 | FROM {pm_index} pmia |
1202 | 1202 | WHERE pmia.thread_id = pmi.thread_id) AS participants'; |
1203 | 1203 | } |
1204 | 1204 | } |
1205 | 1205 | if (in_array('thread_started', $fields)) { |
1206 | - $fragments['select'][] = 'MIN(pm.timestamp) as thread_started'; |
|
1206 | + $fragments['select'][] = 'MIN(pm.timestamp) as thread_started'; |
|
1207 | 1207 | } |
1208 | 1208 | |
1209 | 1209 | $fragments['inner_join'][] = 'INNER JOIN {pm_index} pmi ON pm.mid = pmi.mid'; |
1210 | 1210 | |
1211 | 1211 | // Only load undeleted messages of the current user and group by thread. |
1212 | 1212 | $fragments['where'][] = 'pmi.uid = %d'; |
1213 | - $fragments['query_args']['where'][] = $account->uid; |
|
1213 | + $fragments['query_args']['where'][] = $account->uid; |
|
1214 | 1214 | $fragments['where'][] = 'pmi.deleted = 0'; |
1215 | 1215 | $fragments['group_by'][] = 'pmi.thread_id'; |
1216 | 1216 | |
@@ -1224,8 +1224,8 @@ discard block |
||
1224 | 1224 | // tablesort_sql() generates a ORDER BY string. However, the "ORDER BY " part |
1225 | 1225 | // is not needed and added by the query builder. Discard the first 9 |
1226 | 1226 | // characters of the string. |
1227 | - $order_by = drupal_substr(tablesort_sql(_privatemsg_list_headers( FALSE, array_merge(array('subject', 'last_updated'), $fields)), $order_by_first), 9); |
|
1228 | - $fragments['order_by'][] = $order_by; |
|
1227 | + $order_by = drupal_substr(tablesort_sql(_privatemsg_list_headers(FALSE, array_merge(array('subject', 'last_updated'), $fields)), $order_by_first), 9); |
|
1228 | + $fragments['order_by'][] = $order_by; |
|
1229 | 1229 | } |
1230 | 1230 | |
1231 | 1231 | /** |
@@ -1252,11 +1252,11 @@ discard block |
||
1252 | 1252 | |
1253 | 1253 | $fragments['inner_join'][] = 'INNER JOIN {pm_index} pmi ON pm.mid = pmi.mid'; |
1254 | 1254 | // Use IN() to load multiple messages at the same time. |
1255 | - $fragments['where'][] = 'pmi.mid IN (' . db_placeholders($pmids) . ')'; |
|
1256 | - $fragments['query_args']['where'] += $pmids; |
|
1255 | + $fragments['where'][] = 'pmi.mid IN ('.db_placeholders($pmids).')'; |
|
1256 | + $fragments['query_args']['where'] += $pmids; |
|
1257 | 1257 | if ($account) { |
1258 | - $fragments['where'][] = 'pmi.uid = %d'; |
|
1259 | - $fragments['query_args']['where'][] = $account->uid; |
|
1258 | + $fragments['where'][] = 'pmi.uid = %d'; |
|
1259 | + $fragments['query_args']['where'][] = $account->uid; |
|
1260 | 1260 | } |
1261 | 1261 | $fragments['order_by'][] = 'pm.timestamp ASC'; |
1262 | 1262 | $fragments['order_by'][] = 'pm.mid ASC'; |
@@ -1278,13 +1278,13 @@ discard block |
||
1278 | 1278 | $fragments['primary_table'] = '{pm_index} pmi'; |
1279 | 1279 | |
1280 | 1280 | $fragments['select'][] = 'pmi.mid'; |
1281 | - $fragments['where'][] = 'pmi.thread_id IN ('. db_placeholders($threads) .')'; |
|
1282 | - $fragments['query_args']['where'] += $threads; |
|
1281 | + $fragments['where'][] = 'pmi.thread_id IN ('.db_placeholders($threads).')'; |
|
1282 | + $fragments['query_args']['where'] += $threads; |
|
1283 | 1283 | $fragments['inner_join'][] = 'INNER JOIN {pm_message} pm ON (pm.mid = pmi.mid)'; |
1284 | 1284 | if ($account) { |
1285 | 1285 | // Only load the user's messages. |
1286 | 1286 | $fragments['where'][] = 'pmi.uid = %d'; |
1287 | - $fragments['query_args']['where'][] = $account->uid; |
|
1287 | + $fragments['query_args']['where'][] = $account->uid; |
|
1288 | 1288 | } |
1289 | 1289 | if (!$load_all) { |
1290 | 1290 | // Also load deleted messages when requested. |
@@ -1320,7 +1320,7 @@ discard block |
||
1320 | 1320 | |
1321 | 1321 | $fragments['inner_join'][] = 'INNER JOIN {users} u ON (u.uid = pmi.uid)'; |
1322 | 1322 | $fragments['where'][] = 'pmi.thread_id = %d'; |
1323 | - $fragments['query_args']['where'][] = $thread_id; |
|
1323 | + $fragments['query_args']['where'][] = $thread_id; |
|
1324 | 1324 | } |
1325 | 1325 | |
1326 | 1326 | /** |
@@ -1340,7 +1340,7 @@ discard block |
||
1340 | 1340 | $fragments['where'][] = 'pmi.deleted = 0'; |
1341 | 1341 | $fragments['where'][] = 'pmi.is_new = 1'; |
1342 | 1342 | $fragments['where'][] = 'pmi.uid = %d'; |
1343 | - $fragments['query_args']['where'][] = $account->uid; |
|
1343 | + $fragments['query_args']['where'][] = $account->uid; |
|
1344 | 1344 | } |
1345 | 1345 | |
1346 | 1346 | /** |
@@ -1358,10 +1358,10 @@ discard block |
||
1358 | 1358 | $fragments['select'][] = 'u.name'; |
1359 | 1359 | // Escape the % to get it through the placeholder replacement. |
1360 | 1360 | $fragments['where'][] = "u.name LIKE '%s'"; |
1361 | - $fragments['query_args']['where'][] = $search .'%%'; |
|
1361 | + $fragments['query_args']['where'][] = $search.'%%'; |
|
1362 | 1362 | if (!empty($names)) { |
1363 | 1363 | // If there are already names selected, exclude them from the suggestions. |
1364 | - $fragments['where'][] = "u.name NOT IN (". db_placeholders($names, 'text') .")"; |
|
1364 | + $fragments['where'][] = "u.name NOT IN (".db_placeholders($names, 'text').")"; |
|
1365 | 1365 | $fragments['query_args']['where'] += $names; |
1366 | 1366 | } |
1367 | 1367 | // Only load active users and sort them by name. |
@@ -1395,7 +1395,7 @@ discard block |
||
1395 | 1395 | |
1396 | 1396 | // Only select messages that have been deleted more than n days ago. |
1397 | 1397 | $fragments['having'][] = 'MAX(pmi.deleted) < %d'; |
1398 | - $fragments['query_args']['having'][] = time() - $days * 86400; |
|
1398 | + $fragments['query_args']['having'][] = time() - $days*86400; |
|
1399 | 1399 | } |
1400 | 1400 | |
1401 | 1401 | /** |
@@ -1423,10 +1423,10 @@ discard block |
||
1423 | 1423 | if (!empty($fragment)) { |
1424 | 1424 | $query = _privatemsg_assemble_query('autocomplete', $fragment, $names); |
1425 | 1425 | $result = db_query_range($query['query'], $fragment, 0, 10); |
1426 | - $prefix = count($names) ? implode(", ", $names) .", " : ''; |
|
1426 | + $prefix = count($names) ? implode(", ", $names).", " : ''; |
|
1427 | 1427 | // 3: Build proper suggestions and print. |
1428 | 1428 | while ($user = db_fetch_object($result)) { |
1429 | - $matches[$prefix . $user->name .", "] = $user->name; |
|
1429 | + $matches[$prefix.$user->name.", "] = $user->name; |
|
1430 | 1430 | } |
1431 | 1431 | } |
1432 | 1432 | // convert to object to prevent drupal bug, see http://drupal.org/node/175361 |
@@ -1468,7 +1468,7 @@ discard block |
||
1468 | 1468 | |
1469 | 1469 | if (!empty($mids)) { |
1470 | 1470 | // Delete recipient entries in {pm_index} of the messages the user wrote. |
1471 | - db_query('DELETE FROM {pm_index} WHERE mid IN (' . db_placeholders($mids) . ')', $mids); |
|
1471 | + db_query('DELETE FROM {pm_index} WHERE mid IN ('.db_placeholders($mids).')', $mids); |
|
1472 | 1472 | } |
1473 | 1473 | |
1474 | 1474 | // Delete recipient entries of that user. |
@@ -1540,10 +1540,10 @@ discard block |
||
1540 | 1540 | if (privatemsg_user_access('write privatemsg')) { |
1541 | 1541 | $links[] = l(t('Write new message'), 'messages/new'); |
1542 | 1542 | } |
1543 | - if (privatemsg_user_access('read privatemsg') || privatemsg_user_access('read all private messages') ) { |
|
1543 | + if (privatemsg_user_access('read privatemsg') || privatemsg_user_access('read all private messages')) { |
|
1544 | 1544 | $links[] = l(privatemsg_title_callback(), 'messages'); |
1545 | 1545 | } |
1546 | - if ( count( $links ) ) { |
|
1546 | + if (count($links)) { |
|
1547 | 1547 | $block = array( |
1548 | 1548 | 'subject' => t('Private messages'), |
1549 | 1549 | 'content' => theme('item_list', $links), |
@@ -1559,7 +1559,7 @@ discard block |
||
1559 | 1559 | ); |
1560 | 1560 | $form['delete_destination'] = array( |
1561 | 1561 | '#type' => 'value', |
1562 | - '#value' => count($thread['messages']) > 1 ? 'messages/view/' . $message['thread_id'] : 'messages', |
|
1562 | + '#value' => count($thread['messages']) > 1 ? 'messages/view/'.$message['thread_id'] : 'messages', |
|
1563 | 1563 | ); |
1564 | 1564 | |
1565 | 1565 | if (privatemsg_user_access('read all private messages')) { |
@@ -1572,7 +1572,7 @@ discard block |
||
1572 | 1572 | } |
1573 | 1573 | return confirm_form($form, |
1574 | 1574 | t('Are you sure you want to delete this message?'), |
1575 | - isset($_GET['destination']) ? $_GET['destination'] : 'messages/view/'. $message['thread_id'], |
|
1575 | + isset($_GET['destination']) ? $_GET['destination'] : 'messages/view/'.$message['thread_id'], |
|
1576 | 1576 | t('This action cannot be undone.'), |
1577 | 1577 | t('Delete'), |
1578 | 1578 | t('Cancel') |
@@ -1801,7 +1801,7 @@ discard block |
||
1801 | 1801 | } |
1802 | 1802 | |
1803 | 1803 | // Don't allow replies without a body. |
1804 | - if (!empty($message['thread_id']) && ($message['body'] === NULL || $message['body'] === '') ) { |
|
1804 | + if (!empty($message['thread_id']) && ($message['body'] === NULL || $message['body'] === '')) { |
|
1805 | 1805 | if ($form) { |
1806 | 1806 | form_set_error('body', t('Disallowed to send reply without a message.')); |
1807 | 1807 | } |
@@ -1917,7 +1917,7 @@ discard block |
||
1917 | 1917 | // 2) Save message to recipients. |
1918 | 1918 | // Each recipient gets a record in the pm_index table. |
1919 | 1919 | foreach ($message['recipients'] as $recipient) { |
1920 | - if (!db_query($index_sql, $mid, $message['thread_id'], $recipient->uid, 1) ) { |
|
1920 | + if (!db_query($index_sql, $mid, $message['thread_id'], $recipient->uid, 1)) { |
|
1921 | 1921 | // We assume if one insert failed then the rest may fail too against the |
1922 | 1922 | // same table. |
1923 | 1923 | return FALSE; |
@@ -1982,9 +1982,9 @@ discard block |
||
1982 | 1982 | if (empty($validated)) { |
1983 | 1983 | return FALSE; |
1984 | 1984 | } |
1985 | - $url = 'messages/new/'. implode(',', $validated); |
|
1985 | + $url = 'messages/new/'.implode(',', $validated); |
|
1986 | 1986 | if (!is_null($subject)) { |
1987 | - $url .= '/'. $subject; |
|
1987 | + $url .= '/'.$subject; |
|
1988 | 1988 | } |
1989 | 1989 | return $url; |
1990 | 1990 | } |
@@ -2094,7 +2094,7 @@ discard block |
||
2094 | 2094 | // we do the merge because we call call_user_func_array and not drupal_alter |
2095 | 2095 | // this is necessary because otherwise we would not be able to use $args correctly (otherwise it doesnt unfold) |
2096 | 2096 | $alterargs = array(&$fragments); |
2097 | - $query_function = $query_group .'_sql_'. $query_id; |
|
2097 | + $query_function = $query_group.'_sql_'.$query_id; |
|
2098 | 2098 | if (!empty($args)) { |
2099 | 2099 | $alterargs = array_merge($alterargs, $args); |
2100 | 2100 | } |
@@ -2131,7 +2131,7 @@ discard block |
||
2131 | 2131 | // Perform the whole query assembly only if we have something to select. |
2132 | 2132 | if (!empty($SELECT)) { |
2133 | 2133 | $str_select = implode(", ", $SELECT); |
2134 | - $query = "SELECT {$str_select} FROM ". $primary_table; |
|
2134 | + $query = "SELECT {$str_select} FROM ".$primary_table; |
|
2135 | 2135 | |
2136 | 2136 | // Also build a count query which can be passed to pager_query to get a "page count" as that does not play well with queries including "GROUP BY". |
2137 | 2137 | // In most cases, "COUNT(*)" is enough to get the count query, but in queries involving a GROUP BY, we want a count of the number of groups we have, not the count of elements inside each group. |
@@ -2140,10 +2140,10 @@ discard block |
||
2140 | 2140 | // PostgreSQL does not support COUNT(sometextfield, someintfield), so I'm only using the first one |
2141 | 2141 | // Works fine for thread_id/list but may generate an error when a more complex GROUP BY is used. |
2142 | 2142 | $str_group_by_count = current($GROUP_BY); |
2143 | - $count = "SELECT COUNT(DISTINCT {$str_group_by_count}) FROM ". $primary_table; |
|
2143 | + $count = "SELECT COUNT(DISTINCT {$str_group_by_count}) FROM ".$primary_table; |
|
2144 | 2144 | } |
2145 | 2145 | else { |
2146 | - $count = "SELECT COUNT(*) FROM ". $primary_table; |
|
2146 | + $count = "SELECT COUNT(*) FROM ".$primary_table; |
|
2147 | 2147 | } |
2148 | 2148 | |
2149 | 2149 | if (!empty($INNER_JOIN)) { |
@@ -2152,24 +2152,24 @@ discard block |
||
2152 | 2152 | $count .= " {$str_inner_join}"; |
2153 | 2153 | } |
2154 | 2154 | if (!empty($WHERE)) { |
2155 | - $str_where = '('. implode(') AND (', $WHERE) .')'; |
|
2155 | + $str_where = '('.implode(') AND (', $WHERE).')'; |
|
2156 | 2156 | $query .= " WHERE {$str_where}"; |
2157 | 2157 | $count .= " WHERE {$str_where}"; |
2158 | 2158 | } |
2159 | 2159 | if (!empty($GROUP_BY)) { |
2160 | - $str_group_by = ' GROUP BY '. implode(", ", $GROUP_BY) ; |
|
2160 | + $str_group_by = ' GROUP BY '.implode(", ", $GROUP_BY); |
|
2161 | 2161 | $query .= " {$str_group_by}"; |
2162 | 2162 | } |
2163 | 2163 | if (!empty($HAVING)) { |
2164 | - $str_having = '('. implode(') AND (', $HAVING) .')'; |
|
2164 | + $str_having = '('.implode(') AND (', $HAVING).')'; |
|
2165 | 2165 | $query .= " HAVING {$str_having}"; |
2166 | 2166 | // queries containing a HAVING break the count query on pgsql. |
2167 | 2167 | // In this case, use the subquery method as outlined in http://drupal.org/node/303087#comment-1370752 . |
2168 | 2168 | // The subquery method will work for all COUNT queries, but it is thought to be much slower, so we are only using it where other cross database approaches fail. |
2169 | - $count = 'SELECT COUNT(*) FROM ('. $query .') as count'; |
|
2169 | + $count = 'SELECT COUNT(*) FROM ('.$query.') as count'; |
|
2170 | 2170 | } |
2171 | 2171 | if (!empty($ORDER_BY)) { |
2172 | - $str_order_by = ' ORDER BY '. implode(", ", $ORDER_BY) ; |
|
2172 | + $str_order_by = ' ORDER BY '.implode(", ", $ORDER_BY); |
|
2173 | 2173 | $query .= " {$str_order_by}"; |
2174 | 2174 | } |
2175 | 2175 | $QUERY_ARGS = array_merge($QUERY_ARGS['select'], $QUERY_ARGS['join'], $QUERY_ARGS['where'], $QUERY_ARGS['having']); |
@@ -2234,7 +2234,7 @@ discard block |
||
2234 | 2234 | '#attributes' => array('class' => 'privatemsg-action-button'), |
2235 | 2235 | ); |
2236 | 2236 | // JS for hiding the execute button. |
2237 | - drupal_add_js(drupal_get_path('module', 'privatemsg') .'/privatemsg-list.js'); |
|
2237 | + drupal_add_js(drupal_get_path('module', 'privatemsg').'/privatemsg-list.js'); |
|
2238 | 2238 | return $form; |
2239 | 2239 | } |
2240 | 2240 | |
@@ -2259,7 +2259,7 @@ discard block |
||
2259 | 2259 | } |
2260 | 2260 | // Merge status and uid with the threads list. array_merge() will not overwrite/ignore thread_id 1. |
2261 | 2261 | $params = array_merge(array($status, $account->uid), $threads); |
2262 | - db_query('UPDATE {pm_index} SET is_new = %d WHERE uid = %d AND thread_id IN ('. db_placeholders($threads) .')', $params); |
|
2262 | + db_query('UPDATE {pm_index} SET is_new = %d WHERE uid = %d AND thread_id IN ('.db_placeholders($threads).')', $params); |
|
2263 | 2263 | |
2264 | 2264 | if ($status == PRIVATEMSG_UNREAD) { |
2265 | 2265 | drupal_set_message(format_plural(count($threads), 'Marked 1 thread as unread.', 'Marked @count threads as unread.')); |
@@ -2286,12 +2286,12 @@ discard block |
||
2286 | 2286 | $select_header['#weight'] = -50; |
2287 | 2287 | |
2288 | 2288 | // theme() doesn't include the theme file for patterns, we need to do it manually. |
2289 | - include_once drupal_get_path('module', 'privatemsg') .'/privatemsg.theme.inc'; |
|
2289 | + include_once drupal_get_path('module', 'privatemsg').'/privatemsg.theme.inc'; |
|
2290 | 2290 | |
2291 | 2291 | $header = array($select_header); |
2292 | 2292 | foreach ($keys as $key) { |
2293 | 2293 | // First, try to load a specific theme for that header, if not present, use the default. |
2294 | - if ($return = theme(array('privatemsg_list_header__'. $key, 'privatemsg_list_header'))) { |
|
2294 | + if ($return = theme(array('privatemsg_list_header__'.$key, 'privatemsg_list_header'))) { |
|
2295 | 2295 | // The default theme returns nothing, only store the value if we have something. |
2296 | 2296 | $header[$key] = $return; |
2297 | 2297 | } |
@@ -2312,7 +2312,7 @@ discard block |
||
2312 | 2312 | function _privatemsg_list_headers_fallback($keys) { |
2313 | 2313 | $header = array(); |
2314 | 2314 | foreach ($keys as $key) { |
2315 | - $theme_function = 'phptemplate_privatemsg_list_header__' . $key; |
|
2315 | + $theme_function = 'phptemplate_privatemsg_list_header__'.$key; |
|
2316 | 2316 | if (function_exists($theme_function)) { |
2317 | 2317 | $header[$key] = $theme_function(); |
2318 | 2318 | } |
@@ -2340,7 +2340,7 @@ discard block |
||
2340 | 2340 | } |
2341 | 2341 | foreach ($thread as $key => $data) { |
2342 | 2342 | // First, try to load a specific theme for that field, if not present, use the default. |
2343 | - if ($return = theme(array('privatemsg_list_field__'. $key, 'privatemsg_list_field'), $thread)) { |
|
2343 | + if ($return = theme(array('privatemsg_list_field__'.$key, 'privatemsg_list_field'), $thread)) { |
|
2344 | 2344 | // The default theme returns nothing, only store the value if we have something. |
2345 | 2345 | $row['data'][$key] = $return; |
2346 | 2346 | } |
@@ -2360,7 +2360,7 @@ discard block |
||
2360 | 2360 | function _privatemsg_list_thread_fallback($thread) { |
2361 | 2361 | $row_data = array(); |
2362 | 2362 | foreach ($thread as $key => $data) { |
2363 | - $theme_function = 'phptemplate_privatemsg_list_field__' . $key; |
|
2363 | + $theme_function = 'phptemplate_privatemsg_list_field__'.$key; |
|
2364 | 2364 | if (function_exists($theme_function)) { |
2365 | 2365 | $row_data[$key] = $theme_function($thread); |
2366 | 2366 | } |
@@ -2559,6 +2559,6 @@ discard block |
||
2559 | 2559 | function privatemsg_views_api() { |
2560 | 2560 | return array( |
2561 | 2561 | 'api' => 2, |
2562 | - 'path' => drupal_get_path('module', 'privatemsg') . '/views', |
|
2562 | + 'path' => drupal_get_path('module', 'privatemsg').'/views', |
|
2563 | 2563 | ); |
2564 | 2564 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | function pm_block_user_help($path) { |
22 | 22 | switch ($path) { |
23 | 23 | case 'admin/settings/messages/block': |
24 | - return '<p>' . t('This area is used to define user blocking rules for the Privatemsg module. Rules allow control of who may block messages from whom. By default all users are allowed to block messages from anyone else. However, a site may have groups of users that need to contact or get information to others, for example: the site may have administrative staff or be a forum with moderators. Groups of users are defined by roles, which can be managed on the <a href="@roles">roles configuration page</a>.', array('@roles' => url('admin/user/roles'))) . '</p>'; |
|
24 | + return '<p>'.t('This area is used to define user blocking rules for the Privatemsg module. Rules allow control of who may block messages from whom. By default all users are allowed to block messages from anyone else. However, a site may have groups of users that need to contact or get information to others, for example: the site may have administrative staff or be a forum with moderators. Groups of users are defined by roles, which can be managed on the <a href="@roles">roles configuration page</a>.', array('@roles' => url('admin/user/roles'))).'</p>'; |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Menu callback for blocked user settings. |
63 | 63 | */ |
64 | 64 | function pm_block_user_settings(&$form_state) { |
65 | - drupal_add_css(drupal_get_path('module', 'pm_block_user') .'/pm_block_user.css'); |
|
65 | + drupal_add_css(drupal_get_path('module', 'pm_block_user').'/pm_block_user.css'); |
|
66 | 66 | // Need to cache form for AHAH, so it can be rebuilt from cache later. |
67 | 67 | $form = array( |
68 | 68 | '#cache' => TRUE, |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | '#value' => t('More'), |
97 | 97 | '#weight' => 1, |
98 | 98 | '#prefix' => '<div id="add-rule-button">', |
99 | - '#suffix' => '<label for="edit-pm-block-actions-more">' . t('Add new rule') . '</label></div>', |
|
99 | + '#suffix' => '<label for="edit-pm-block-actions-more">'.t('Add new rule').'</label></div>', |
|
100 | 100 | '#submit' => array('pm_block_user_more_submit'), |
101 | 101 | '#ahah' => array( |
102 | 102 | 'path' => 'messages/block/js', |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | else { |
165 | 165 | // @todo: add whitelist options/default_value here. |
166 | 166 | } |
167 | - $form['action'] = array( |
|
167 | + $form['action'] = array( |
|
168 | 168 | '#type' => 'radios', |
169 | 169 | '#options' => $options, |
170 | 170 | '#disabled' => $row_disabled, |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | '#value' => t('Remove'), |
182 | 182 | '#attributes' => array('class' => 'remove-action'), |
183 | 183 | '#prefix' => '<div id="remove-rule-button">', |
184 | - '#suffix' => '<label for="edit-remove">' . t('Remove rule') . '</label></div>', |
|
184 | + '#suffix' => '<label for="edit-remove">'.t('Remove rule').'</label></div>', |
|
185 | 185 | '#ahah' => array( |
186 | 186 | 'path' => 'messages/block/js', |
187 | 187 | 'wrapper' => 'block-actions', |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | $form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id); |
297 | 297 | $output_form = $form['block_actions']; |
298 | 298 | unset($output_form['#prefix'], $output_form['#suffix']); // Prevent duplicate wrappers. |
299 | - $output = theme('status_messages') . drupal_render($output_form); |
|
299 | + $output = theme('status_messages').drupal_render($output_form); |
|
300 | 300 | |
301 | 301 | // Hack to make behaviours attach to new HTML controls (delete buttons in |
302 | 302 | // this case). |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | } |
525 | 525 | |
526 | 526 | $args = array_merge(array($author->uid), array_keys($recipients)); |
527 | - $result = db_query('SELECT recipient FROM {pm_block_user} WHERE author = %d AND recipient IN ('. db_placeholders($recipients) .') GROUP BY recipient', $args); |
|
527 | + $result = db_query('SELECT recipient FROM {pm_block_user} WHERE author = %d AND recipient IN ('.db_placeholders($recipients).') GROUP BY recipient', $args); |
|
528 | 528 | while ($row = db_fetch_array($result)) { |
529 | 529 | $recipient = $recipients[$row['recipient']]; |
530 | 530 | // If there's a rule disallowing blocking of this message, send it anyway. |
@@ -563,10 +563,10 @@ discard block |
||
563 | 563 | |
564 | 564 | if ($user->uid <> $author->uid) { |
565 | 565 | if ($vars['message']['is_blocked']) { |
566 | - $vars['message_actions']['unblock_author'] = array('title' => t('Unblock author'), 'href' => 'messages/block/'. $author->uid, 'query' => 'destination=messages/view/' . $thread_id); |
|
566 | + $vars['message_actions']['unblock_author'] = array('title' => t('Unblock author'), 'href' => 'messages/block/'.$author->uid, 'query' => 'destination=messages/view/'.$thread_id); |
|
567 | 567 | } |
568 | 568 | else { |
569 | - $vars['message_actions']['block_author'] = array('title' => t('Block author'), 'href' => 'messages/block/'. $author->uid, 'query' => 'destination=messages/view/' . $thread_id); |
|
569 | + $vars['message_actions']['block_author'] = array('title' => t('Block author'), 'href' => 'messages/block/'.$author->uid, 'query' => 'destination=messages/view/'.$thread_id); |
|
570 | 570 | } |
571 | 571 | } |
572 | 572 | } |