@@ -5,45 +5,45 @@ discard block |
||
5 | 5 | * Callback admin/boinc/import/settings |
6 | 6 | */ |
7 | 7 | function boincimport_admin_settings() { |
8 | - global $conf ; |
|
9 | - global $db_url; |
|
10 | - global $base_url; |
|
11 | - $stage = variable_get('boincimport_config_stage', 0); |
|
8 | + global $conf ; |
|
9 | + global $db_url; |
|
10 | + global $base_url; |
|
11 | + $stage = variable_get('boincimport_config_stage', 0); |
|
12 | 12 | |
13 | - // Start with a quick sanity check on the BOINC environment |
|
14 | - boinc_get_path(); |
|
13 | + // Start with a quick sanity check on the BOINC environment |
|
14 | + boinc_get_path(); |
|
15 | 15 | |
16 | - //We'll be checking that the setup is complete. |
|
17 | - //If it is not complete, the migration will not go ahead. |
|
18 | - $ready_for_migration = 1; |
|
16 | + //We'll be checking that the setup is complete. |
|
17 | + //If it is not complete, the migration will not go ahead. |
|
18 | + $ready_for_migration = 1; |
|
19 | 19 | |
20 | - // Checking that the migration has been tested on a copy first. |
|
21 | - $form['test'] = array( |
|
20 | + // Checking that the migration has been tested on a copy first. |
|
21 | + $form['test'] = array( |
|
22 | 22 | '#type' => 'fieldset', |
23 | 23 | '#title' => t('Test on copy first'), |
24 | 24 | '#collapsible' => TRUE, |
25 | 25 | '#collapsed' => TRUE, |
26 | - ); |
|
26 | + ); |
|
27 | 27 | |
28 | - $output = ''; |
|
29 | - if (!variable_get('boincimport_tested', 0)) { |
|
28 | + $output = ''; |
|
29 | + if (!variable_get('boincimport_tested', 0)) { |
|
30 | 30 | $form['test']['#collapsed']= FALSE; |
31 | 31 | $output = '<span class="marker">'; |
32 | 32 | $ready_for_migration = 0; |
33 | - } |
|
34 | - $output .= '<p>' . t('The migration will modify and even destroy some data. You |
|
33 | + } |
|
34 | + $output .= '<p>' . t('The migration will modify and even destroy some data. You |
|
35 | 35 | must test this module on a copy of your data first, several times if necessary. |
36 | 36 | Only use this module on your live data when you are familiar with the procedure |
37 | 37 | and you\'re confident everything will run smoothly.') . '</p><p>' . t('Also, you |
38 | 38 | should make a full backup of your database just prior to performing the |
39 | 39 | migration on the live data. It is better to turn off both the BOINC site and the |
40 | 40 | Drupal site during the migration.') . '</p>'; |
41 | - if (!variable_get('boincimport_tested', 0)) { |
|
41 | + if (!variable_get('boincimport_tested', 0)) { |
|
42 | 42 | $output .= '</span>'; |
43 | - } |
|
44 | - $form['test']['intro'] = array('#value' => $output); |
|
43 | + } |
|
44 | + $form['test']['intro'] = array('#value' => $output); |
|
45 | 45 | |
46 | - $form['test']['boincimport_tested'] = array( |
|
46 | + $form['test']['boincimport_tested'] = array( |
|
47 | 47 | '#type' => 'checkbox', |
48 | 48 | '#title' => t('I am running a trial migration on a disposable copy of the database |
49 | 49 | OR I have already done so and I am running this on my live site, confident that |
@@ -51,64 +51,64 @@ discard block |
||
51 | 51 | '#return_value' => 1, |
52 | 52 | '#default_value' => variable_get('boincimport_tested', 0), |
53 | 53 | '#description' => '', |
54 | - ); |
|
54 | + ); |
|
55 | 55 | |
56 | - // Where is BOINC data? |
|
57 | - $pre = variable_get('boincimport_table_prefix', ''); |
|
58 | - $tables = array($pre .'forum', $pre .'post', $pre .'thread', $pre .'user'); |
|
59 | - $db = (is_array($db_url) AND isset($db_url['boinc'])) ? 'boinc' : 'default'; |
|
60 | - $result = _boincimport_check_tables($tables, $db, 0); |
|
56 | + // Where is BOINC data? |
|
57 | + $pre = variable_get('boincimport_table_prefix', ''); |
|
58 | + $tables = array($pre .'forum', $pre .'post', $pre .'thread', $pre .'user'); |
|
59 | + $db = (is_array($db_url) AND isset($db_url['boinc'])) ? 'boinc' : 'default'; |
|
60 | + $result = _boincimport_check_tables($tables, $db, 0); |
|
61 | 61 | |
62 | - $config_path = conf_path(); |
|
63 | - $form['boinc_data'] = array( |
|
62 | + $config_path = conf_path(); |
|
63 | + $form['boinc_data'] = array( |
|
64 | 64 | '#type' => 'fieldset', |
65 | 65 | '#title' => t('Location of BOINC data'), |
66 | 66 | '#collapsible' => TRUE, |
67 | 67 | '#collapsed' => TRUE, |
68 | - ); |
|
69 | - $form['boinc_data']['boincimport_db_configured'] = array( |
|
68 | + ); |
|
69 | + $form['boinc_data']['boincimport_db_configured'] = array( |
|
70 | 70 | '#type' => 'checkbox', |
71 | 71 | '#title' => t('There is a \'boinc\' database connection string configured in %file', |
72 | - array('%file' => "{$config_path}/settings.php")), |
|
72 | + array('%file' => "{$config_path}/settings.php")), |
|
73 | 73 | '#return_value' => 1, |
74 | 74 | '#default_value' => variable_get('boincimport_db_configured', 1), |
75 | 75 | '#description' => '', |
76 | 76 | '#disabled' => ($result['result']) ? TRUE : FALSE |
77 | - ); |
|
78 | - if (variable_get('boincimport_db_configured', 1) != 1) { |
|
77 | + ); |
|
78 | + if (variable_get('boincimport_db_configured', 1) != 1) { |
|
79 | 79 | $default_db_url = is_array($db_url) ? end($db_url) : $db_url; |
80 | 80 | $url = variable_get('boincimport_db_url', $default_db_url); |
81 | 81 | if (!preg_match('{(mysql|pgsql):\/\/(.+):(.*?)@(.+)/(\w+)}i', $url)) { |
82 | - $output = '<p class="marker">'. t('Set the address of the BOINC database |
|
82 | + $output = '<p class="marker">'. t('Set the address of the BOINC database |
|
83 | 83 | according to the following format:') . '<br /><pre> |
84 | 84 | mysql://boinc_username:boinc_password@localhost/boinc_database |
85 | 85 | </pre></p>'; |
86 | - $ready_for_migration = 0; |
|
87 | - $form['boinc_data']['#collapsed'] = FALSE; |
|
88 | - $form['boinc_data']['db_connect_string_note'] = array('#value' => $output); |
|
86 | + $ready_for_migration = 0; |
|
87 | + $form['boinc_data']['#collapsed'] = FALSE; |
|
88 | + $form['boinc_data']['db_connect_string_note'] = array('#value' => $output); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $form['boinc_data']['boincimport_db_url'] = array( |
92 | - '#type' => 'textfield', |
|
93 | - '#title' => t('BOINC database location'), |
|
94 | - '#default_value' => variable_get('boincimport_db_url', $default_db_url), |
|
95 | - '#size' => 80, |
|
96 | - '#maxlength' => 255, |
|
97 | - '#description' => '', |
|
92 | + '#type' => 'textfield', |
|
93 | + '#title' => t('BOINC database location'), |
|
94 | + '#default_value' => variable_get('boincimport_db_url', $default_db_url), |
|
95 | + '#size' => 80, |
|
96 | + '#maxlength' => 255, |
|
97 | + '#description' => '', |
|
98 | 98 | ); |
99 | - } |
|
99 | + } |
|
100 | 100 | |
101 | - $output = '<p>' . t('Note that due to a limitation within Drupal core, we cannot |
|
101 | + $output = '<p>' . t('Note that due to a limitation within Drupal core, we cannot |
|
102 | 102 | import messages from one database type to another database type. E.g, we |
103 | 103 | cannot import BOINC from a myqsl DB, to a postgresql DB. You need to import |
104 | 104 | the data into the same type of database first (import all the BOINC data, as is, |
105 | 105 | from mysql to postgresql).') . '</p><p>' . t('If both BOINC and Drupal are on |
106 | 106 | postgresql, see !this_issue.', array('!this_issue' => l(t('this issue'), |
107 | 107 | 'http://drupal.org/node/64877', array('attributes' => array('target' => '_blank'))))) . '</p>'; |
108 | - $form['boinc_data']['note'] = array('#value' => $output); |
|
108 | + $form['boinc_data']['note'] = array('#value' => $output); |
|
109 | 109 | |
110 | - // BOINC table prefix |
|
111 | - $form['boinc_data']['boincimport_table_prefix'] = array( |
|
110 | + // BOINC table prefix |
|
111 | + $form['boinc_data']['boincimport_table_prefix'] = array( |
|
112 | 112 | '#type' => 'textfield', |
113 | 113 | '#title' => t('BOINC table prefix'), |
114 | 114 | '#default_value' => variable_get('boincimport_table_prefix', ''), |
@@ -116,30 +116,30 @@ discard block |
||
116 | 116 | '#maxlength' => 255, |
117 | 117 | '#description' => t('What prefix is used for your BOINC tables?'), |
118 | 118 | '#disabled' => ($result['result']) ? TRUE : FALSE |
119 | - ); |
|
119 | + ); |
|
120 | 120 | |
121 | - $output = $result['html']; |
|
122 | - if ($result['result'] != 1) { |
|
121 | + $output = $result['html']; |
|
122 | + if ($result['result'] != 1) { |
|
123 | 123 | $ready_for_migration = 0; |
124 | 124 | $form['boinc_data']['#collapsed']= FALSE; |
125 | 125 | $output .= '<span class="marker">'; |
126 | 126 | $output .= t('Some tables couldn\'t be found. Are the database settings correct? |
127 | 127 | Please correct the errors so that the BOINC tables can be accessed.'); |
128 | 128 | $output .= '</span>'; |
129 | - } |
|
129 | + } |
|
130 | 130 | |
131 | - $form['boinc_data']['result'] = array('#value' => $output); |
|
131 | + $form['boinc_data']['result'] = array('#value' => $output); |
|
132 | 132 | |
133 | - // USERS settings |
|
134 | - $form['users'] = array( |
|
133 | + // USERS settings |
|
134 | + $form['users'] = array( |
|
135 | 135 | '#type' => 'fieldset', |
136 | 136 | '#title' => t('User import'), |
137 | 137 | '#collapsible' => TRUE, |
138 | 138 | '#collapsed' => TRUE, |
139 | - ); |
|
139 | + ); |
|
140 | 140 | |
141 | - // User import batch size |
|
142 | - $form['users']['boincimport_user_batch_size'] = array( |
|
141 | + // User import batch size |
|
142 | + $form['users']['boincimport_user_batch_size'] = array( |
|
143 | 143 | '#type' => 'textfield', |
144 | 144 | '#title' => t('Number of accounts to process at a time'), |
145 | 145 | '#default_value' => variable_get('boincimport_user_batch_size', 50), |
@@ -148,10 +148,10 @@ discard block |
||
148 | 148 | '#description' => t('Due to memory intensive API calls, this value may have to |
149 | 149 | be adjusted to avoid exhausting system resources. The default value is a |
150 | 150 | balance between performance and reliability.') |
151 | - ); |
|
151 | + ); |
|
152 | 152 | |
153 | - // Import users who have never posted? |
|
154 | - $form['users']['boincimport_import_lurkers'] = array( |
|
153 | + // Import users who have never posted? |
|
154 | + $form['users']['boincimport_import_lurkers'] = array( |
|
155 | 155 | '#type' => 'checkbox', |
156 | 156 | '#title' => t('Import users who have never posted?'), |
157 | 157 | '#return_value' => 1, |
@@ -160,199 +160,199 @@ discard block |
||
160 | 160 | involvement? This may not be desired, as it can take a very long time to |
161 | 161 | import tens or hundreds of thousands of accounts. (note that users who |
162 | 162 | are not imported now will still be imported on-the-fly upon login)'), |
163 | - ); |
|
163 | + ); |
|
164 | 164 | |
165 | - // Input format settings |
|
166 | - $form['input'] = array( |
|
165 | + // Input format settings |
|
166 | + $form['input'] = array( |
|
167 | 167 | '#type' => 'fieldset', |
168 | 168 | '#title' => t('Input format settings'), |
169 | 169 | '#collapsible' => TRUE, |
170 | 170 | '#collapsed' => TRUE |
171 | - ); |
|
172 | - $output = '<p>'. t('Select which !input_format should be used for the imported |
|
171 | + ); |
|
172 | + $output = '<p>'. t('Select which !input_format should be used for the imported |
|
173 | 173 | messages. It is highly-recommended that this value be left as it is, as the |
174 | 174 | Full HTML and PHP code formats can be very dangerous!', |
175 | 175 | array('!input_format' => l(t('input format'), 'admin/settings/filters'))) .'</p>'; |
176 | - $form['input']['intro'] = array('#value' => $output); |
|
176 | + $form['input']['intro'] = array('#value' => $output); |
|
177 | 177 | |
178 | - $formats = db_query('SELECT format, name FROM {filter_formats}'); |
|
179 | - while ($format = db_fetch_array($formats)) { |
|
178 | + $formats = db_query('SELECT format, name FROM {filter_formats}'); |
|
179 | + while ($format = db_fetch_array($formats)) { |
|
180 | 180 | $input_formats[$format['format']]= $format['name']; |
181 | - } |
|
181 | + } |
|
182 | 182 | |
183 | - // By default, use the format named "Rich text"; fall back to Filtered HTML |
|
184 | - $default_input_format = db_result(db_query(" |
|
183 | + // By default, use the format named "Rich text"; fall back to Filtered HTML |
|
184 | + $default_input_format = db_result(db_query(" |
|
185 | 185 | SELECT format FROM {filter_formats} WHERE name = '%s'", 'Rich text')); |
186 | - if (!$default_input_format) $default_input_format = 1; |
|
186 | + if (!$default_input_format) $default_input_format = 1; |
|
187 | 187 | |
188 | - $input_format = variable_get('boincimport_input_format', $default_input_format); |
|
189 | - $form['input']['boincimport_input_format'] = array( |
|
188 | + $input_format = variable_get('boincimport_input_format', $default_input_format); |
|
189 | + $form['input']['boincimport_input_format'] = array( |
|
190 | 190 | '#type' => 'radios', |
191 | 191 | '#title' => t('Input format'), |
192 | 192 | '#default_value' => $input_format, |
193 | 193 | '#options' => $input_formats |
194 | - ); |
|
195 | - if (!$input_format) { |
|
194 | + ); |
|
195 | + if (!$input_format) { |
|
196 | 196 | $ready_for_migration = 0; |
197 | 197 | $form['input']['#collapsed']= FALSE; |
198 | - } |
|
199 | - $output = '<p><em>'. t('This setting will be applied to all posts and private |
|
198 | + } |
|
199 | + $output = '<p><em>'. t('This setting will be applied to all posts and private |
|
200 | 200 | messages.') .'</em></p>'; |
201 | - $form['input']['result'] = array('#value' => $output); |
|
201 | + $form['input']['result'] = array('#value' => $output); |
|
202 | 202 | |
203 | - // BBcode settings |
|
204 | - $form['bbcode'] = array( |
|
203 | + // BBcode settings |
|
204 | + $form['bbcode'] = array( |
|
205 | 205 | '#type' => 'fieldset', |
206 | 206 | '#title' => t('BBcode settings'), |
207 | 207 | '#collapsible' => TRUE, |
208 | 208 | '#collapsed' => TRUE, |
209 | - ); |
|
209 | + ); |
|
210 | 210 | |
211 | - $output = '<p>' . t('BOINC posts are often formatted in BBcode. During the |
|
211 | + $output = '<p>' . t('BOINC posts are often formatted in BBcode. During the |
|
212 | 212 | import process, BBcode can be handled in two diffent ways') . ':</p>'; |
213 | - $output .= '<ul><li>' . t('Leave the BBcode as is and use the !bbcode_module |
|
213 | + $output .= '<ul><li>' . t('Leave the BBcode as is and use the !bbcode_module |
|
214 | 214 | after the migration to filter the imported posts. In this case, the module |
215 | 215 | is not required during the migration, but will need to be installed and |
216 | 216 | configured later.', |
217 | 217 | array('!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', |
218 | 218 | array('attributes' => array('target' => '_blank'))))) . '</li>'; |
219 | - $output .= '<li>' . t('Filter the BBcode now and replace it with plain HTML. |
|
219 | + $output .= '<li>' . t('Filter the BBcode now and replace it with plain HTML. |
|
220 | 220 | The BBcode module will be required during the migration process, but can |
221 | 221 | be disabled afterwards.') . '</li></ul>'; |
222 | - $output .= '<p>' . t('An appropriate input filter should be chosen, as well, |
|
222 | + $output .= '<p>' . t('An appropriate input filter should be chosen, as well, |
|
223 | 223 | as it will affect how the post is displayed. For example, if BBcode is |
224 | 224 | removed and replaced by HTML, some HTML tags will be stripped by the |
225 | 225 | "Filtered HTML" input format unless they are first added to the list of |
226 | 226 | allowed tags in that format. See the !input_formats page.', |
227 | 227 | array('!input_formats' => l(t('input formats'), 'admin/settings/filters'))) . '</p>'; |
228 | 228 | |
229 | - $form['bbcode']['intro'] = array('#value' => $output); |
|
230 | - $form['bbcode']['boincimport_bbcode'] = array( |
|
229 | + $form['bbcode']['intro'] = array('#value' => $output); |
|
230 | + $form['bbcode']['boincimport_bbcode'] = array( |
|
231 | 231 | '#type' => 'radios', |
232 | 232 | '#title' => t('BBcode handling'), |
233 | 233 | '#default_value' => variable_get('boincimport_bbcode', 0), |
234 | 234 | '#options' => array(t('Leave BBcode as is.'), t('Transform BBcode into HTML.')), |
235 | 235 | '#description' => '', |
236 | - ); |
|
236 | + ); |
|
237 | 237 | |
238 | - $module_status = _boincimport_check_module('bbcode'); |
|
239 | - $bbcode_disabled = ($module_status['result'] == 0) ? true : false; |
|
240 | - $output = $module_status['html']; |
|
238 | + $module_status = _boincimport_check_module('bbcode'); |
|
239 | + $bbcode_disabled = ($module_status['result'] == 0) ? true : false; |
|
240 | + $output = $module_status['html']; |
|
241 | 241 | |
242 | - if (variable_get('boincimport_bbcode', 0)) { |
|
242 | + if (variable_get('boincimport_bbcode', 0)) { |
|
243 | 243 | if ($bbcode_disabled) { |
244 | - $ready_for_migration = 0; |
|
245 | - $form['bbcode']['#collapsed'] = FALSE; |
|
246 | - $output .= '<p><span class="marker">'; |
|
247 | - $output .= t('The !bbcode_module is required to transform BBcode into HTML. |
|
244 | + $ready_for_migration = 0; |
|
245 | + $form['bbcode']['#collapsed'] = FALSE; |
|
246 | + $output .= '<p><span class="marker">'; |
|
247 | + $output .= t('The !bbcode_module is required to transform BBcode into HTML. |
|
248 | 248 | You first need to !enable_bbcode', array( |
249 | - '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))), |
|
250 | - '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules'))); |
|
251 | - $output .= '</span></p>'; |
|
249 | + '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))), |
|
250 | + '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules'))); |
|
251 | + $output .= '</span></p>'; |
|
252 | 252 | } |
253 | 253 | $sql = "SELECT COUNT(*) FROM {filters} WHERE module = 'bbcode' AND format = %d"; |
254 | 254 | $result = db_query($sql, $input_format); |
255 | 255 | if (!db_result($result)) { |
256 | - $form['bbcode']['#collapsed'] = FALSE; |
|
257 | - $output .= '<p class="marker">'. t('You need to !enable_bbcode_input and |
|
256 | + $form['bbcode']['#collapsed'] = FALSE; |
|
257 | + $output .= '<p class="marker">'. t('You need to !enable_bbcode_input and |
|
258 | 258 | then !configure_bbcode_options', array( |
259 | - '!enable_bbcode_input' => l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"), |
|
260 | - '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) .'</p>'; |
|
259 | + '!enable_bbcode_input' => l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"), |
|
260 | + '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) .'</p>'; |
|
261 | 261 | } |
262 | 262 | $output .= '<p>'. t('For best results, !disable_all_options', |
263 | 263 | array('!disable_all_options' => l(t('all four BBcode configure options should be disabled'), "admin/settings/filters/{$input_format}/configure"))) . '.</p>'; |
264 | - } else { |
|
264 | + } else { |
|
265 | 265 | if ($bbcode_disabled) { |
266 | - $form['bbcode']['#collapsed'] = FALSE; |
|
267 | - $output .= '<p>'. t('The !bbcode_module is recommended, but not required. |
|
266 | + $form['bbcode']['#collapsed'] = FALSE; |
|
267 | + $output .= '<p>'. t('The !bbcode_module is recommended, but not required. |
|
268 | 268 | You may !enable_bbcode after having installed it.', array( |
269 | - '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))), |
|
270 | - '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules'))) .'</p>'; |
|
269 | + '!bbcode_module' => l(t('bbcode module'), 'http://drupal.org/project/bbcode', array('attributes' => array('target' => '_blank'))), |
|
270 | + '!enable_bbcode' => l(t('enable the bbcode module'), 'admin/build/modules'))) .'</p>'; |
|
271 | 271 | } |
272 | 272 | $output .= '<p>' . t('Don\'t forget to !enable_bbcode_input and then !configure_bbcode_options.', array( |
273 | - '!enable_bbcode_input' => l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"), |
|
274 | - '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) . '</p>'; |
|
273 | + '!enable_bbcode_input' => l(t('enable BBcode in the selected input format'), "admin/settings/filters/{$input_format}"), |
|
274 | + '!configure_bbcode_options' => l(t('configure BBcode options'), "admin/settings/filters/{$input_format}/configure"))) . '</p>'; |
|
275 | 275 | $output .= '<p>' . t('You may want to enable it for other input formats, too.') . '</p>'; |
276 | - } |
|
277 | - $output .= '<p><em>'. t('This setting will be applied to all posts, private |
|
276 | + } |
|
277 | + $output .= '<p><em>'. t('This setting will be applied to all posts, private |
|
278 | 278 | messages and the users\' signature.') .'</em></p>'; |
279 | 279 | |
280 | - $form['bbcode']['result'] = array('#value' => $output); |
|
280 | + $form['bbcode']['result'] = array('#value' => $output); |
|
281 | 281 | |
282 | - // URL transform settings |
|
283 | - $form['url_transforms'] = array( |
|
282 | + // URL transform settings |
|
283 | + $form['url_transforms'] = array( |
|
284 | 284 | '#type' => 'fieldset', |
285 | 285 | '#title' => t('URL transforms'), |
286 | 286 | '#collapsible' => TRUE, |
287 | 287 | '#collapsed' => TRUE, |
288 | - ); |
|
289 | - if (!variable_get('boincimport_base_url_boinc', 0)) { |
|
288 | + ); |
|
289 | + if (!variable_get('boincimport_base_url_boinc', 0)) { |
|
290 | 290 | $form['url_transforms']['#collapsed']= FALSE; |
291 | 291 | $output = '<span class="marker">'; |
292 | 292 | $ready_for_migration = 0; |
293 | - } |
|
293 | + } |
|
294 | 294 | |
295 | - // List of BOINC domains possible in URLs to transform |
|
296 | - $form['url_transforms']['boincimport_base_url_boinc'] = array( |
|
295 | + // List of BOINC domains possible in URLs to transform |
|
296 | + $form['url_transforms']['boincimport_base_url_boinc'] = array( |
|
297 | 297 | '#type' => 'textarea', |
298 | 298 | '#title' => t('BOINC base URLs to transform'), |
299 | 299 | '#default_value' => variable_get('boincimport_base_url_boinc', ''), |
300 | 300 | '#description' => t('List URL bases that should be transformed from |
301 | 301 | BOINC format to Drupal format (enter one domain per line, including http://).'), |
302 | - ); |
|
302 | + ); |
|
303 | 303 | |
304 | - // The Drupal domain to use in URL transform results |
|
305 | - $form['url_transforms']['boincimport_base_url_drupal'] = array( |
|
304 | + // The Drupal domain to use in URL transform results |
|
305 | + $form['url_transforms']['boincimport_base_url_drupal'] = array( |
|
306 | 306 | '#type' => 'textfield', |
307 | 307 | '#title' => t('Target Drupal base URL'), |
308 | 308 | '#default_value' => variable_get('boincimport_base_url_drupal', ''), |
309 | 309 | '#description' => t('Specify the URL base to use in transform results. If |
310 | 310 | left blank, the base_url configured in this Drupal environment will be |
311 | 311 | used (currently: %url)', array('%url' =>$base_url)), |
312 | - ); |
|
312 | + ); |
|
313 | 313 | |
314 | - // Are we ready for migration? |
|
315 | - $form['migration'] = array( |
|
314 | + // Are we ready for migration? |
|
315 | + $form['migration'] = array( |
|
316 | 316 | '#type' => 'fieldset', |
317 | 317 | '#title' => 'Migration', |
318 | 318 | '#collapsible' => TRUE, |
319 | 319 | '#collapsed' => FALSE, |
320 | - ); |
|
321 | - variable_set('boincimport_ready', $ready_for_migration); |
|
322 | - if ($ready_for_migration) { |
|
320 | + ); |
|
321 | + variable_set('boincimport_ready', $ready_for_migration); |
|
322 | + if ($ready_for_migration) { |
|
323 | 323 | $output = '<p>'. t('Check the settings above one more time. If everything |
324 | 324 | is ok, !proceed.', array('!proceed' => l(t('you can now proceed with the migration'), 'admin/boinc/import/process'))) .'</p>'; |
325 | - } else { |
|
325 | + } else { |
|
326 | 326 | $output = '<p class="marker">'. t('You are not ready for the migration yet. |
327 | 327 | Please check the settings above.') .'</p>'; |
328 | - } |
|
328 | + } |
|
329 | 329 | |
330 | - $form['migration']['info'] = array('#value' => $output); |
|
331 | - return system_settings_form($form); |
|
330 | + $form['migration']['info'] = array('#value' => $output); |
|
331 | + return system_settings_form($form); |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | /** |
335 | 335 | * Callback admin/boinc/import/post_configuration |
336 | 336 | */ |
337 | 337 | function boincimport_post_configuration() { |
338 | - $output = '<p>'. t('This page will help to tie up any loose ends following |
|
338 | + $output = '<p>'. t('This page will help to tie up any loose ends following |
|
339 | 339 | the BOINC data import process. Before continuing, it may be best to have |
340 | 340 | already:') .'</p>'; |
341 | - $output .= '<ul>'; |
|
342 | - $output .= '<li>'. t('Imported users, teams, and forums using the BOINC |
|
341 | + $output .= '<ul>'; |
|
342 | + $output .= '<li>'. t('Imported users, teams, and forums using the BOINC |
|
343 | 343 | import module') .'</li>'; |
344 | - $output .= '<li>'. t('Imported any additional data using add on modules if |
|
344 | + $output .= '<li>'. t('Imported any additional data using add on modules if |
|
345 | 345 | available.') .'</li>'; |
346 | - $output .= '</ul>'; |
|
347 | - //User Set up |
|
348 | - $output .= '<h2>'. t('User settings') .'</h2>'; |
|
349 | - $output .= '<p>'. t('Make sure your !user_settings are correct. Specifically, |
|
346 | + $output .= '</ul>'; |
|
347 | + //User Set up |
|
348 | + $output .= '<h2>'. t('User settings') .'</h2>'; |
|
349 | + $output .= '<p>'. t('Make sure your !user_settings are correct. Specifically, |
|
350 | 350 | you can enable or disable signatures there. ', array( |
351 | - '!user_settings' => l(t('user settings'), 'admin/user/settings') |
|
351 | + '!user_settings' => l(t('user settings'), 'admin/user/settings') |
|
352 | 352 | )) .'</p>'; |
353 | - $output .= '<p>' . t('Note that avatar/picture support is not tied to user |
|
353 | + $output .= '<p>' . t('Note that avatar/picture support is not tied to user |
|
354 | 354 | settings Picture support at this time.') . '</p>'; |
355 | - /*$output .= '<p>' . t('In order to activate avatar/picture support, you need to |
|
355 | + /*$output .= '<p>' . t('In order to activate avatar/picture support, you need to |
|
356 | 356 | enable pictures on this page and also:') . '</p>'; |
357 | 357 | $output .= '<ul>'; |
358 | 358 | $output .= '<li>'. t('Tick the checkboxes to allow "User pictures in posts" and/or |
@@ -365,73 +365,73 @@ discard block |
||
365 | 365 | )) .'</li>'; |
366 | 366 | $output .= '</ul>'; */ |
367 | 367 | |
368 | - // Forum Set up |
|
369 | - $output .= '<h2>'. t('Forum settings') .'</h2>'; |
|
370 | - $output .= '<p>'. t('Check any additional changes to make on the |
|
368 | + // Forum Set up |
|
369 | + $output .= '<h2>'. t('Forum settings') .'</h2>'; |
|
370 | + $output .= '<p>'. t('Check any additional changes to make on the |
|
371 | 371 | !forum_settings page.', array( |
372 | - '!forum_settings' => l(t('forum settings'), 'admin/content/forum/settings') |
|
372 | + '!forum_settings' => l(t('forum settings'), 'admin/content/forum/settings') |
|
373 | 373 | )) .'</p>'; |
374 | - $output .= '<p>'. t('It also may be a good idea to look at the !forum_list to |
|
374 | + $output .= '<p>'. t('It also may be a good idea to look at the !forum_list to |
|
375 | 375 | verify that all necessary containers and forums are in place.', array( |
376 | - '!forum_list' => l(t('forum list'), 'admin/content/forum') |
|
376 | + '!forum_list' => l(t('forum list'), 'admin/content/forum') |
|
377 | 377 | )) .'</p>'; |
378 | - /*$output .= '<p>'. t('If need be, set up the private forums as explained in the |
|
378 | + /*$output .= '<p>'. t('If need be, set up the private forums as explained in the |
|
379 | 379 | !documentation.', array( |
380 | 380 | '!documentation' => l(t('documentation'), 'http://drupal.org/node/58969', array('attributes' => array('target' => '_blank'))) |
381 | 381 | )) .'</p>'; |
382 | 382 | */ |
383 | - /* |
|
383 | + /* |
|
384 | 384 | // Redirection from old URLs: |
385 | 385 | $output .= '<h2>'. t('Redirection from BOINC forum URLs to new Drupal forum URLs') .'</h2>'; |
386 | 386 | $output .= '<p>'. t('Enable the boincforum_redirect.module. This way, users |
387 | 387 | accessing URLs from your old BOINC installation will be redirected to your new |
388 | 388 | Drupal forum.') .'</p>'; |
389 | 389 | */ |
390 | - // BBcode |
|
391 | - $bbcode = variable_get('boincimport_bbcode', 0); |
|
392 | - if ($bbcode) { |
|
390 | + // BBcode |
|
391 | + $bbcode = variable_get('boincimport_bbcode', 0); |
|
392 | + if ($bbcode) { |
|
393 | 393 | $output .= '<h2>'. t('Remove BBcode module') .'</h2>'; |
394 | 394 | $output .= '<p>'. t('The BBcode has been cleaned from the posts. You shouldn\'t |
395 | 395 | need the bbcode module anymore. You can disable it.') .'</p>'; |
396 | - } else { |
|
396 | + } else { |
|
397 | 397 | $output .= '<h2>'. t('Configure BBcode module') .'</h2>'; |
398 | 398 | $output .= '<p>'. t('Most likely, there are many BOINC forum postings |
399 | 399 | formatted in BBcode. It would be a good idea to verify that BBcode is |
400 | 400 | being formatted correctly in the imported posts. Have a look around |
401 | 401 | !the_forum.', array( |
402 | 402 | '!the_forum' => l(t('the forum'), 'community') |
403 | - )) . '</p>'; |
|
404 | - } |
|
403 | + )) . '</p>'; |
|
404 | + } |
|
405 | 405 | |
406 | - return $output; |
|
406 | + return $output; |
|
407 | 407 | } |
408 | 408 | |
409 | 409 | /** |
410 | 410 | * Callback admin/boinc/import |
411 | 411 | */ |
412 | 412 | function boincimport_main() { |
413 | - // Start with a quick sanity check on the BOINC environment |
|
414 | - boinc_get_path(); |
|
415 | - // If that's ok, on with the show |
|
416 | - $output .= t('You may want to !check_documentation before starting.', array( |
|
413 | + // Start with a quick sanity check on the BOINC environment |
|
414 | + boinc_get_path(); |
|
415 | + // If that's ok, on with the show |
|
416 | + $output .= t('You may want to !check_documentation before starting.', array( |
|
417 | 417 | '!check_documentation' => l(t('check the documentation'), 'http://boinc.berkeley.edu/trac/wiki/InstallDrupal', array('attributes' =>array('target' => '_blank'))) |
418 | - )); |
|
419 | - $output = '<ol><li>'; |
|
420 | - $output .= l(t('Configure the migration'), 'admin/boinc/import/settings'); |
|
421 | - $output .= '</li>'; |
|
422 | - $output .= '<li>'; |
|
423 | - $output .= l(t('Execute the migration'), 'admin/boinc/import/process'); |
|
424 | - $output .= '</li>'; |
|
425 | - $output .= '<li>'; |
|
426 | - $output .= l(t('Post migration configuration'), 'admin/boinc/import/post_configuration'); |
|
427 | - $output .= '</li>'; |
|
428 | - $output .= '<li>'; |
|
429 | - $output .= t('!cleanup (Accessing this link will delete all the saved BOINC forum |
|
418 | + )); |
|
419 | + $output = '<ol><li>'; |
|
420 | + $output .= l(t('Configure the migration'), 'admin/boinc/import/settings'); |
|
421 | + $output .= '</li>'; |
|
422 | + $output .= '<li>'; |
|
423 | + $output .= l(t('Execute the migration'), 'admin/boinc/import/process'); |
|
424 | + $output .= '</li>'; |
|
425 | + $output .= '<li>'; |
|
426 | + $output .= l(t('Post migration configuration'), 'admin/boinc/import/post_configuration'); |
|
427 | + $output .= '</li>'; |
|
428 | + $output .= '<li>'; |
|
429 | + $output .= t('!cleanup (Accessing this link will delete all the saved BOINC forum |
|
430 | 430 | conversion settings: click only when you\'re done with all the above.)', array( |
431 | - '!cleanup' => l(t('Cleanup'), 'admin/boinc/import/cleanup') |
|
431 | + '!cleanup' => l(t('Cleanup'), 'admin/boinc/import/cleanup') |
|
432 | 432 | )); |
433 | - $output .= '</li>'; |
|
434 | - /*$output .= '<li>'; |
|
433 | + $output .= '</li>'; |
|
434 | + /*$output .= '<li>'; |
|
435 | 435 | $output .= t('Enable the boincforum_redirect module for seamless redirection |
436 | 436 | from the old forums to the new. This module requires !clean_urls to be active.', array( |
437 | 437 | '!clean_urls' => l(t('Clean URLs'), 'admin/settings/clean-urls') |
@@ -442,14 +442,14 @@ discard block |
||
442 | 442 | uninstall BOINC forum - This will delete tables necessary for redirection. You can, |
443 | 443 | however, deactivate the module safely.'); |
444 | 444 | $output .= '</li>';*/ |
445 | - $output .= '</ol>'; |
|
445 | + $output .= '</ol>'; |
|
446 | 446 | |
447 | - // process will die() if the link to the BOINC database is wrong: |
|
448 | - $output .= '<p>'. t('If the BOINC data is in another database, but you made a |
|
447 | + // process will die() if the link to the BOINC database is wrong: |
|
448 | + $output .= '<p>'. t('If the BOINC data is in another database, but you made a |
|
449 | 449 | mistake while setting up the data base url, you may be unable to access the |
450 | 450 | setting page due to some limitations of the core of Drupal. !reset_db_url.', array( |
451 | - '!reset_db_url' => l(t('Click here to reset the database url'), 'admin/boinc/import/reset') |
|
451 | + '!reset_db_url' => l(t('Click here to reset the database url'), 'admin/boinc/import/reset') |
|
452 | 452 | )) .'</p>'; |
453 | 453 | |
454 | - return $output; |
|
454 | + return $output; |
|
455 | 455 | } |
@@ -15,42 +15,42 @@ |
||
15 | 15 | */ |
16 | 16 | function boinc_settings($saved_settings) { |
17 | 17 | |
18 | - // Get the default values from the .info file. |
|
19 | - $defaults = zen_theme_get_default_settings('boinc'); |
|
18 | + // Get the default values from the .info file. |
|
19 | + $defaults = zen_theme_get_default_settings('boinc'); |
|
20 | 20 | |
21 | - // Merge the saved variables and their default values. |
|
22 | - $settings = array_merge($defaults, $saved_settings); |
|
21 | + // Merge the saved variables and their default values. |
|
22 | + $settings = array_merge($defaults, $saved_settings); |
|
23 | 23 | |
24 | - /* |
|
24 | + /* |
|
25 | 25 | * Create the form using Forms API: http://api.drupal.org/api/6 |
26 | 26 | */ |
27 | - $form = array(); |
|
28 | - $form['boinc_stats_charts'] = array( |
|
27 | + $form = array(); |
|
28 | + $form['boinc_stats_charts'] = array( |
|
29 | 29 | '#type' => 'fieldset', |
30 | 30 | '#title' => t('Chart settings'), |
31 | 31 | '#attributes' => array( |
32 | - 'class' => 'zen-settings', |
|
32 | + 'class' => 'zen-settings', |
|
33 | 33 | ), |
34 | - ); |
|
35 | - $form['boinc_stats_charts']['boinc_stats_chart_color'] = array( |
|
34 | + ); |
|
35 | + $form['boinc_stats_charts']['boinc_stats_chart_color'] = array( |
|
36 | 36 | '#type' => 'textfield', |
37 | 37 | '#title' => t('Chart color'), |
38 | 38 | '#default_value' => $settings['boinc_stats_chart_color'], |
39 | 39 | '#description' => t('The primary color of the stats chart in hex format (e.g. #FAA341).'), |
40 | - ); |
|
41 | - $form['boinc_stats_charts']['boinc_stats_chart_bcolor'] = array( |
|
40 | + ); |
|
41 | + $form['boinc_stats_charts']['boinc_stats_chart_bcolor'] = array( |
|
42 | 42 | '#type' => 'textfield', |
43 | 43 | '#title' => t('Chart background color'), |
44 | 44 | '#default_value' => $settings['boinc_stats_chart_bcolor'], |
45 | 45 | '#description' => t('The background color of the stats chart in hex format (e.g. #FFFFFF).'), |
46 | - ); |
|
46 | + ); |
|
47 | 47 | |
48 | - // Add the base theme's settings. |
|
49 | - $form += zen_settings($saved_settings, $defaults); |
|
48 | + // Add the base theme's settings. |
|
49 | + $form += zen_settings($saved_settings, $defaults); |
|
50 | 50 | |
51 | - // Remove some of the base theme's settings. |
|
52 | - unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet. |
|
51 | + // Remove some of the base theme's settings. |
|
52 | + unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet. |
|
53 | 53 | |
54 | - // Return the form |
|
55 | - return $form; |
|
54 | + // Return the form |
|
55 | + return $form; |
|
56 | 56 | } |
@@ -4,34 +4,34 @@ |
||
4 | 4 | * Implementation of hook_strongarm(). |
5 | 5 | */ |
6 | 6 | function internationalization_strongarm() { |
7 | - $export = array(); |
|
7 | + $export = array(); |
|
8 | 8 | |
9 | - $strongarm = new stdClass; |
|
10 | - $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
11 | - $strongarm->api_version = 1; |
|
12 | - $strongarm->name = 'i18nstrings_allowed_formats'; |
|
13 | - $strongarm->value = array( |
|
9 | + $strongarm = new stdClass; |
|
10 | + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
11 | + $strongarm->api_version = 1; |
|
12 | + $strongarm->name = 'i18nstrings_allowed_formats'; |
|
13 | + $strongarm->value = array( |
|
14 | 14 | 0 => 4, |
15 | 15 | 1 => 5, |
16 | - ); |
|
17 | - $export['i18nstrings_allowed_formats'] = $strongarm; |
|
16 | + ); |
|
17 | + $export['i18nstrings_allowed_formats'] = $strongarm; |
|
18 | 18 | |
19 | - $strongarm = new stdClass; |
|
20 | - $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
21 | - $strongarm->api_version = 1; |
|
22 | - $strongarm->name = 'i18ntaxonomy_vocabulary'; |
|
23 | - $strongarm->value = array( |
|
19 | + $strongarm = new stdClass; |
|
20 | + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
21 | + $strongarm->api_version = 1; |
|
22 | + $strongarm->name = 'i18ntaxonomy_vocabulary'; |
|
23 | + $strongarm->value = array( |
|
24 | 24 | 2 => '1', |
25 | 25 | 1 => '0', |
26 | - ); |
|
27 | - $export['i18ntaxonomy_vocabulary'] = $strongarm; |
|
26 | + ); |
|
27 | + $export['i18ntaxonomy_vocabulary'] = $strongarm; |
|
28 | 28 | |
29 | - $strongarm = new stdClass; |
|
30 | - $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
31 | - $strongarm->api_version = 1; |
|
32 | - $strongarm->name = 'language_negotiation'; |
|
33 | - $strongarm->value = '2'; |
|
34 | - $export['language_negotiation'] = $strongarm; |
|
29 | + $strongarm = new stdClass; |
|
30 | + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
31 | + $strongarm->api_version = 1; |
|
32 | + $strongarm->name = 'language_negotiation'; |
|
33 | + $strongarm->value = '2'; |
|
34 | + $export['language_negotiation'] = $strongarm; |
|
35 | 35 | |
36 | - return $export; |
|
36 | + return $export; |
|
37 | 37 | } |
@@ -4,47 +4,47 @@ |
||
4 | 4 | * Implementation of hook_user_default_permissions(). |
5 | 5 | */ |
6 | 6 | function internationalization_user_default_permissions() { |
7 | - $permissions = array(); |
|
7 | + $permissions = array(); |
|
8 | 8 | |
9 | - // Exported permission: administer all languages |
|
10 | - $permissions['administer all languages'] = array( |
|
9 | + // Exported permission: administer all languages |
|
10 | + $permissions['administer all languages'] = array( |
|
11 | 11 | 'name' => 'administer all languages', |
12 | 12 | 'roles' => array( |
13 | - '0' => 'administrator', |
|
13 | + '0' => 'administrator', |
|
14 | 14 | ), |
15 | - ); |
|
15 | + ); |
|
16 | 16 | |
17 | - // Exported permission: administer languages |
|
18 | - $permissions['administer languages'] = array( |
|
17 | + // Exported permission: administer languages |
|
18 | + $permissions['administer languages'] = array( |
|
19 | 19 | 'name' => 'administer languages', |
20 | 20 | 'roles' => array( |
21 | - '0' => 'administrator', |
|
21 | + '0' => 'administrator', |
|
22 | 22 | ), |
23 | - ); |
|
23 | + ); |
|
24 | 24 | |
25 | - // Exported permission: administer translations |
|
26 | - $permissions['administer translations'] = array( |
|
25 | + // Exported permission: administer translations |
|
26 | + $permissions['administer translations'] = array( |
|
27 | 27 | 'name' => 'administer translations', |
28 | 28 | 'roles' => array( |
29 | - '0' => 'administrator', |
|
29 | + '0' => 'administrator', |
|
30 | 30 | ), |
31 | - ); |
|
31 | + ); |
|
32 | 32 | |
33 | - // Exported permission: translate content |
|
34 | - $permissions['translate content'] = array( |
|
33 | + // Exported permission: translate content |
|
34 | + $permissions['translate content'] = array( |
|
35 | 35 | 'name' => 'translate content', |
36 | 36 | 'roles' => array( |
37 | - '0' => 'administrator', |
|
37 | + '0' => 'administrator', |
|
38 | 38 | ), |
39 | - ); |
|
39 | + ); |
|
40 | 40 | |
41 | - // Exported permission: translate interface |
|
42 | - $permissions['translate interface'] = array( |
|
41 | + // Exported permission: translate interface |
|
42 | + $permissions['translate interface'] = array( |
|
43 | 43 | 'name' => 'translate interface', |
44 | 44 | 'roles' => array( |
45 | - '0' => 'administrator', |
|
45 | + '0' => 'administrator', |
|
46 | 46 | ), |
47 | - ); |
|
47 | + ); |
|
48 | 48 | |
49 | - return $permissions; |
|
49 | + return $permissions; |
|
50 | 50 | } |
@@ -4,8 +4,8 @@ |
||
4 | 4 | * Implementation of hook_ctools_plugin_api(). |
5 | 5 | */ |
6 | 6 | function internationalization_ctools_plugin_api() { |
7 | - list($module, $api) = func_get_args(); |
|
8 | - if ($module == "strongarm" && $api == "strongarm") { |
|
7 | + list($module, $api) = func_get_args(); |
|
8 | + if ($module == "strongarm" && $api == "strongarm") { |
|
9 | 9 | return array("version" => 1); |
10 | - } |
|
10 | + } |
|
11 | 11 | } |
@@ -4,8 +4,8 @@ |
||
4 | 4 | * Implementation of hook_ctools_plugin_api(). |
5 | 5 | */ |
6 | 6 | function global_search_teams_solr_ctools_plugin_api() { |
7 | - list($module, $api) = func_get_args(); |
|
8 | - if ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") { |
|
7 | + list($module, $api) = func_get_args(); |
|
8 | + if ($module == "apachesolr_search" && $api == "apachesolr_search_defaults") { |
|
9 | 9 | return array("version" => 3); |
10 | - } |
|
10 | + } |
|
11 | 11 | } |
@@ -4,20 +4,20 @@ discard block |
||
4 | 4 | * Implementation of hook_apachesolr_search_default_searchers(). |
5 | 5 | */ |
6 | 6 | function global_search_teams_solr_apachesolr_search_default_searchers() { |
7 | - $export = array(); |
|
7 | + $export = array(); |
|
8 | 8 | |
9 | - $searcher = new stdClass; |
|
10 | - $searcher->disabled = FALSE; /* Edit this to true to make a default searcher disabled initially */ |
|
11 | - $searcher->api_version = 3; |
|
12 | - $searcher->page_id = 'team_search'; |
|
13 | - $searcher->label = 'Team search'; |
|
14 | - $searcher->description = ''; |
|
15 | - $searcher->search_path = 'search/team'; |
|
16 | - $searcher->page_title = 'Search teams'; |
|
17 | - $searcher->env_id = 'solr'; |
|
18 | - $searcher->settings = array( |
|
9 | + $searcher = new stdClass; |
|
10 | + $searcher->disabled = FALSE; /* Edit this to true to make a default searcher disabled initially */ |
|
11 | + $searcher->api_version = 3; |
|
12 | + $searcher->page_id = 'team_search'; |
|
13 | + $searcher->label = 'Team search'; |
|
14 | + $searcher->description = ''; |
|
15 | + $searcher->search_path = 'search/team'; |
|
16 | + $searcher->page_title = 'Search teams'; |
|
17 | + $searcher->env_id = 'solr'; |
|
18 | + $searcher->settings = array( |
|
19 | 19 | 'fq' => array( |
20 | - 0 => 'bundle:team', |
|
20 | + 0 => 'bundle:team', |
|
21 | 21 | ), |
22 | 22 | 'apachesolr_search_custom_enable' => 1, |
23 | 23 | 'apachesolr_search_search_type' => 'custom', |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | 'apachesolr_search_browse' => 'none', |
27 | 27 | 'apachesolr_search_spellcheck' => 1, |
28 | 28 | 'apachesolr_search_allow_user_input' => 0, |
29 | - ); |
|
30 | - $export['team_search'] = $searcher; |
|
29 | + ); |
|
30 | + $export['team_search'] = $searcher; |
|
31 | 31 | |
32 | - return $export; |
|
32 | + return $export; |
|
33 | 33 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | * Implementation of hook_views_api(). |
5 | 5 | */ |
6 | 6 | function user_account_host_list_views_api() { |
7 | - return array( |
|
7 | + return array( |
|
8 | 8 | 'api' => '2', |
9 | - ); |
|
9 | + ); |
|
10 | 10 | } |
@@ -4,33 +4,33 @@ |
||
4 | 4 | * Implementation of hook_user_default_permissions(). |
5 | 5 | */ |
6 | 6 | function global_search_solr_user_default_permissions() { |
7 | - $permissions = array(); |
|
7 | + $permissions = array(); |
|
8 | 8 | |
9 | - // Exported permission: administer search |
|
10 | - $permissions['administer search'] = array( |
|
9 | + // Exported permission: administer search |
|
10 | + $permissions['administer search'] = array( |
|
11 | 11 | 'name' => 'administer search', |
12 | 12 | 'roles' => array( |
13 | - '0' => 'administrator', |
|
13 | + '0' => 'administrator', |
|
14 | 14 | ), |
15 | - ); |
|
15 | + ); |
|
16 | 16 | |
17 | - // Exported permission: search content |
|
18 | - $permissions['search content'] = array( |
|
17 | + // Exported permission: search content |
|
18 | + $permissions['search content'] = array( |
|
19 | 19 | 'name' => 'search content', |
20 | 20 | 'roles' => array( |
21 | - '0' => 'anonymous user', |
|
22 | - '1' => 'authenticated user', |
|
21 | + '0' => 'anonymous user', |
|
22 | + '1' => 'authenticated user', |
|
23 | 23 | ), |
24 | - ); |
|
24 | + ); |
|
25 | 25 | |
26 | - // Exported permission: use advanced search |
|
27 | - $permissions['use advanced search'] = array( |
|
26 | + // Exported permission: use advanced search |
|
27 | + $permissions['use advanced search'] = array( |
|
28 | 28 | 'name' => 'use advanced search', |
29 | 29 | 'roles' => array( |
30 | - '0' => 'anonymous user', |
|
31 | - '1' => 'authenticated user', |
|
30 | + '0' => 'anonymous user', |
|
31 | + '1' => 'authenticated user', |
|
32 | 32 | ), |
33 | - ); |
|
33 | + ); |
|
34 | 34 | |
35 | - return $permissions; |
|
35 | + return $permissions; |
|
36 | 36 | } |