@@ -157,13 +157,11 @@ discard block |
||
157 | 157 | if (!$values['boinc_root_dir']) { |
158 | 158 | form_set_error('boinc_root_dir', t('BOINC project root directory must be |
159 | 159 | defined!')); |
160 | - } |
|
161 | - elseif (!is_dir($values['boinc_root_dir'])) { |
|
160 | + } elseif (!is_dir($values['boinc_root_dir'])) { |
|
162 | 161 | form_set_error('boinc_root_dir', t('BOINC project root not found at %directory', |
163 | 162 | array('%directory' => $values['boinc_root_dir']) |
164 | 163 | )); |
165 | - } |
|
166 | - else { |
|
164 | + } else { |
|
167 | 165 | // By default, try to automatically set specific directories from the root |
168 | 166 | if (!$values['boinc_config_xml_dir']) { |
169 | 167 | $values['boinc_config_xml_dir'] = $values['boinc_root_dir']; |
@@ -285,8 +283,7 @@ discard block |
||
285 | 283 | if (!$values['boinc_scheduler_urls']) { |
286 | 284 | form_set_error('boinc_scheduler_urls', t('At least one scheduling server |
287 | 285 | URL must be specified.')); |
288 | - } |
|
289 | - else { |
|
286 | + } else { |
|
290 | 287 | $urls = explode("\r\n", $values['boinc_scheduler_urls']); |
291 | 288 | foreach ($urls as $key => $url) { |
292 | 289 | if (!$url) { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | //drupal_set_message(print_r($default, true)); |
49 | 49 | //drupal_set_message(print_r($form_state, true)); |
50 | 50 | // Show overrides if the root dir is set and others have not been detected |
51 | - $show_overrides = FALSE; |
|
51 | + $show_overrides = false; |
|
52 | 52 | if ($default['boinc_root_dir']) { |
53 | 53 | foreach ($default as $key => $dir) { |
54 | 54 | switch ($key) { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | // If any of these values are not set, show the overrides section |
60 | 60 | if (!$dir) { |
61 | 61 | $default[$key] = $form_state['values'][$key]; |
62 | - $show_overrides = TRUE; |
|
62 | + $show_overrides = true; |
|
63 | 63 | break; |
64 | 64 | } |
65 | 65 | break; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | '#title' => t('Overrides'), |
84 | 84 | '#type' => 'fieldset', |
85 | 85 | '#description' => '', |
86 | - '#collapsible' => TRUE, |
|
86 | + '#collapsible' => true, |
|
87 | 87 | '#collapsed' => !$show_overrides, |
88 | 88 | '#attributes' => array('class' => 'advanced-settings') |
89 | 89 | ); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | )); |
213 | 213 | } |
214 | 214 | if ($values['boinc_host_sched_logs_dir'] |
215 | - AND !is_dir($values['boinc_host_sched_logs_dir']) |
|
215 | + and !is_dir($values['boinc_host_sched_logs_dir']) |
|
216 | 216 | ) { |
217 | 217 | form_set_error('boinc_host_sched_logs_dir', t('Host scheduler log |
218 | 218 | directory not found at %directory', |
@@ -346,11 +346,11 @@ discard block |
||
346 | 346 | ); |
347 | 347 | $form['boinc_other_frontpage'] = array ( |
348 | 348 | '#type' => 'textarea', |
349 | - '#title' => bts('Message for site\'s Home Page', array(), NULL, 'boinc:admin-boinc-other-options'), |
|
349 | + '#title' => bts('Message for site\'s Home Page', array(), null, 'boinc:admin-boinc-other-options'), |
|
350 | 350 | '#default_value' => $default['boinc_other_frontpage'], |
351 | 351 | '#cols' => 60, |
352 | 352 | '#rows' => 8, |
353 | - '#description' => bts('Text to be displayed on the site\'s Home landing page.', array(), NULL, 'boinc:admin-boinc-other-options'), |
|
353 | + '#description' => bts('Text to be displayed on the site\'s Home landing page.', array(), null, 'boinc:admin-boinc-other-options'), |
|
354 | 354 | ); |
355 | 355 | |
356 | 356 | return system_settings_form($form); |
@@ -363,17 +363,17 @@ discard block |
||
363 | 363 | $values = $form_state['values']; |
364 | 364 | |
365 | 365 | $accountfinish = $values['boinc_weboptions_accountfinish']; |
366 | - if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) { |
|
366 | + if ( ($accountfinish) and (!drupal_lookup_path('source', $accountfinish)) ) { |
|
367 | 367 | form_set_error('boinc weboptions_accountfinish', t('Path to custom account finish page not found. Please provide a valid path, or leave blank to unset.')); |
368 | 368 | } |
369 | 369 | |
370 | 370 | $moderationpage = $values['boinc_weboptions_moderationpage']; |
371 | - if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) { |
|
371 | + if ( ($moderationpage) and (!drupal_lookup_path('source', $moderationpage)) ) { |
|
372 | 372 | form_set_error('boinc weboptions_moderationpage', t('Path to moderation page not found. Please provide a valid path, or leave blank to unset.')); |
373 | 373 | } |
374 | 374 | |
375 | 375 | $rulespolicies = $values['boinc_weboptions_rulespolicies']; |
376 | - if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) { |
|
376 | + if ( ($rulespolicies) and (!drupal_lookup_path('source', $rulespolicies)) ) { |
|
377 | 377 | form_set_error('boinc weboptions_rulespolicies', t('Path to rules and policies page not found. Please provide a valid path, or leave blank to unset.')); |
378 | 378 | } |
379 | 379 | } |
@@ -382,5 +382,5 @@ discard block |
||
382 | 382 | * Submit BOINC other form |
383 | 383 | */ |
384 | 384 | function boincuser_admin_weboptions_submit($form, &$form_state) { |
385 | - drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') ); |
|
385 | + drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), null, 'boinc:admin-boinc-website-options') ); |
|
386 | 386 | } |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | }*/ |
29 | 29 | |
30 | 30 | /** |
31 | - * The BOINC environment form allows paths to be set to connect Drupal to an |
|
32 | - * existing BOINC web interface. |
|
33 | - */ |
|
31 | + * The BOINC environment form allows paths to be set to connect Drupal to an |
|
32 | + * existing BOINC web interface. |
|
33 | + */ |
|
34 | 34 | function boincuser_admin_environment(&$form_state) { |
35 | - global $base_url; |
|
36 | - $form = array(); |
|
37 | - $default = array( |
|
35 | + global $base_url; |
|
36 | + $form = array(); |
|
37 | + $default = array( |
|
38 | 38 | 'boinc_root_dir' => variable_get('boinc_root_dir', ''), |
39 | 39 | 'boinc_config_xml_dir' => variable_get('boinc_config_xml_dir', ''), |
40 | 40 | 'boinc_html_inc_dir' => variable_get('boinc_html_inc_dir', ''), |
@@ -44,343 +44,343 @@ discard block |
||
44 | 44 | 'boinc_server_status_url' => variable_get('boinc_server_status_url', ''), |
45 | 45 | 'boinc_app_list_url' => variable_get('boinc_app_list_url', ''), |
46 | 46 | 'boinc_debug_mode' => variable_get('boinc_debug_mode', 0), |
47 | - ); |
|
48 | - //drupal_set_message(print_r($default, true)); |
|
49 | - //drupal_set_message(print_r($form_state, true)); |
|
50 | - // Show overrides if the root dir is set and others have not been detected |
|
51 | - $show_overrides = FALSE; |
|
52 | - if ($default['boinc_root_dir']) { |
|
47 | + ); |
|
48 | + //drupal_set_message(print_r($default, true)); |
|
49 | + //drupal_set_message(print_r($form_state, true)); |
|
50 | + // Show overrides if the root dir is set and others have not been detected |
|
51 | + $show_overrides = FALSE; |
|
52 | + if ($default['boinc_root_dir']) { |
|
53 | 53 | foreach ($default as $key => $dir) { |
54 | - switch ($key) { |
|
55 | - case 'boinc_config_xml_dir': |
|
54 | + switch ($key) { |
|
55 | + case 'boinc_config_xml_dir': |
|
56 | 56 | case 'boinc_html_inc_dir': |
57 | 57 | case 'boinc_project_config_dir': |
58 | 58 | case 'boinc_user_image_dir': |
59 | 59 | // If any of these values are not set, show the overrides section |
60 | 60 | if (!$dir) { |
61 | - $default[$key] = $form_state['values'][$key]; |
|
62 | - $show_overrides = TRUE; |
|
63 | - break; |
|
61 | + $default[$key] = $form_state['values'][$key]; |
|
62 | + $show_overrides = TRUE; |
|
63 | + break; |
|
64 | 64 | } |
65 | 65 | break; |
66 | - default: |
|
66 | + default: |
|
67 | 67 | } |
68 | - if ($show_overrides) { |
|
68 | + if ($show_overrides) { |
|
69 | 69 | break; |
70 | - } |
|
70 | + } |
|
71 | 71 | } |
72 | - } |
|
73 | - // Define the form |
|
74 | - $form['boinc_root_dir'] = array( |
|
72 | + } |
|
73 | + // Define the form |
|
74 | + $form['boinc_root_dir'] = array( |
|
75 | 75 | '#type' => 'textfield', |
76 | 76 | '#title' => t('BOINC project root directory'), |
77 | 77 | '#default_value' => $default['boinc_root_dir'], |
78 | 78 | '#description' => t('The filesystem path to the BOINC project root. This |
79 | 79 | directory should contain config.xml as well as the html subdirectory, |
80 | 80 | which itself contains inc/, project/, and user_profile/.'), |
81 | - ); |
|
82 | - $form['overrides'] = array( |
|
81 | + ); |
|
82 | + $form['overrides'] = array( |
|
83 | 83 | '#title' => t('Overrides'), |
84 | 84 | '#type' => 'fieldset', |
85 | 85 | '#description' => '', |
86 | 86 | '#collapsible' => TRUE, |
87 | 87 | '#collapsed' => !$show_overrides, |
88 | 88 | '#attributes' => array('class' => 'advanced-settings') |
89 | - ); |
|
90 | - $form['overrides']['boinc_config_xml_dir'] = array( |
|
89 | + ); |
|
90 | + $form['overrides']['boinc_config_xml_dir'] = array( |
|
91 | 91 | '#type' => 'textfield', |
92 | 92 | '#title' => t('BOINC config.xml directory'), |
93 | 93 | '#default_value' => $default['boinc_config_xml_dir'], |
94 | 94 | '#description' => t('The filesystem path that contains config.xml'), |
95 | - ); |
|
96 | - $form['overrides']['boinc_html_inc_dir'] = array( |
|
95 | + ); |
|
96 | + $form['overrides']['boinc_html_inc_dir'] = array( |
|
97 | 97 | '#type' => 'textfield', |
98 | 98 | '#title' => t('BOINC web includes directory'), |
99 | 99 | '#default_value' => $default['boinc_html_inc_dir'], |
100 | 100 | '#description' => t('The filesystem path to the html/inc/ directory that |
101 | 101 | contains util.inc'), |
102 | - ); |
|
103 | - $form['overrides']['boinc_project_config_dir'] = array( |
|
102 | + ); |
|
103 | + $form['overrides']['boinc_project_config_dir'] = array( |
|
104 | 104 | '#type' => 'textfield', |
105 | 105 | '#title' => t('BOINC project config directory'), |
106 | 106 | '#default_value' => $default['boinc_project_config_dir'], |
107 | 107 | '#description' => t('The filesystem path to the project/ directory that |
108 | 108 | contains project.inc'), |
109 | - ); |
|
110 | - $form['overrides']['boinc_user_image_dir'] = array( |
|
109 | + ); |
|
110 | + $form['overrides']['boinc_user_image_dir'] = array( |
|
111 | 111 | '#type' => 'textfield', |
112 | 112 | '#title' => t('BOINC user profile image directory'), |
113 | 113 | '#default_value' => $default['boinc_user_image_dir'], |
114 | 114 | '#description' => t('The filesystem directory that contains user images'), |
115 | - ); |
|
116 | - $form['boinc_server_status_url'] = array( |
|
115 | + ); |
|
116 | + $form['boinc_server_status_url'] = array( |
|
117 | 117 | '#type' => 'textfield', |
118 | 118 | '#title' => t('BOINC server status page URL (optional)'), |
119 | 119 | '#default_value' => $default['boinc_server_status_url'], |
120 | 120 | '#description' => t('An absolute URL or path relative to the site base to the server status page (e.g. %full_url or just %relative_url).', |
121 | - array( |
|
121 | + array( |
|
122 | 122 | '%full_url' => $base_url . '/server_status.php', |
123 | 123 | '%relative_url' => 'server_status.php', |
124 | - ) |
|
124 | + ) |
|
125 | 125 | ), |
126 | - ); |
|
127 | - $form['boinc_app_list_url'] = array( |
|
126 | + ); |
|
127 | + $form['boinc_app_list_url'] = array( |
|
128 | 128 | '#type' => 'textfield', |
129 | 129 | '#title' => t('BOINC applications page URL (optional)'), |
130 | 130 | '#default_value' => $default['boinc_app_list_url'], |
131 | 131 | '#description' => t('An absolute URL or path relative to the site base to the applications page (e.g. %full_url or just %relative_url).', |
132 | - array( |
|
132 | + array( |
|
133 | 133 | '%full_url' => $base_url . '/apps.php', |
134 | 134 | '%relative_url' => 'apps.php', |
135 | - ) |
|
135 | + ) |
|
136 | 136 | ), |
137 | - ); |
|
138 | - $form['boinc_host_sched_logs_dir'] = array( |
|
137 | + ); |
|
138 | + $form['boinc_host_sched_logs_dir'] = array( |
|
139 | 139 | '#type' => 'textfield', |
140 | 140 | '#title' => t('BOINC host scheduler log directory (optional)'), |
141 | 141 | '#default_value' => $default['boinc_host_sched_logs_dir'], |
142 | 142 | '#description' => t('The filesystem directory that contains host scheduler logs'), |
143 | - ); |
|
144 | - $form['boinc_debug_mode'] = array( |
|
143 | + ); |
|
144 | + $form['boinc_debug_mode'] = array( |
|
145 | 145 | '#type' => 'checkbox', |
146 | 146 | '#title' => t('Show debug messages in system log'), |
147 | 147 | '#default_value' => $default['boinc_debug_mode'] |
148 | - ); |
|
149 | - return system_settings_form($form); |
|
148 | + ); |
|
149 | + return system_settings_form($form); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
153 | - * Validate the BOINC environment form. |
|
154 | - */ |
|
153 | + * Validate the BOINC environment form. |
|
154 | + */ |
|
155 | 155 | function boincuser_admin_environment_validate($form, &$form_state) { |
156 | - $values = $form_state['values']; |
|
157 | - if (!$values['boinc_root_dir']) { |
|
156 | + $values = $form_state['values']; |
|
157 | + if (!$values['boinc_root_dir']) { |
|
158 | 158 | form_set_error('boinc_root_dir', t('BOINC project root directory must be |
159 | 159 | defined!')); |
160 | - } |
|
161 | - elseif (!is_dir($values['boinc_root_dir'])) { |
|
160 | + } |
|
161 | + elseif (!is_dir($values['boinc_root_dir'])) { |
|
162 | 162 | form_set_error('boinc_root_dir', t('BOINC project root not found at %directory', |
163 | - array('%directory' => $values['boinc_root_dir']) |
|
163 | + array('%directory' => $values['boinc_root_dir']) |
|
164 | 164 | )); |
165 | - } |
|
166 | - else { |
|
165 | + } |
|
166 | + else { |
|
167 | 167 | // By default, try to automatically set specific directories from the root |
168 | 168 | if (!$values['boinc_config_xml_dir']) { |
169 | - $values['boinc_config_xml_dir'] = $values['boinc_root_dir']; |
|
170 | - form_set_value($form['overrides']['boinc_config_xml_dir'], $values['boinc_config_xml_dir'], $form_state); |
|
169 | + $values['boinc_config_xml_dir'] = $values['boinc_root_dir']; |
|
170 | + form_set_value($form['overrides']['boinc_config_xml_dir'], $values['boinc_config_xml_dir'], $form_state); |
|
171 | 171 | } |
172 | 172 | if (!$values['boinc_html_inc_dir']) { |
173 | - $values['boinc_html_inc_dir'] = "{$values['boinc_root_dir']}/html/inc"; |
|
174 | - form_set_value($form['overrides']['boinc_html_inc_dir'], $values['boinc_html_inc_dir'], $form_state); |
|
173 | + $values['boinc_html_inc_dir'] = "{$values['boinc_root_dir']}/html/inc"; |
|
174 | + form_set_value($form['overrides']['boinc_html_inc_dir'], $values['boinc_html_inc_dir'], $form_state); |
|
175 | 175 | } |
176 | 176 | if (!$values['boinc_project_config_dir']) { |
177 | - $values['boinc_project_config_dir'] = "{$values['boinc_root_dir']}/html/project"; |
|
178 | - form_set_value($form['overrides']['boinc_project_config_dir'], $values['boinc_project_config_dir'], $form_state); |
|
177 | + $values['boinc_project_config_dir'] = "{$values['boinc_root_dir']}/html/project"; |
|
178 | + form_set_value($form['overrides']['boinc_project_config_dir'], $values['boinc_project_config_dir'], $form_state); |
|
179 | 179 | } |
180 | 180 | if (!$values['boinc_user_image_dir']) { |
181 | - $values['boinc_user_image_dir'] = "{$values['boinc_root_dir']}/html/user_profile/images"; |
|
182 | - form_set_value($form['overrides']['boinc_user_image_dir'], $values['boinc_user_image_dir'], $form_state); |
|
181 | + $values['boinc_user_image_dir'] = "{$values['boinc_root_dir']}/html/user_profile/images"; |
|
182 | + form_set_value($form['overrides']['boinc_user_image_dir'], $values['boinc_user_image_dir'], $form_state); |
|
183 | 183 | } |
184 | 184 | // Validate that required BOINC content is found |
185 | 185 | if (!is_readable("{$values['boinc_config_xml_dir']}/config.xml")) { |
186 | - form_set_error('boinc_config_xml_dir', t('@file not found in %directory', |
|
186 | + form_set_error('boinc_config_xml_dir', t('@file not found in %directory', |
|
187 | 187 | array( |
188 | - '@file' => 'config.xml', |
|
189 | - '%directory' => "{$values['boinc_config_xml_dir']}/" |
|
188 | + '@file' => 'config.xml', |
|
189 | + '%directory' => "{$values['boinc_config_xml_dir']}/" |
|
190 | 190 | ) |
191 | - )); |
|
191 | + )); |
|
192 | 192 | } |
193 | 193 | if (!is_readable("{$values['boinc_html_inc_dir']}/util.inc")) { |
194 | - form_set_error('boinc_html_inc_dir', t('@file not found in %directory', |
|
194 | + form_set_error('boinc_html_inc_dir', t('@file not found in %directory', |
|
195 | 195 | array( |
196 | - '@file' => 'util.inc', |
|
197 | - '%directory' => "{$values['boinc_html_inc_dir']}/" |
|
196 | + '@file' => 'util.inc', |
|
197 | + '%directory' => "{$values['boinc_html_inc_dir']}/" |
|
198 | 198 | ) |
199 | - )); |
|
199 | + )); |
|
200 | 200 | } |
201 | 201 | if (!is_readable("{$values['boinc_project_config_dir']}/project.inc")) { |
202 | - form_set_error('boinc_project_config_dir', t('@file not found in %directory', |
|
202 | + form_set_error('boinc_project_config_dir', t('@file not found in %directory', |
|
203 | 203 | array( |
204 | - '@file' => 'project.inc', |
|
205 | - '%directory' => "{$values['boinc_project_config_dir']}/" |
|
204 | + '@file' => 'project.inc', |
|
205 | + '%directory' => "{$values['boinc_project_config_dir']}/" |
|
206 | 206 | ) |
207 | - )); |
|
207 | + )); |
|
208 | 208 | } |
209 | 209 | if (!is_dir($values['boinc_user_image_dir'])) { |
210 | - form_set_error('boinc_user_image_dir', t('Profile image directory not found |
|
210 | + form_set_error('boinc_user_image_dir', t('Profile image directory not found |
|
211 | 211 | at %directory', array('%directory' => $values['boinc_user_image_dir']) |
212 | - )); |
|
212 | + )); |
|
213 | 213 | } |
214 | 214 | if ($values['boinc_host_sched_logs_dir'] |
215 | 215 | AND !is_dir($values['boinc_host_sched_logs_dir']) |
216 | - ) { |
|
217 | - form_set_error('boinc_host_sched_logs_dir', t('Host scheduler log |
|
216 | + ) { |
|
217 | + form_set_error('boinc_host_sched_logs_dir', t('Host scheduler log |
|
218 | 218 | directory not found at %directory', |
219 | 219 | array('%directory' => $values['boinc_host_sched_logs_dir']) |
220 | - )); |
|
220 | + )); |
|
221 | + } |
|
221 | 222 | } |
222 | - } |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
226 | - * Handle post-validation submission of BOINC environment form. |
|
227 | - */ |
|
226 | + * Handle post-validation submission of BOINC environment form. |
|
227 | + */ |
|
228 | 228 | function boincuser_admin_environment_submit($form, &$form_state) { |
229 | - unset($_SESSION['boinc_env']); |
|
230 | - drupal_set_message(t('BOINC environment settings have been updated.')); |
|
229 | + unset($_SESSION['boinc_env']); |
|
230 | + drupal_set_message(t('BOINC environment settings have been updated.')); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
234 | - * The BOINC scheduler form provides options for how scheduler tags are |
|
235 | - * inserted into the front page |
|
236 | - */ |
|
234 | + * The BOINC scheduler form provides options for how scheduler tags are |
|
235 | + * inserted into the front page |
|
236 | + */ |
|
237 | 237 | function boincuser_admin_scheduler(&$form_state) { |
238 | - $form = array(); |
|
239 | - $config_cgi_url = ''; |
|
240 | - if ($config_xml_dir = variable_get('boinc_config_xml_dir', '')) { |
|
238 | + $form = array(); |
|
239 | + $config_cgi_url = ''; |
|
240 | + if ($config_xml_dir = variable_get('boinc_config_xml_dir', '')) { |
|
241 | 241 | // Get the cgi_url option from the config file as the default scheduler URL |
242 | 242 | $xml = new DOMDocument(); |
243 | 243 | if ($xml->load("{$config_xml_dir}/config.xml")) { |
244 | - $config = xml_to_array($xml); |
|
245 | - if (isset($config['boinc']['config']['cgi_url']['@value'])) { |
|
244 | + $config = xml_to_array($xml); |
|
245 | + if (isset($config['boinc']['config']['cgi_url']['@value'])) { |
|
246 | 246 | $config_cgi_url = rtrim(trim($config['boinc']['config']['cgi_url']['@value']), '/'); |
247 | 247 | $config_cgi_url .= '/cgi'; |
248 | - } |
|
248 | + } |
|
249 | + } |
|
249 | 250 | } |
250 | - } |
|
251 | - $default = array( |
|
251 | + $default = array( |
|
252 | 252 | 'boinc_scheduler_urls' => variable_get('boinc_scheduler_urls', $config_cgi_url), |
253 | 253 | 'boinc_scheduler_tag_format_old' => variable_get('boinc_scheduler_tag_format_old', 1), |
254 | 254 | 'boinc_scheduler_tag_format_new' => variable_get('boinc_scheduler_tag_format_new', 1) |
255 | - ); |
|
255 | + ); |
|
256 | 256 | |
257 | - // Define the form |
|
258 | - $form['boinc_scheduler_urls'] = array( |
|
257 | + // Define the form |
|
258 | + $form['boinc_scheduler_urls'] = array( |
|
259 | 259 | '#type' => 'textarea', |
260 | 260 | '#title' => t('Scheduling server URLs'), |
261 | 261 | '#default_value' => $default['boinc_scheduler_urls'], |
262 | 262 | '#cols' => 60, |
263 | 263 | '#rows' => 5, |
264 | 264 | '#description' => t('If there are multiple URLs, please enter one per line.'), |
265 | - ); |
|
266 | - $form['boinc_scheduler_tag_format_old'] = array( |
|
265 | + ); |
|
266 | + $form['boinc_scheduler_tag_format_old'] = array( |
|
267 | 267 | '#type' => 'checkbox', |
268 | 268 | '#title' => t('Old format (@scheduler tag)', array('@scheduler' => '<scheduler>')), |
269 | 269 | '#default_value' => $default['boinc_scheduler_tag_format_old'] |
270 | - ); |
|
271 | - $form['boinc_scheduler_tag_format_new'] = array( |
|
270 | + ); |
|
271 | + $form['boinc_scheduler_tag_format_new'] = array( |
|
272 | 272 | '#type' => 'checkbox', |
273 | 273 | '#title' => t('New format (@link tag)', array('@link' => '<link>')), |
274 | 274 | '#default_value' => $default['boinc_scheduler_tag_format_new'] |
275 | - ); |
|
275 | + ); |
|
276 | 276 | |
277 | - return system_settings_form($form); |
|
277 | + return system_settings_form($form); |
|
278 | 278 | } |
279 | 279 | |
280 | 280 | /** |
281 | - * Validate the BOINC scheduler form. |
|
282 | - */ |
|
281 | + * Validate the BOINC scheduler form. |
|
282 | + */ |
|
283 | 283 | function boincuser_admin_scheduler_validate($form, &$form_state) { |
284 | - $values = $form_state['values']; |
|
285 | - if (!$values['boinc_scheduler_urls']) { |
|
284 | + $values = $form_state['values']; |
|
285 | + if (!$values['boinc_scheduler_urls']) { |
|
286 | 286 | form_set_error('boinc_scheduler_urls', t('At least one scheduling server |
287 | 287 | URL must be specified.')); |
288 | - } |
|
289 | - else { |
|
288 | + } |
|
289 | + else { |
|
290 | 290 | $urls = explode("\r\n", $values['boinc_scheduler_urls']); |
291 | 291 | foreach ($urls as $key => $url) { |
292 | - if (!$url) { |
|
292 | + if (!$url) { |
|
293 | 293 | unset($urls[$key]); |
294 | 294 | continue; |
295 | - } |
|
296 | - if (!filter_var($url, FILTER_VALIDATE_URL)) { |
|
295 | + } |
|
296 | + if (!filter_var($url, FILTER_VALIDATE_URL)) { |
|
297 | 297 | form_set_error('boinc_scheduler_urls', t('@url is not a valid URL |
298 | 298 | format.', array('@url' => $url))); |
299 | 299 | break; |
300 | - } |
|
300 | + } |
|
301 | 301 | } |
302 | 302 | $form_state['values']['boinc_scheduler_urls'] = implode("\r\n", $urls); |
303 | - } |
|
303 | + } |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | /** |
307 | - * Handle post-validation submission of BOINC scheduler form. |
|
308 | - */ |
|
307 | + * Handle post-validation submission of BOINC scheduler form. |
|
308 | + */ |
|
309 | 309 | function boincuser_admin_scheduler_submit($form, &$form_state) { |
310 | - drupal_set_message(t('BOINC scheduling server settings have been updated.')); |
|
310 | + drupal_set_message(t('BOINC scheduling server settings have been updated.')); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | |
314 | 314 | /** |
315 | - * Drupal-BOINC Web site related options. |
|
316 | - */ |
|
315 | + * Drupal-BOINC Web site related options. |
|
316 | + */ |
|
317 | 317 | function boincuser_admin_weboptions(&$form_state) { |
318 | - $form = array(); |
|
318 | + $form = array(); |
|
319 | 319 | |
320 | - //form defaults |
|
321 | - $default = array( |
|
320 | + //form defaults |
|
321 | + $default = array( |
|
322 | 322 | 'boinc_weboptions_accountfinish' => variable_get('boinc_weboptions_accountfinish', ''), |
323 | 323 | 'boinc_weboptions_moderationpage' => variable_get('boinc_weboptions_moderationpage', ''), |
324 | 324 | 'boinc_weboptions_rulespolicies' => variable_get('boinc_weboptions_rulespolicies', ''), |
325 | 325 | 'boinc_other_frontpage' => variable_get('boinc_other_frontpage', ''), |
326 | - ); |
|
326 | + ); |
|
327 | 327 | |
328 | - // Define the form |
|
329 | - $form['boinc_weboptions_accountfinish'] = array ( |
|
328 | + // Define the form |
|
329 | + $form['boinc_weboptions_accountfinish'] = array ( |
|
330 | 330 | '#type' => 'textfield', |
331 | 331 | '#title' => t('Path to a custom account_finish.php page, should be a path to a node'), |
332 | 332 | '#description' => t('Provide a path to a node which will serve as your site\'s landing page for users create an account using the BOINC client manager. They will be directed to this page after the account is created. If blank, a default account_finish page will be used.<br>Examples: account_finish, content/welcome, node/123'), |
333 | 333 | '#default_value' => $default['boinc_weboptions_accountfinish'], |
334 | - ); |
|
335 | - $form['boinc_weboptions_moderationpage'] = array ( |
|
334 | + ); |
|
335 | + $form['boinc_weboptions_moderationpage'] = array ( |
|
336 | 336 | '#type' => 'textfield', |
337 | 337 | '#title' => t('Path to the site\'s content moderation info page, should be a path to a node'), |
338 | 338 | '#description' => t('Provide a path to a node which will serve as your site\'s page for account/content moderation information. This will be used on the default account_finish page. If blank, no link to a moderation page will be provided. If a path is provided to the custom account_finish.php page (above), this field will be ignored.<br>Examples: moderation, content/moderation, node/456'), |
339 | 339 | '#default_value' => $default['boinc_weboptions_moderationpage'], |
340 | - ); |
|
341 | - $form['boinc_weboptions_rulespolicies'] = array ( |
|
340 | + ); |
|
341 | + $form['boinc_weboptions_rulespolicies'] = array ( |
|
342 | 342 | '#type' => 'textfield', |
343 | 343 | '#title' => t('Path to the site\'s rule and policies page, should be a path to a node'), |
344 | 344 | '#description' => t('Provide a path to a node which will serve as your site\'s rules and policies page. This will be used on the Join page shown to new users. If blank, no link to a rules and policies page will be provided.<br>Examples: rules-and-policies, node/789'), |
345 | 345 | '#default_value' => $default['boinc_weboptions_rulespolicies'], |
346 | - ); |
|
347 | - $form['boinc_other_frontpage'] = array ( |
|
346 | + ); |
|
347 | + $form['boinc_other_frontpage'] = array ( |
|
348 | 348 | '#type' => 'textarea', |
349 | 349 | '#title' => bts('Message for site\'s Home Page', array(), NULL, 'boinc:admin-boinc-other-options'), |
350 | 350 | '#default_value' => $default['boinc_other_frontpage'], |
351 | 351 | '#cols' => 60, |
352 | 352 | '#rows' => 8, |
353 | 353 | '#description' => bts('Text to be displayed on the site\'s Home landing page.', array(), NULL, 'boinc:admin-boinc-other-options'), |
354 | - ); |
|
354 | + ); |
|
355 | 355 | |
356 | - return system_settings_form($form); |
|
356 | + return system_settings_form($form); |
|
357 | 357 | } |
358 | 358 | |
359 | 359 | /** |
360 | - * Validate BOINC other form |
|
361 | - */ |
|
360 | + * Validate BOINC other form |
|
361 | + */ |
|
362 | 362 | function boincuser_admin_weboptions_validate($form, &$form_state) { |
363 | - $values = $form_state['values']; |
|
363 | + $values = $form_state['values']; |
|
364 | 364 | |
365 | - $accountfinish = $values['boinc_weboptions_accountfinish']; |
|
366 | - if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) { |
|
365 | + $accountfinish = $values['boinc_weboptions_accountfinish']; |
|
366 | + if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) { |
|
367 | 367 | form_set_error('boinc weboptions_accountfinish', t('Path to custom account finish page not found. Please provide a valid path, or leave blank to unset.')); |
368 | - } |
|
368 | + } |
|
369 | 369 | |
370 | - $moderationpage = $values['boinc_weboptions_moderationpage']; |
|
371 | - if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) { |
|
370 | + $moderationpage = $values['boinc_weboptions_moderationpage']; |
|
371 | + if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) { |
|
372 | 372 | form_set_error('boinc weboptions_moderationpage', t('Path to moderation page not found. Please provide a valid path, or leave blank to unset.')); |
373 | - } |
|
373 | + } |
|
374 | 374 | |
375 | - $rulespolicies = $values['boinc_weboptions_rulespolicies']; |
|
376 | - if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) { |
|
375 | + $rulespolicies = $values['boinc_weboptions_rulespolicies']; |
|
376 | + if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) { |
|
377 | 377 | form_set_error('boinc weboptions_rulespolicies', t('Path to rules and policies page not found. Please provide a valid path, or leave blank to unset.')); |
378 | - } |
|
378 | + } |
|
379 | 379 | } |
380 | 380 | |
381 | 381 | /** |
382 | - * Submit BOINC other form |
|
383 | - */ |
|
382 | + * Submit BOINC other form |
|
383 | + */ |
|
384 | 384 | function boincuser_admin_weboptions_submit($form, &$form_state) { |
385 | - drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') ); |
|
385 | + drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') ); |
|
386 | 386 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | '#default_value' => $default['boinc_server_status_url'], |
120 | 120 | '#description' => t('An absolute URL or path relative to the site base to the server status page (e.g. %full_url or just %relative_url).', |
121 | 121 | array( |
122 | - '%full_url' => $base_url . '/server_status.php', |
|
122 | + '%full_url' => $base_url.'/server_status.php', |
|
123 | 123 | '%relative_url' => 'server_status.php', |
124 | 124 | ) |
125 | 125 | ), |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | '#default_value' => $default['boinc_app_list_url'], |
131 | 131 | '#description' => t('An absolute URL or path relative to the site base to the applications page (e.g. %full_url or just %relative_url).', |
132 | 132 | array( |
133 | - '%full_url' => $base_url . '/apps.php', |
|
133 | + '%full_url' => $base_url.'/apps.php', |
|
134 | 134 | '%relative_url' => 'apps.php', |
135 | 135 | ) |
136 | 136 | ), |
@@ -326,25 +326,25 @@ discard block |
||
326 | 326 | ); |
327 | 327 | |
328 | 328 | // Define the form |
329 | - $form['boinc_weboptions_accountfinish'] = array ( |
|
329 | + $form['boinc_weboptions_accountfinish'] = array( |
|
330 | 330 | '#type' => 'textfield', |
331 | 331 | '#title' => t('Path to a custom account_finish.php page, should be a path to a node'), |
332 | 332 | '#description' => t('Provide a path to a node which will serve as your site\'s landing page for users create an account using the BOINC client manager. They will be directed to this page after the account is created. If blank, a default account_finish page will be used.<br>Examples: account_finish, content/welcome, node/123'), |
333 | 333 | '#default_value' => $default['boinc_weboptions_accountfinish'], |
334 | 334 | ); |
335 | - $form['boinc_weboptions_moderationpage'] = array ( |
|
335 | + $form['boinc_weboptions_moderationpage'] = array( |
|
336 | 336 | '#type' => 'textfield', |
337 | 337 | '#title' => t('Path to the site\'s content moderation info page, should be a path to a node'), |
338 | 338 | '#description' => t('Provide a path to a node which will serve as your site\'s page for account/content moderation information. This will be used on the default account_finish page. If blank, no link to a moderation page will be provided. If a path is provided to the custom account_finish.php page (above), this field will be ignored.<br>Examples: moderation, content/moderation, node/456'), |
339 | 339 | '#default_value' => $default['boinc_weboptions_moderationpage'], |
340 | 340 | ); |
341 | - $form['boinc_weboptions_rulespolicies'] = array ( |
|
341 | + $form['boinc_weboptions_rulespolicies'] = array( |
|
342 | 342 | '#type' => 'textfield', |
343 | 343 | '#title' => t('Path to the site\'s rule and policies page, should be a path to a node'), |
344 | 344 | '#description' => t('Provide a path to a node which will serve as your site\'s rules and policies page. This will be used on the Join page shown to new users. If blank, no link to a rules and policies page will be provided.<br>Examples: rules-and-policies, node/789'), |
345 | 345 | '#default_value' => $default['boinc_weboptions_rulespolicies'], |
346 | 346 | ); |
347 | - $form['boinc_other_frontpage'] = array ( |
|
347 | + $form['boinc_other_frontpage'] = array( |
|
348 | 348 | '#type' => 'textarea', |
349 | 349 | '#title' => bts('Message for site\'s Home Page', array(), NULL, 'boinc:admin-boinc-other-options'), |
350 | 350 | '#default_value' => $default['boinc_other_frontpage'], |
@@ -363,17 +363,17 @@ discard block |
||
363 | 363 | $values = $form_state['values']; |
364 | 364 | |
365 | 365 | $accountfinish = $values['boinc_weboptions_accountfinish']; |
366 | - if ( ($accountfinish) AND (!drupal_lookup_path('source', $accountfinish)) ) { |
|
366 | + if (($accountfinish) AND (!drupal_lookup_path('source', $accountfinish))) { |
|
367 | 367 | form_set_error('boinc weboptions_accountfinish', t('Path to custom account finish page not found. Please provide a valid path, or leave blank to unset.')); |
368 | 368 | } |
369 | 369 | |
370 | 370 | $moderationpage = $values['boinc_weboptions_moderationpage']; |
371 | - if ( ($moderationpage) AND (!drupal_lookup_path('source', $moderationpage)) ) { |
|
371 | + if (($moderationpage) AND (!drupal_lookup_path('source', $moderationpage))) { |
|
372 | 372 | form_set_error('boinc weboptions_moderationpage', t('Path to moderation page not found. Please provide a valid path, or leave blank to unset.')); |
373 | 373 | } |
374 | 374 | |
375 | 375 | $rulespolicies = $values['boinc_weboptions_rulespolicies']; |
376 | - if ( ($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies)) ) { |
|
376 | + if (($rulespolicies) AND (!drupal_lookup_path('source', $rulespolicies))) { |
|
377 | 377 | form_set_error('boinc weboptions_rulespolicies', t('Path to rules and policies page not found. Please provide a valid path, or leave blank to unset.')); |
378 | 378 | } |
379 | 379 | } |
@@ -382,5 +382,5 @@ discard block |
||
382 | 382 | * Submit BOINC other form |
383 | 383 | */ |
384 | 384 | function boincuser_admin_weboptions_submit($form, &$form_state) { |
385 | - drupal_set_message( bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options') ); |
|
385 | + drupal_set_message(bts("Status: Drupa-BOINC Web site options have been updated", array(), NULL, 'boinc:admin-boinc-website-options')); |
|
386 | 386 | } |
@@ -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 | } |
@@ -2,7 +2,7 @@ |
||
2 | 2 | // $Id: theme-settings.php,v 1.7 2008/09/11 09:36:50 johnalbin Exp $ |
3 | 3 | |
4 | 4 | // Include the definition of zen_settings() and zen_theme_get_default_settings(). |
5 | -include_once './' . drupal_get_path('theme', 'zen') . '/theme-settings.php'; |
|
5 | +include_once './'.drupal_get_path('theme', 'zen').'/theme-settings.php'; |
|
6 | 6 | |
7 | 7 | |
8 | 8 | /** |
@@ -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 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | $export = array(); |
8 | 8 | |
9 | 9 | $strongarm = new stdClass; |
10 | - $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
10 | + $strongarm->disabled = false; /* Edit this to true to make a default strongarm disabled initially */ |
|
11 | 11 | $strongarm->api_version = 1; |
12 | 12 | $strongarm->name = 'i18nstrings_allowed_formats'; |
13 | 13 | $strongarm->value = array( |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $export['i18nstrings_allowed_formats'] = $strongarm; |
18 | 18 | |
19 | 19 | $strongarm = new stdClass; |
20 | - $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
20 | + $strongarm->disabled = false; /* Edit this to true to make a default strongarm disabled initially */ |
|
21 | 21 | $strongarm->api_version = 1; |
22 | 22 | $strongarm->name = 'i18ntaxonomy_vocabulary'; |
23 | 23 | $strongarm->value = array( |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $export['i18ntaxonomy_vocabulary'] = $strongarm; |
28 | 28 | |
29 | 29 | $strongarm = new stdClass; |
30 | - $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ |
|
30 | + $strongarm->disabled = false; /* Edit this to true to make a default strongarm disabled initially */ |
|
31 | 31 | $strongarm->api_version = 1; |
32 | 32 | $strongarm->name = 'language_negotiation'; |
33 | 33 | $strongarm->value = '2'; |
@@ -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 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | $export = array(); |
8 | 8 | |
9 | 9 | $searcher = new stdClass; |
10 | - $searcher->disabled = FALSE; /* Edit this to true to make a default searcher disabled initially */ |
|
10 | + $searcher->disabled = false; /* Edit this to true to make a default searcher disabled initially */ |
|
11 | 11 | $searcher->api_version = 3; |
12 | 12 | $searcher->page_id = 'team_search'; |
13 | 13 | $searcher->label = 'Team search'; |
@@ -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 | } |