Projet

Général

Profil

Révision 13c3c9b4

Ajouté par Assos Assos il y a environ 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/advanced_forum/plugins/content_types/forum_search.inc
1 1
<?php
2
/**
3
 * @file
4
 * Forum topic search.
5
 */
2 6

  
3 7
/**
4 8
 * Plugins are described by creating a $plugin array which will be used
......
17 21
/**
18 22
 * Render the content.
19 23
 */
20
function advanced_forum_forum_search_content_type_render($subtype, $conf, $panel_args, $context) {
24
function advanced_forum_forum_search_content_type_render(
25
  $subtype,
26
  $conf,
27
  $panel_args,
28
  $context
29
) {
21 30
  if (!empty($context) && empty($context->data)) {
22 31
    return;
23 32
  }
24 33

  
25
  if (empty($context)) {
26
    $tid = 0;
27
  }
28
  else {
34
  $tid = 0;
35
  if (!empty($context)) {
29 36
    $tid = $context->data->tid;
30 37
  }
31 38

  
......
33 40
  $block->module = 'forum-secondary-links';
34 41
  $block->delta = $tid;
35 42

  
36
  $block->title = ''; // by default this has no title.
43
  // By default this has no title.
44
  $block->title = '';
37 45
  _advanced_forum_add_files();
38 46

  
39
  $block->content = '<div id="search-all-forums">' . theme('advanced_forum_search_forum') . '</div>';
47
  $block->content = '<div id="search-all-forums">' . theme(
48
      'advanced_forum_search_forum'
49
    ) . '</div>';
40 50

  
41 51
  return $block;
42 52
}
......
44 54
/**
45 55
 * Returns an edit form for the custom type.
46 56
 */
47
function advanced_forum_forum_search_content_type_edit_form($form, &$form_state) {
57
function advanced_forum_forum_search_content_type_edit_form(
58
  $form,
59
  &$form_state
60
) {
48 61
  return $form;
49 62
}
50 63

  
51
function advanced_forum_forum_search_content_type_edit_form_submit($form, &$form_state) {
64
/**
65
 * Submit callback.
66
 */
67
function advanced_forum_forum_search_content_type_edit_form_submit(
68
  $form,
69
  &$form_state
70
) {
52 71
  // Copy everything from our defaults.
53 72
  foreach (array_keys($form_state['plugin']['defaults']) as $key) {
54 73
    $form_state['conf'][$key] = $form_state['values'][$key];
55 74
  }
56 75
}
57 76

  
58
function advanced_forum_forum_search_content_type_admin_title($subtype, $conf, $context) {
77
/**
78
 * Callback for admin title.
79
 */
80
function advanced_forum_forum_search_content_type_admin_title(
81
  $subtype,
82
  $conf,
83
  $context
84
) {
59 85
  return t('"@s" search', array('@s' => $context->identifier));
60 86
}

Formats disponibles : Unified diff