@@ -52,33 +52,33 @@ discard block |
||
52 | 52 | case 'list': |
53 | 53 | $blocks = array(); |
54 | 54 | foreach (menu_get_menus() as $name => $title) { |
55 | - $blocks['menu-' . $name] = array( |
|
55 | + $blocks['menu-'.$name] = array( |
|
56 | 56 | 'info' => t('Jump menu: !menu', array('!menu' => $name)) |
57 | 57 | ); |
58 | 58 | } |
59 | 59 | |
60 | 60 | $vocs = taxonomy_get_vocabularies(); |
61 | 61 | foreach ($vocs as $vid => $vocabulary) { |
62 | - $blocks['taxo-' . $vid] = array( |
|
62 | + $blocks['taxo-'.$vid] = array( |
|
63 | 63 | 'info' => t('Jump menu: !voc', array('!voc' => $vocabulary->name)) |
64 | 64 | ); |
65 | 65 | } |
66 | 66 | return $blocks; |
67 | 67 | case 'configure': |
68 | 68 | $form = array(); |
69 | - $form['block_settings']['jump_activepageinmenu_' . $delta] = array( |
|
69 | + $form['block_settings']['jump_activepageinmenu_'.$delta] = array( |
|
70 | 70 | '#type' => 'checkbox', |
71 | 71 | '#title' => t('Show active page in jump menu.'), |
72 | - '#default_value' => variable_get('jump_activepageinmenu_' . $delta, 1), |
|
72 | + '#default_value' => variable_get('jump_activepageinmenu_'.$delta, 1), |
|
73 | 73 | '#description' => t('This setting will force the jump menu to show the current page as the default selection in this block\'s jump menu.'), |
74 | 74 | ); |
75 | 75 | // Do the rest of the form additions in hook_form_alter() since we can't do ahah here. |
76 | 76 | return $form; |
77 | 77 | case 'save': |
78 | - variable_set('jump_activepageinmenu_' . $delta, $edit['jump_activepageinmenu_' . $delta]); |
|
79 | - variable_set('jump_use_js_' . $delta, $edit['jump_use_js_' . $delta]); |
|
80 | - variable_set('jump_add_select_' . $delta, $edit['jump_add_select_' . $delta]); |
|
81 | - variable_set('jump_add_select_text_' . $delta, $edit['jump_add_select_text_' . $delta]); |
|
78 | + variable_set('jump_activepageinmenu_'.$delta, $edit['jump_activepageinmenu_'.$delta]); |
|
79 | + variable_set('jump_use_js_'.$delta, $edit['jump_use_js_'.$delta]); |
|
80 | + variable_set('jump_add_select_'.$delta, $edit['jump_add_select_'.$delta]); |
|
81 | + variable_set('jump_add_select_text_'.$delta, $edit['jump_add_select_text_'.$delta]); |
|
82 | 82 | break; |
83 | 83 | case 'view': |
84 | 84 | // The first 5 characters of $delta should be one of: |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $vocab = taxonomy_vocabulary_load($jumpmenu_name); |
103 | 103 | $subject = $vocab->name; |
104 | 104 | } |
105 | - if (variable_get('jump_use_js_' . $delta, 0) === 1) drupal_add_js(drupal_get_path('module', 'jump') . '/jump.js'); |
|
105 | + if (variable_get('jump_use_js_'.$delta, 0) === 1) drupal_add_js(drupal_get_path('module', 'jump').'/jump.js'); |
|
106 | 106 | return array('subject' => $subject, 'content' => $form); |
107 | 107 | break; |
108 | 108 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | function jump_quickly($name = 'navigation', $type = 'menu', $active = -1, $override = '') { |
127 | 127 | // Reconstruct the $delta |
128 | - $delta = $type . '-' . $name; |
|
128 | + $delta = $type.'-'.$name; |
|
129 | 129 | if ($active === -1) { |
130 | 130 | $active = variable_get('jump_activepageinmenu', 1); |
131 | 131 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | static $num_jump_forms = 0; |
154 | 154 | $num_jump_forms++; |
155 | 155 | |
156 | - return drupal_get_form('jump_quickly_form_' . $num_jump_forms, $options, $menu_state); |
|
156 | + return drupal_get_form('jump_quickly_form_'.$num_jump_forms, $options, $menu_state); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | /** |
@@ -188,15 +188,15 @@ discard block |
||
188 | 188 | '#type' => 'submit', |
189 | 189 | '#value' => t('Go') |
190 | 190 | ); |
191 | - if (variable_get('jump_use_js_' . $menu_state['delta'], 0) === 1) { |
|
191 | + if (variable_get('jump_use_js_'.$menu_state['delta'], 0) === 1) { |
|
192 | 192 | // Give each menu a unique name. |
193 | - $form['#attributes']['name'] = 'jumpquickly' . $menu_state['delta']; |
|
193 | + $form['#attributes']['name'] = 'jumpquickly'.$menu_state['delta']; |
|
194 | 194 | $form['#attributes']['class'] .= ' js-enabled'; |
195 | 195 | // unset($form['submit']); |
196 | - if (variable_get('jump_add_select_' . $menu_state['delta'], 0) === 1) { |
|
196 | + if (variable_get('jump_add_select_'.$menu_state['delta'], 0) === 1) { |
|
197 | 197 | $form['jump_goto']['#attributes']['class'] = 'first-no-jump'; |
198 | 198 | // Add the extra empty select option to the top of the array. |
199 | - $form['jump_goto']['#options'] = array('' => variable_get('jump_add_select_text_' . $menu_state['delta'], t('Select Option'))) + $options; |
|
199 | + $form['jump_goto']['#options'] = array('' => variable_get('jump_add_select_text_'.$menu_state['delta'], t('Select Option'))) + $options; |
|
200 | 200 | $form['jump_goto']['#default_value'] = (array_key_exists($default, $options)) ? $default : ''; |
201 | 201 | } |
202 | 202 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | foreach ($tree as $data) { |
250 | 250 | if (!$data['link']['hidden']) { |
251 | 251 | $href = ($data['link']['href'] == '<front>') ? $front : $data['link']['href']; |
252 | - $href = (isset($data['link']['options']['fragment'])) ? $href . '#' . $data['link']['options']['fragment'] : $href; |
|
252 | + $href = (isset($data['link']['options']['fragment'])) ? $href.'#'.$data['link']['options']['fragment'] : $href; |
|
253 | 253 | $options[$href] = $data['link']['title']; |
254 | 254 | } |
255 | 255 | } |
@@ -313,15 +313,15 @@ discard block |
||
313 | 313 | if ($form['module']['#value'] === 'jump' && function_exists('ahah_helper_register')) { |
314 | 314 | $delta = $form['delta']['#value']; |
315 | 315 | ahah_helper_register($form, $form_state); |
316 | - $default_jump_use_js = (!isset($form_state['storage']['jump_use_js_' . $delta])) ? variable_get('jump_use_js_' . $delta, 0) : $form_state['storage']['jump_use_js_' . $delta]; |
|
317 | - $default_jump_add_select = (!isset($form_state['storage']['jump_add_select_' . $delta])) ? variable_get('jump_add_select_' . $delta, 0) : $form_state['storage']['jump_add_select_' . $delta]; |
|
316 | + $default_jump_use_js = (!isset($form_state['storage']['jump_use_js_'.$delta])) ? variable_get('jump_use_js_'.$delta, 0) : $form_state['storage']['jump_use_js_'.$delta]; |
|
317 | + $default_jump_add_select = (!isset($form_state['storage']['jump_add_select_'.$delta])) ? variable_get('jump_add_select_'.$delta, 0) : $form_state['storage']['jump_add_select_'.$delta]; |
|
318 | 318 | |
319 | 319 | $form['block_settings']['jump_wrapper'] = array( |
320 | 320 | '#prefix' => '<div id="jump-wrapper">', |
321 | 321 | '#suffix' => '</div>', |
322 | 322 | '#type' => 'markup' |
323 | 323 | ); |
324 | - $form['block_settings']['jump_wrapper']['jump_use_js_' . $delta] = array( |
|
324 | + $form['block_settings']['jump_wrapper']['jump_use_js_'.$delta] = array( |
|
325 | 325 | '#type' => 'checkbox', |
326 | 326 | '#title' => t('Hide the submit button and use Javascript to automatically jump to the selected menu item'), |
327 | 327 | '#default_value' => $default_jump_use_js, |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | ), |
334 | 334 | ); |
335 | 335 | if ($default_jump_use_js === 1) { |
336 | - $form['block_settings']['jump_wrapper']['jump_add_select_' . $delta] = array( |
|
336 | + $form['block_settings']['jump_wrapper']['jump_add_select_'.$delta] = array( |
|
337 | 337 | '#type' => 'checkbox', |
338 | 338 | '#title' => t('Add an empty select option into the list of options'), |
339 | 339 | '#default_value' => $default_jump_add_select, |
@@ -345,10 +345,10 @@ discard block |
||
345 | 345 | ), |
346 | 346 | ); |
347 | 347 | if ($default_jump_add_select === 1) { |
348 | - $form['block_settings']['jump_wrapper']['jump_add_select_text_' . $delta] = array( |
|
348 | + $form['block_settings']['jump_wrapper']['jump_add_select_text_'.$delta] = array( |
|
349 | 349 | '#type' => 'textfield', |
350 | 350 | '#title' => t('Text to use for the empty select option'), |
351 | - '#default_value' => variable_get('jump_add_select_text_' . $delta, t('Select Option')), |
|
351 | + '#default_value' => variable_get('jump_add_select_text_'.$delta, t('Select Option')), |
|
352 | 352 | '#weight' => 2 |
353 | 353 | ); |
354 | 354 | } |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | */ |
367 | 367 | function jump_get_active_setting($delta) { |
368 | 368 | $active_site_default = variable_get('jump_activepageinmenu', 1); |
369 | - $active = variable_get('jump_activepageinmenu_' . $delta, $active_site_default); |
|
369 | + $active = variable_get('jump_activepageinmenu_'.$delta, $active_site_default); |
|
370 | 370 | return $active; |
371 | 371 | } |
372 | 372 |
@@ -112,7 +112,7 @@ |
||
112 | 112 | |
113 | 113 | $count = 0; |
114 | 114 | foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) { |
115 | - $token = '%'. ++$count; |
|
115 | + $token = '%'.++$count; |
|
116 | 116 | if (!isset($tokens[$token])) { |
117 | 117 | $tokens[$token] = ''; |
118 | 118 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | function _forum_access_forum_form(&$form, &$form_state, $is_container) { |
15 | 15 | $tid = (isset($form['tid']['#value']) ? $form['tid']['#value'] : NULL); |
16 | 16 | if (isset($tid) && !forum_access_access($tid, 'view', NULL, FALSE)) { |
17 | - drupal_access_denied(); // Deny access if the user doesn't have View access. |
|
17 | + drupal_access_denied(); // Deny access if the user doesn't have View access. |
|
18 | 18 | module_invoke_all('exit'); |
19 | 19 | exit; |
20 | 20 | } |
@@ -39,18 +39,18 @@ discard block |
||
39 | 39 | |
40 | 40 | $tr = 't'; |
41 | 41 | $variables = array( |
42 | - '!access_content' => '<em>'. l($tr('access content'), 'admin/user/permissions', array('fragment' => 'module-node', 'html' => TRUE)) .'</em>', |
|
43 | - '!access_comments' => '<em>'. l($tr('access comments'), 'admin/user/permissions', array('fragment' => 'module-comment', 'html' => TRUE)) .'</em>', |
|
44 | - '!create_forum_topics' => '<em>'. l($tr('create forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)) .'</em>', |
|
45 | - '!post_comments' => '<em>'. l($tr('post comments'), 'admin/user/permissions', array('fragment' => 'module-comment', 'html' => TRUE)) .'</em>', |
|
46 | - '!post_comments_without_approval' => '<em>'. l($tr('post comments without approval'), 'admin/user/permissions', array('fragment' => 'module-comment', 'html' => TRUE)) .'</em>', |
|
47 | - '!edit_own_forum_topics' => '<em>'. l($tr('edit own forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)) .'</em>', |
|
48 | - '!edit_any_forum_topics' => '<em>'. l($tr('edit any forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)) .'</em>', |
|
49 | - '!delete_own_forum_topics' => '<em>'. l($tr('delete own forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)) .'</em>', |
|
50 | - '!delete_any_forum_topics' => '<em>'. l($tr('delete any forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)) .'</em>', |
|
51 | - '!administer_comments' => '<em>'. l($tr('administer comments'), 'admin/user/permissions', array('fragment' => 'module-comment', 'html' => TRUE)) .'</em>', |
|
52 | - '!administer_forums' => '<em>'. l($tr('administer forums'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)) .'</em>', |
|
53 | - '!administer_nodes' => '<em>'. l($tr('administer nodes'), 'admin/user/permissions', array('fragment' => 'module-node', 'html' => TRUE)) .'</em>', |
|
42 | + '!access_content' => '<em>'.l($tr('access content'), 'admin/user/permissions', array('fragment' => 'module-node', 'html' => TRUE)).'</em>', |
|
43 | + '!access_comments' => '<em>'.l($tr('access comments'), 'admin/user/permissions', array('fragment' => 'module-comment', 'html' => TRUE)).'</em>', |
|
44 | + '!create_forum_topics' => '<em>'.l($tr('create forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)).'</em>', |
|
45 | + '!post_comments' => '<em>'.l($tr('post comments'), 'admin/user/permissions', array('fragment' => 'module-comment', 'html' => TRUE)).'</em>', |
|
46 | + '!post_comments_without_approval' => '<em>'.l($tr('post comments without approval'), 'admin/user/permissions', array('fragment' => 'module-comment', 'html' => TRUE)).'</em>', |
|
47 | + '!edit_own_forum_topics' => '<em>'.l($tr('edit own forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)).'</em>', |
|
48 | + '!edit_any_forum_topics' => '<em>'.l($tr('edit any forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)).'</em>', |
|
49 | + '!delete_own_forum_topics' => '<em>'.l($tr('delete own forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)).'</em>', |
|
50 | + '!delete_any_forum_topics' => '<em>'.l($tr('delete any forum topics'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)).'</em>', |
|
51 | + '!administer_comments' => '<em>'.l($tr('administer comments'), 'admin/user/permissions', array('fragment' => 'module-comment', 'html' => TRUE)).'</em>', |
|
52 | + '!administer_forums' => '<em>'.l($tr('administer forums'), 'admin/user/permissions', array('fragment' => 'module-forum', 'html' => TRUE)).'</em>', |
|
53 | + '!administer_nodes' => '<em>'.l($tr('administer nodes'), 'admin/user/permissions', array('fragment' => 'module-node', 'html' => TRUE)).'</em>', |
|
54 | 54 | ); |
55 | 55 | if (!$is_container) { |
56 | 56 | $form['forum_access']['permissions'] = array( |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | ); |
62 | 62 | $form['forum_access']['permissions'][] = array( |
63 | 63 | '#type' => 'markup', |
64 | - '#value' => '<div>'. t('Note that users need') .'<ul style="margin-top: 0"><li>'. |
|
65 | - t('the !access_content and !access_comments permissions <strong>AND <em>View</em></strong> to be able to see this forum and its content at all,', $variables) .'</li><li>'. |
|
66 | - t('the !create_forum_topics (and similar) permissions <strong>AND <em>Post</em></strong> to be able to create forum content, and', $variables) .'</li><li>'. |
|
67 | - t('the !post_comments and (probably) !post_comments_without_approval permission <!TAG>AND <em>Comment</em></!TAG> to be able to post comments/replies;', $variables + array('!TAG' => (variable_get('forum_access_D5_legacy_mode', FALSE) ? 'del title="'. t('Drupal 5 legacy mode') .'"' : 'strong'))) .'</li><li>'. |
|
68 | - t('the !edit_own_forum_topics or !edit_any_forum_topics (and similar) permissions <strong>AND (<em>Edit</em> AND <em>Comment</em></strong>) can be added if desired, <strong>plus</strong>', $variables) .'</li><li>'. |
|
69 | - t('the !delete_own_forum_topics or !delete_any_forum_topics (and similar) permissions (<strong>OR <em>Delete</em></strong>) if desired;', $variables) .'</li><li>'. |
|
70 | - t('the !administer_comments (global!) permission <strong>OR <em>Edit</em>/<em>Delete</em></strong> to be able to edit/delete comments;', $variables) .'</li><li>'. |
|
71 | - t('the !administer_forums permission <strong>AND <em>View</em></strong> to be able to administer forums (and change access!).', $variables) .'</li></ul>'. |
|
72 | - t('Furthermore note that content which is not published is treated in a different way by Drupal: it can be viewed only by its author or by users with the !administer_nodes permission. Unpublished comments and replies are accessible to users with <strong><em>Edit</em> OR <em>Delete</em></strong>, <strong>OR</strong> with the !administer_comments permission, but they are never counted on the forum page.', $variables) .'</div>', |
|
64 | + '#value' => '<div>'.t('Note that users need').'<ul style="margin-top: 0"><li>'. |
|
65 | + t('the !access_content and !access_comments permissions <strong>AND <em>View</em></strong> to be able to see this forum and its content at all,', $variables).'</li><li>'. |
|
66 | + t('the !create_forum_topics (and similar) permissions <strong>AND <em>Post</em></strong> to be able to create forum content, and', $variables).'</li><li>'. |
|
67 | + t('the !post_comments and (probably) !post_comments_without_approval permission <!TAG>AND <em>Comment</em></!TAG> to be able to post comments/replies;', $variables + array('!TAG' => (variable_get('forum_access_D5_legacy_mode', FALSE) ? 'del title="'.t('Drupal 5 legacy mode').'"' : 'strong'))).'</li><li>'. |
|
68 | + t('the !edit_own_forum_topics or !edit_any_forum_topics (and similar) permissions <strong>AND (<em>Edit</em> AND <em>Comment</em></strong>) can be added if desired, <strong>plus</strong>', $variables).'</li><li>'. |
|
69 | + t('the !delete_own_forum_topics or !delete_any_forum_topics (and similar) permissions (<strong>OR <em>Delete</em></strong>) if desired;', $variables).'</li><li>'. |
|
70 | + t('the !administer_comments (global!) permission <strong>OR <em>Edit</em>/<em>Delete</em></strong> to be able to edit/delete comments;', $variables).'</li><li>'. |
|
71 | + t('the !administer_forums permission <strong>AND <em>View</em></strong> to be able to administer forums (and change access!).', $variables).'</li></ul>'. |
|
72 | + t('Furthermore note that content which is not published is treated in a different way by Drupal: it can be viewed only by its author or by users with the !administer_nodes permission. Unpublished comments and replies are accessible to users with <strong><em>Edit</em> OR <em>Delete</em></strong>, <strong>OR</strong> with the !administer_comments permission, but they are never counted on the forum page.', $variables).'</div>', |
|
73 | 73 | ); |
74 | 74 | } |
75 | 75 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | '#collapsed' => empty($template_tid), |
83 | 83 | ); |
84 | 84 | $form['forum_access']['template']['taxonomy'][$vid] = taxonomy_form($vid, array($template_tid), ''); |
85 | - $form['forum_access']['template']['taxonomy'][$vid]['#description'] = t("Select a forum and click !Load to retrieve that forum's settings as a starting point for this forum or container.", array('!Load' => '['. t('Load') .']')); |
|
85 | + $form['forum_access']['template']['taxonomy'][$vid]['#description'] = t("Select a forum and click !Load to retrieve that forum's settings as a starting point for this forum or container.", array('!Load' => '['.t('Load').']')); |
|
86 | 86 | $form['forum_access']['template']['load_button'] = array( |
87 | 87 | '#type' => 'button', |
88 | 88 | '#name' => 'load_template', |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | ); |
206 | 206 | } |
207 | 207 | |
208 | - drupal_add_css(drupal_get_path('module', 'forum_access') .'/forum_access.css'); |
|
208 | + drupal_add_css(drupal_get_path('module', 'forum_access').'/forum_access.css'); |
|
209 | 209 | |
210 | 210 | // Find our moderator ACL: |
211 | 211 | if (isset($tid)) { // edit, not new |
@@ -222,12 +222,12 @@ discard block |
||
222 | 222 | $form['forum_access']['acl'] = acl_edit_form($acl_id, t('Moderators')); |
223 | 223 | $form['forum_access']['acl'][] = array( |
224 | 224 | '#type' => 'markup', |
225 | - '#value' => '<div>'. t('Moderators receive all grants above.') .'</div>', |
|
225 | + '#value' => '<div>'.t('Moderators receive all grants above.').'</div>', |
|
226 | 226 | '#weight' => -1, |
227 | 227 | ); |
228 | 228 | $form['forum_access']['acl']['note'] = array( |
229 | 229 | '#type' => 'markup', |
230 | - '#value' => '<div>'. t('Note: Changes to moderators are not saved until you click [!Save] below.', array('!Save' => $tr('Save'))) .'</div>', |
|
230 | + '#value' => '<div>'.t('Note: Changes to moderators are not saved until you click [!Save] below.', array('!Save' => $tr('Save'))).'</div>', |
|
231 | 231 | ); |
232 | 232 | $form['forum_access']['acl']['#after_build'][] = '_forum_access_forum_form_after_build_acl0'; |
233 | 233 | $form['forum_access']['acl']['#after_build'] = array_reverse($form['forum_access']['acl']['#after_build']); |
@@ -251,11 +251,11 @@ discard block |
||
251 | 251 | '!Content_Access' => l('Content Access', 'http://drupal.org/project/content_access'), |
252 | 252 | '@Content_Access' => 'Content Access', |
253 | 253 | '!ACL' => 'ACL', |
254 | - '!module_list' => '<ul><li>'. implode($na_modules, '</li><li>') .'</li></ul>', |
|
254 | + '!module_list' => '<ul><li>'.implode($na_modules, '</li><li>').'</li></ul>', |
|
255 | 255 | ); |
256 | 256 | $form['forum_access']['interference'][] = array( |
257 | 257 | '#type' => 'item', |
258 | - '#value' => '<p>'. t("Besides !Forum_Access (and !ACL) you have installed the following node access module(s): !module_list The grants of every module are combined for each node. Access can only be granted, not removed — if a certain module grants a permission, the other(s) cannot deny it.", $variables) .'</p>', |
|
258 | + '#value' => '<p>'.t("Besides !Forum_Access (and !ACL) you have installed the following node access module(s): !module_list The grants of every module are combined for each node. Access can only be granted, not removed — if a certain module grants a permission, the other(s) cannot deny it.", $variables).'</p>', |
|
259 | 259 | '#description' => t('Forums can contain other content types besides %content_type; !Forum_Access will contribute the grants defined above to every node in this forum, but other node access control modules may also contribute their grants, especially to nodes of types other than %content_type.', $variables), |
260 | 260 | ); |
261 | 261 | |
@@ -282,25 +282,25 @@ discard block |
||
282 | 282 | '#attributes' => array('class' => 'error'), |
283 | 283 | ); |
284 | 284 | $form['forum_access']['interference']['by_content_access'][] = array( |
285 | - '#value' => '<div>'. t('You have set the !Content_Access module to control access to content of type %content_type—this can interfere with proper operation of !Forum_Access!', $variables) ." $specifically</div>", |
|
285 | + '#value' => '<div>'.t('You have set the !Content_Access module to control access to content of type %content_type—this can interfere with proper operation of !Forum_Access!', $variables)." $specifically</div>", |
|
286 | 286 | ); |
287 | 287 | if ($ca_priority == $fa_priority) { |
288 | 288 | $form['forum_access']['interference']['by_content_access'][] = array( |
289 | - '#value' => '<div>'. t("Unless you really know what you're doing, we recommend that you go to the !link page and clear all checkboxes. This will instruct @Content_Access to leave the %content_type nodes alone. However, if you put nodes of other content types into forums as well, then these content types will continue to have this problem.", $variables) .'</div>', |
|
289 | + '#value' => '<div>'.t("Unless you really know what you're doing, we recommend that you go to the !link page and clear all checkboxes. This will instruct @Content_Access to leave the %content_type nodes alone. However, if you put nodes of other content types into forums as well, then these content types will continue to have this problem.", $variables).'</div>', |
|
290 | 290 | ); |
291 | 291 | } |
292 | 292 | else { |
293 | 293 | $form['forum_access']['interference']['by_content_access'][] = array( |
294 | - '#value' => '<div>'. t("The priority of @Content_Access ($ca_priority) is higher than the priority of !Forum_Access ($fa_priority), which means the latter is <strong>completely disabled</strong> for the %content_type type! Unless you really know what you're doing, we recommend that you go to the !link page, change the priority (under %Advanced) to 0, and clear all checkboxes.", $variables) .'</div>', |
|
294 | + '#value' => '<div>'.t("The priority of @Content_Access ($ca_priority) is higher than the priority of !Forum_Access ($fa_priority), which means the latter is <strong>completely disabled</strong> for the %content_type type! Unless you really know what you're doing, we recommend that you go to the !link page, change the priority (under %Advanced) to 0, and clear all checkboxes.", $variables).'</div>', |
|
295 | 295 | ); |
296 | 296 | } |
297 | 297 | $form['forum_access']['interference']['by_content_access'][] = array( |
298 | - '#value' => '<div>'. t("Alternatively, you can give !Forum_Access priority over @Content_Access by either raising the priority of !Forum_Access in every forum above the priority of @Content_Access, or by lowering the priority of @Content_Access for the content types in question below the priority of !Forum_Access.", $variables) .'</div>', |
|
298 | + '#value' => '<div>'.t("Alternatively, you can give !Forum_Access priority over @Content_Access by either raising the priority of !Forum_Access in every forum above the priority of @Content_Access, or by lowering the priority of @Content_Access for the content types in question below the priority of !Forum_Access.", $variables).'</div>', |
|
299 | 299 | ); |
300 | 300 | } |
301 | 301 | else { |
302 | 302 | $form['forum_access']['interference'][] = array( |
303 | - '#value' => '<p>'. t('Note: You have installed the !Content_Access module, which has the capability to grant access to content that would otherwise be protected by !Forum_Access. Be careful when configuring @Content_Access!', $variables) .'</p>', |
|
303 | + '#value' => '<p>'.t('Note: You have installed the !Content_Access module, which has the capability to grant access to content that would otherwise be protected by !Forum_Access. Be careful when configuring @Content_Access!', $variables).'</p>', |
|
304 | 304 | ); |
305 | 305 | } |
306 | 306 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | '!DNA' => 'DNA', |
332 | 332 | '!debug_mode' => l('debug mode', 'admin/settings/devel', array('fragment' => 'edit-devel-node-access-debug-mode')), |
333 | 333 | '!dna_summary' => l('devel/node_access/summary', 'devel/node_access/summary'), |
334 | - '!Rebuild_permissions' => '['. $tr('Rebuild permissions') .']', |
|
334 | + '!Rebuild_permissions' => '['.$tr('Rebuild permissions').']', |
|
335 | 335 | '!Post_settings_link' => l('admin/content/node-settings', 'admin/content/node-settings'), |
336 | 336 | '!Forum_Access_' => l('Forum Access', 'http://drupal.org/project/issues/forum_access'), |
337 | 337 | '!ACL_' => l('ACL', 'http://drupal.org/project/issues/acl'), |
@@ -344,26 +344,26 @@ discard block |
||
344 | 344 | ); |
345 | 345 | $form['forum_access']['troubleshooting'][] = array( |
346 | 346 | '#type' => 'item', |
347 | - '#value' => '<div>'. t("In case of problems, follow these steps until you've got it worked out:") .'<ol style="margin-top: 0"><li>'. |
|
348 | - t("Update to the 'recommended' !Forum_Access and !ACL releases for your version of Drupal.", $variables) .'</li><li>'. |
|
349 | - (count($na_modules) ? t("Read %Module_interference above and update your other node access modules.", $variables) .'</li><li>' : '') . |
|
350 | - t("Check the release notes of the development snapshots for issues that might have been fixed in !Forum_Access-dev or !ACL-dev since the latest release.", $variables) .'</li><li>'. |
|
351 | - t("Install the %devel_node_access module (!DNA, part of the !Devel module) and enable its !debug_mode: !DNA will show you all the grants that actually control your nodes in a footer block on each node's page.", $variables) .'</li><li>'. |
|
352 | - t("Additional insight can be gained from !dna_summary and by enabling the second !DNA block.", $variables) .'</li><li>'. |
|
353 | - t("Click !Rebuild_permissions on !Post_settings_link and check DNA for changes.", $variables) .'</li><li>'. |
|
354 | - t("Check the issues queues of !Forum_Access_ and !ACL_ for existing reports and possible solutions.", $variables) .'</li><li>'. |
|
355 | - t("If all of this hasn't helped, then pick ONE node that is misbehaving, look at it using an account that can see the node (and that should NOT have access if that's your problem!), create a new issue in the issues queue, describe the problem... <ul><li> what did you do? </li><li> what did you expect? </li><li> what happened instead? </li></ul> ... and <strong>attach a screenshot of all the DNA records</strong> for that one node. <br /> Be sure to indicate paths (URLs) for every page and module that you mention.") .'</li></ol></div>', |
|
347 | + '#value' => '<div>'.t("In case of problems, follow these steps until you've got it worked out:").'<ol style="margin-top: 0"><li>'. |
|
348 | + t("Update to the 'recommended' !Forum_Access and !ACL releases for your version of Drupal.", $variables).'</li><li>'. |
|
349 | + (count($na_modules) ? t("Read %Module_interference above and update your other node access modules.", $variables).'</li><li>' : ''). |
|
350 | + t("Check the release notes of the development snapshots for issues that might have been fixed in !Forum_Access-dev or !ACL-dev since the latest release.", $variables).'</li><li>'. |
|
351 | + t("Install the %devel_node_access module (!DNA, part of the !Devel module) and enable its !debug_mode: !DNA will show you all the grants that actually control your nodes in a footer block on each node's page.", $variables).'</li><li>'. |
|
352 | + t("Additional insight can be gained from !dna_summary and by enabling the second !DNA block.", $variables).'</li><li>'. |
|
353 | + t("Click !Rebuild_permissions on !Post_settings_link and check DNA for changes.", $variables).'</li><li>'. |
|
354 | + t("Check the issues queues of !Forum_Access_ and !ACL_ for existing reports and possible solutions.", $variables).'</li><li>'. |
|
355 | + t("If all of this hasn't helped, then pick ONE node that is misbehaving, look at it using an account that can see the node (and that should NOT have access if that's your problem!), create a new issue in the issues queue, describe the problem... <ul><li> what did you do? </li><li> what did you expect? </li><li> what happened instead? </li></ul> ... and <strong>attach a screenshot of all the DNA records</strong> for that one node. <br /> Be sure to indicate paths (URLs) for every page and module that you mention.").'</li></ol></div>', |
|
356 | 356 | ); |
357 | 357 | $form['forum_access']['troubleshooting'][] = array( |
358 | 358 | '#type' => 'item', |
359 | - '#value' => '<div>'. t("Note: You should not keep the !Devel module enabled on a production site.", $variables) .'</div>', |
|
359 | + '#value' => '<div>'.t("Note: You should not keep the !Devel module enabled on a production site.", $variables).'</div>', |
|
360 | 360 | ); |
361 | 361 | } |
362 | 362 | |
363 | 363 | if (!$is_container && isset($tid) && !node_access_needs_rebuild()) { |
364 | 364 | $count = db_result(db_query("SELECT COUNT(DISTINCT n.nid) FROM {node} n INNER JOIN {term_node} tn ON tn.vid = n.vid WHERE tn.tid = %d", $tid)); |
365 | - $limit = 20; // from _node_access_rebuild_batch_operation() |
|
366 | - $threshold = variable_get('forum_access_batch_threshold', $limit); // change the variable if you want |
|
365 | + $limit = 20; // from _node_access_rebuild_batch_operation() |
|
366 | + $threshold = variable_get('forum_access_batch_threshold', $limit); // change the variable if you want |
|
367 | 367 | $form['forum_access']['update_limit'] = array( |
368 | 368 | '#type' => 'value', |
369 | 369 | '#value' => $limit, |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $element_children = element_children($element); |
442 | 442 | foreach ($element_children as $rid) { |
443 | 443 | if ($rid == $moderator_rid) { |
444 | - $element[$rid]['#prefix'] = '<span title="'. t("This is the (temporary) @Forum_Moderator role; it has the '@administer_nodes' and '@administer_comments' permissions and is only used temporarily by @Forum_Access — do NOT give this role to any user!", array('@Forum_Moderator' => t('Forum Moderator'), '@administer_nodes' => $tr('administer nodes'), '@administer_comments' => $tr('administer comments'), '@Forum_Access' => 'Forum Access')) .'" class="forum-access-temporary-moderator">'; |
|
444 | + $element[$rid]['#prefix'] = '<span title="'.t("This is the (temporary) @Forum_Moderator role; it has the '@administer_nodes' and '@administer_comments' permissions and is only used temporarily by @Forum_Access — do NOT give this role to any user!", array('@Forum_Moderator' => t('Forum Moderator'), '@administer_nodes' => $tr('administer nodes'), '@administer_comments' => $tr('administer comments'), '@Forum_Access' => 'Forum Access')).'" class="forum-access-temporary-moderator">'; |
|
445 | 445 | $element[$rid]['#suffix'] = "</span>"; |
446 | 446 | $element[$rid]['#default_value'] = TRUE; |
447 | 447 | $element[$rid]['#disabled'] = TRUE; |
@@ -452,19 +452,19 @@ discard block |
||
452 | 452 | elseif ($element['#parents'][1] == 'comment_create') { |
453 | 453 | } |
454 | 454 | elseif ($element['#parents'][1] == 'view' && isset($permissions[$rid]['administer forums'])) { |
455 | - $element[$rid]['#title'] = '<em>'. $element[$rid]['#title'] .'</em>'; |
|
456 | - $element[$rid]['#prefix'] = '<span title="'. t("This role has the '@administer_forums' permission, and granting '@View' enables the role holders to change the settings on this page, including @Access_control!", array('@administer_forums' => $tr('administer forums'), '@View' => t('View'), '@Access_control' => t('Access control'))) .'">'; |
|
455 | + $element[$rid]['#title'] = '<em>'.$element[$rid]['#title'].'</em>'; |
|
456 | + $element[$rid]['#prefix'] = '<span title="'.t("This role has the '@administer_forums' permission, and granting '@View' enables the role holders to change the settings on this page, including @Access_control!", array('@administer_forums' => $tr('administer forums'), '@View' => t('View'), '@Access_control' => t('Access control'))).'">'; |
|
457 | 457 | if (isset($permissions[$rid]['administer nodes'])) { |
458 | - $element[$rid]['#prefix'] = str_replace('">', ' '. t("Because the role also has the '@administer_nodes' permission, it has full access to all nodes either way.", array('@administer_nodes' => $tr('administer nodes'))) .'">', $element[$rid]['#prefix']); |
|
458 | + $element[$rid]['#prefix'] = str_replace('">', ' '.t("Because the role also has the '@administer_nodes' permission, it has full access to all nodes either way.", array('@administer_nodes' => $tr('administer nodes'))).'">', $element[$rid]['#prefix']); |
|
459 | 459 | } |
460 | 460 | $element[$rid]['#suffix'] = "</span>"; |
461 | 461 | } |
462 | 462 | elseif (isset($permissions[$rid]['administer nodes'])) { |
463 | 463 | $element[$rid]['#disabled'] = TRUE; |
464 | 464 | $element[$rid]['#default_value'] = TRUE; |
465 | - $element[$rid]['#prefix'] = '<span title="'. ($rid != $moderator_rid |
|
465 | + $element[$rid]['#prefix'] = '<span title="'.($rid != $moderator_rid |
|
466 | 466 | ? t("This role has the '@administer_nodes' permission and thus full access to all nodes.", array('@administer_nodes' => $tr('administer nodes'))) |
467 | - : t("This is the @Forum_Moderator role; it has the '@administer_nodes' and '@administer_comments' permissions and thus full access to all nodes and comments.", array('@Forum_Moderator' => t('Forum Moderator'), '@administer_nodes' => $tr('administer nodes'), '@administer_comments' => $tr('administer comments')))) .'">'; |
|
467 | + : t("This is the @Forum_Moderator role; it has the '@administer_nodes' and '@administer_comments' permissions and thus full access to all nodes and comments.", array('@Forum_Moderator' => t('Forum Moderator'), '@administer_nodes' => $tr('administer nodes'), '@administer_comments' => $tr('administer comments')))).'">'; |
|
468 | 468 | $element[$rid]['#suffix'] = "</span>"; |
469 | 469 | } |
470 | 470 | } |
@@ -560,12 +560,12 @@ discard block |
||
560 | 560 | variable_del('forum_access_new_template_tid'); |
561 | 561 | } |
562 | 562 | module_load_include('node.inc', 'forum_access'); |
563 | - $moderator_rid = _forum_access_get_moderator_rid(TRUE); // create the moderators role if it doesn't exist |
|
563 | + $moderator_rid = _forum_access_get_moderator_rid(TRUE); // create the moderators role if it doesn't exist |
|
564 | 564 | |
565 | 565 | // check for changes |
566 | 566 | $is_changed = $is_new = strpos($_GET['q'], 'admin/content/forum/add/') === 0; |
567 | 567 | $is_changed = $is_changed || !empty($access['force_update']); |
568 | - $form_initial_values = $form; // avoid Coder warning |
|
568 | + $form_initial_values = $form; // avoid Coder warning |
|
569 | 569 | $form_initial_values = $form_initial_values['forum_access']; |
570 | 570 | foreach (array('view', 'create', 'comment_create', 'update', 'delete') as $grant_type) { |
571 | 571 | if (isset($form_initial_values[$grant_type])) { |
@@ -610,11 +610,11 @@ discard block |
||
610 | 610 | } |
611 | 611 | else { |
612 | 612 | db_query("INSERT INTO {forum_access} (tid, rid, grant_view, grant_update, grant_delete, grant_create, grant_comment_create, priority) VALUES (%d, %d, %d, %d, %d, %d, %d, %d)", |
613 | - $tid, $rid, (bool) $checked, !empty($access['update'][$rid]), !empty($access['delete'][$rid]), !empty($access['create'][$rid]), !empty($access['comment_create'][$rid]), $fa_priority); |
|
613 | + $tid, $rid, (bool)$checked, !empty($access['update'][$rid]), !empty($access['delete'][$rid]), !empty($access['create'][$rid]), !empty($access['comment_create'][$rid]), $fa_priority); |
|
614 | 614 | } |
615 | 615 | } |
616 | 616 | $tr = 't'; |
617 | - $link = l($tr('edit'), 'admin/content/forum/edit/forum/'. $tid); |
|
617 | + $link = l($tr('edit'), 'admin/content/forum/edit/forum/'.$tid); |
|
618 | 618 | watchdog('access', 'Changed grants for %forum forum.', array('%forum' => $form_state['values']['name']), WATCHDOG_NOTICE, $link); |
619 | 619 | |
620 | 620 | if (!$is_new && $form_state['values']['form_id'] != 'forum_form_container') { |
@@ -628,10 +628,10 @@ discard block |
||
628 | 628 | $context = array(); |
629 | 629 | $pending_error_messages = drupal_get_messages('error', FALSE); |
630 | 630 | $our_error_message_index = (isset($pending_error_messages['error']) ? count($pending_error_messages['error']) : 0); |
631 | - _forum_access_update_batch_finished(FALSE, array(), array()); // add our error message (in case we die underway) |
|
631 | + _forum_access_update_batch_finished(FALSE, array(), array()); // add our error message (in case we die underway) |
|
632 | 632 | _forum_access_update_batch_operation($tid, 999999, 1, $context); |
633 | - $pending_error_messages = drupal_get_messages('error', TRUE); // still alive, get and clear all 'error' messages |
|
634 | - unset($pending_error_messages['error'][$our_error_message_index]); // remove our error message |
|
633 | + $pending_error_messages = drupal_get_messages('error', TRUE); // still alive, get and clear all 'error' messages |
|
634 | + unset($pending_error_messages['error'][$our_error_message_index]); // remove our error message |
|
635 | 635 | foreach ($pending_error_messages['error'] as $message) { // replay any others |
636 | 636 | drupal_set_message($message, 'error'); |
637 | 637 | } |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | $count = db_result(db_query("SELECT COUNT(DISTINCT n.nid) FROM {node} n INNER JOIN {term_node} tn ON tn.vid = n.vid WHERE tn.tid = %d", $tid)); |
645 | 645 | $batch = array( |
646 | 646 | 'title' => t('Updating content access permissions'), |
647 | - 'file' => drupal_get_path('module', 'forum_access') .'/forum_access.admin.inc', |
|
647 | + 'file' => drupal_get_path('module', 'forum_access').'/forum_access.admin.inc', |
|
648 | 648 | 'operations' => array( |
649 | 649 | array('_forum_access_update_batch_operation', array($tid, $limit, $count)), |
650 | 650 | ), |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | } |
655 | 655 | } |
656 | 656 | |
657 | - variable_del('forum_access_rids'); // clear cache |
|
657 | + variable_del('forum_access_rids'); // clear cache |
|
658 | 658 | } |
659 | 659 | |
660 | 660 | /** |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | |
688 | 688 | // Multistep processing : report progress. |
689 | 689 | if ($context['sandbox']['progress'] != $context['sandbox']['max']) { |
690 | - $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max']; |
|
690 | + $context['finished'] = $context['sandbox']['progress']/$context['sandbox']['max']; |
|
691 | 691 | } |
692 | 692 | } |
693 | 693 | |
@@ -829,8 +829,8 @@ discard block |
||
829 | 829 | ); |
830 | 830 | if (arg(3) == 'forum') { |
831 | 831 | drupal_set_message(t('Note: In Drupal, access can only be granted, not taken away. Whatever access you grant here will not be reflected in the !Forum_Access_link settings, but !Forum_Access can only allow <i>more</i> access, not less.', $variables) |
832 | - .'<br /><span class="error">'. t('Specifically, any rights granted to the %anonymous_user and/or the %authenticated_user will <b>override</b> the settings of !Forum_Access!', $variables) .'</span>' |
|
833 | - .'<br />'. t('To avoid conflicts with !Forum_Access settings, you may want to lower the priority of !Content_Access (under %Advanced below) below the priority of !Forum_Access for the content types that you want to be controlled by !Forum_Access.', $variables), 'warning'); |
|
832 | + .'<br /><span class="error">'.t('Specifically, any rights granted to the %anonymous_user and/or the %authenticated_user will <b>override</b> the settings of !Forum_Access!', $variables).'</span>' |
|
833 | + .'<br />'.t('To avoid conflicts with !Forum_Access settings, you may want to lower the priority of !Content_Access (under %Advanced below) below the priority of !Forum_Access for the content types that you want to be controlled by !Forum_Access.', $variables), 'warning'); |
|
834 | 834 | } |
835 | 835 | else { |
836 | 836 | $vid = _forum_access_get_vid(); |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | if (isset($moderator_rid) && isset($form['account']['roles']['#options'][$moderator_rid])) { |
894 | 894 | $form['account']['roles'][$moderator_rid] = array( |
895 | 895 | '#type' => 'checkbox', |
896 | - '#title' => $form['account']['roles']['#options'][$moderator_rid] .' ('. t('reserved for internal use by the @Forum_Access module', array('@Forum_Access' => 'Forum Access')) .')', |
|
896 | + '#title' => $form['account']['roles']['#options'][$moderator_rid].' ('.t('reserved for internal use by the @Forum_Access module', array('@Forum_Access' => 'Forum Access')).')', |
|
897 | 897 | '#default_value' => in_array($moderator_rid, $form['account']['roles']['#default_value']), |
898 | 898 | '#disabled' => TRUE, |
899 | 899 | ); |
@@ -930,8 +930,8 @@ discard block |
||
930 | 930 | else { |
931 | 931 | $msg = t('!Forum_Access cannot create the %role role!', $variables); |
932 | 932 | watchdog('user', $msg, NULL, WATCHDOG_WARNING); |
933 | - drupal_set_message($msg .' '. t('Is it already in use?'), 'error'); |
|
934 | - $role->name = $role_name .' '. $i; |
|
933 | + drupal_set_message($msg.' '.t('Is it already in use?'), 'error'); |
|
934 | + $role->name = $role_name.' '.$i; |
|
935 | 935 | } |
936 | 936 | } |
937 | 937 | $msg = t('!Forum_Access has given up and will not work correctly! Rename one of the roles listed above, so that !Forum_Access can use its name.', $variables); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | function i18nviews_views_handlers() { |
19 | 19 | return array( |
20 | 20 | 'info' => array( |
21 | - 'path' => drupal_get_path('module', 'i18nviews') . '/includes', |
|
21 | + 'path' => drupal_get_path('module', 'i18nviews').'/includes', |
|
22 | 22 | ), |
23 | 23 | 'handlers' => array( |
24 | 24 | 'content_negotiation_filter_handler' => array( |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * Implementation of hook_views_plugins(). |
33 | 33 | */ |
34 | 34 | function i18nviews_views_plugins() { |
35 | - $path = drupal_get_path('module', 'i18nviews') . '/includes'; |
|
35 | + $path = drupal_get_path('module', 'i18nviews').'/includes'; |
|
36 | 36 | return array( |
37 | 37 | 'module' => 'i18nviews', |
38 | 38 | 'localization' => array( |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | function i18nviews_help($path, $arg) { |
17 | 17 | switch ($path) { |
18 | 18 | case 'admin/modules#description' : |
19 | - $output = '<p>'. t('Supports translation for views strings: title, header, footer...') .'</p>'; |
|
20 | - $output .= '<p>'. t('To search and translate strings, use the <a href="@translate-interface">translation interface</a> pages.', array('@translate-interface' => url('admin/build/translate'))) .'</p>'; |
|
19 | + $output = '<p>'.t('Supports translation for views strings: title, header, footer...').'</p>'; |
|
20 | + $output .= '<p>'.t('To search and translate strings, use the <a href="@translate-interface">translation interface</a> pages.', array('@translate-interface' => url('admin/build/translate'))).'</p>'; |
|
21 | 21 | return $output; |
22 | 22 | } |
23 | 23 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | function i18nviews_views_api() { |
90 | 90 | return array( |
91 | 91 | 'api' => '2.0', |
92 | - 'path' => drupal_get_path('module', 'i18nviews') . '/includes', |
|
92 | + 'path' => drupal_get_path('module', 'i18nviews').'/includes', |
|
93 | 93 | ); |
94 | 94 | } |
95 | 95 | |
@@ -110,10 +110,10 @@ discard block |
||
110 | 110 | // Also checking weird values for $display_id, see 277711 |
111 | 111 | if (!empty($view->display) && is_array($view->display) && is_string($display_id)) { |
112 | 112 | $fields = _i18nviews_display_fields(); |
113 | - if(!empty($view->display[$display_id])) { |
|
113 | + if (!empty($view->display[$display_id])) { |
|
114 | 114 | $fields = _i18nviews_localize_array($view->name, $display_id, $view->display[$display_id]->handler->options, $fields); |
115 | 115 | } |
116 | - if($fields && !empty($view->display['default'])) { |
|
116 | + if ($fields && !empty($view->display['default'])) { |
|
117 | 117 | _i18nviews_localize_array($view->name, 'default', $view->display['default']->handler->options, $fields); |
118 | 118 | } |
119 | 119 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | foreach ($field_names as $field) { |
160 | 160 | if (!empty($data[$field])) { |
161 | 161 | if ($update) { |
162 | - $format = isset($data[$field . '_format']) ? $data[$field . '_format'] : NULL; |
|
162 | + $format = isset($data[$field.'_format']) ? $data[$field.'_format'] : NULL; |
|
163 | 163 | i18nstrings_update("views:$name:$group:$field", $data[$field], $format); |
164 | 164 | } |
165 | 165 | else { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | if (isset($form_state['values'][$field])) { |
210 | 210 | $name = $form_state['view']->name; |
211 | 211 | $group = $form_state['display_id']; |
212 | - $format = isset($form_state['values'][$field . '_format']) ? $form_state['values'][$field . '_format'] : NULL; |
|
212 | + $format = isset($form_state['values'][$field.'_format']) ? $form_state['values'][$field.'_format'] : NULL; |
|
213 | 213 | i18nstrings_update("views:$name:$group:$field", $form_state['values'][$field], $format); |
214 | 214 | } |
215 | 215 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | * The installed editor version. |
47 | 47 | */ |
48 | 48 | function wysiwyg_jwysiwyg_version($editor) { |
49 | - $script = $editor['library path'] . '/jquery.wysiwyg.js'; |
|
49 | + $script = $editor['library path'].'/jquery.wysiwyg.js'; |
|
50 | 50 | if (!file_exists($script)) { |
51 | 51 | return; |
52 | 52 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * The installed editor version. |
51 | 51 | */ |
52 | 52 | function wysiwyg_fckeditor_version($editor) { |
53 | - $library = $editor['library path'] . '/fckeditor.js'; |
|
53 | + $library = $editor['library path'].'/fckeditor.js'; |
|
54 | 54 | if (!file_exists($library)) { |
55 | 55 | return; |
56 | 56 | } |
@@ -98,9 +98,9 @@ discard block |
||
98 | 98 | */ |
99 | 99 | function wysiwyg_fckeditor_settings($editor, $config, $theme) { |
100 | 100 | $settings = array( |
101 | - 'EditorPath' => base_path() . $editor['library path'] . '/', |
|
102 | - 'SkinPath' => base_path() . $editor['library path'] . '/editor/skins/' . $theme . '/', |
|
103 | - 'CustomConfigurationsPath' => base_path() . drupal_get_path('module', 'wysiwyg') . '/editors/js/fckeditor.config.js', |
|
101 | + 'EditorPath' => base_path().$editor['library path'].'/', |
|
102 | + 'SkinPath' => base_path().$editor['library path'].'/editor/skins/'.$theme.'/', |
|
103 | + 'CustomConfigurationsPath' => base_path().drupal_get_path('module', 'wysiwyg').'/editors/js/fckeditor.config.js', |
|
104 | 104 | 'Width' => '100%', |
105 | 105 | 'Height' => 420, |
106 | 106 | 'LinkBrowser' => FALSE, |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | // Add path for native external plugins; internal ones do not need a path. |
181 | 181 | if (empty($plugin['internal']) && isset($plugin['path'])) { |
182 | 182 | // All native FCKeditor plugins use the filename fckplugin.js. |
183 | - $settings[$name]['path'] = base_path() . $plugin['path'] . '/'; |
|
183 | + $settings[$name]['path'] = base_path().$plugin['path'].'/'; |
|
184 | 184 | } |
185 | 185 | if (!empty($plugin['languages'])) { |
186 | 186 | $settings[$name]['languages'] = $plugin['languages']; |
@@ -199,10 +199,10 @@ discard block |
||
199 | 199 | // Populate required plugin settings. |
200 | 200 | $settings[$name] = $plugin['dialog settings'] + array( |
201 | 201 | 'title' => $plugin['title'], |
202 | - 'icon' => base_path() . $plugin['icon path'] . '/' . $plugin['icon file'], |
|
202 | + 'icon' => base_path().$plugin['icon path'].'/'.$plugin['icon file'], |
|
203 | 203 | 'iconTitle' => $plugin['icon title'], |
204 | 204 | // @todo These should only be set if the plugin defined them. |
205 | - 'css' => base_path() . $plugin['css path'] . '/' . $plugin['css file'], |
|
205 | + 'css' => base_path().$plugin['css path'].'/'.$plugin['css file'], |
|
206 | 206 | ); |
207 | 207 | } |
208 | 208 | return $settings; |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | 'internal' => TRUE, |
245 | 245 | ), |
246 | 246 | 'autogrow' => array( |
247 | - 'path' => $editor['library path'] . '/editor/plugins', |
|
247 | + 'path' => $editor['library path'].'/editor/plugins', |
|
248 | 248 | 'extensions' => array( |
249 | 249 | 'autogrow' => t('Autogrow'), |
250 | 250 | ), |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | 'load' => TRUE, |
256 | 256 | ), |
257 | 257 | 'bbcode' => array( |
258 | - 'path' => $editor['library path'] . '/editor/plugins', |
|
258 | + 'path' => $editor['library path'].'/editor/plugins', |
|
259 | 259 | 'extensions' => array( |
260 | 260 | 'bbcode' => t('BBCode'), |
261 | 261 | ), |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | 'load' => TRUE, |
264 | 264 | ), |
265 | 265 | 'dragresizetable' => array( |
266 | - 'path' => $editor['library path'] . '/editor/plugins', |
|
266 | + 'path' => $editor['library path'].'/editor/plugins', |
|
267 | 267 | 'extensions' => array( |
268 | 268 | 'dragresizetable' => t('Table drag/resize'), |
269 | 269 | ), |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | 'load' => TRUE, |
272 | 272 | ), |
273 | 273 | 'tablecommands' => array( |
274 | - 'path' => $editor['library path'] . '/editor/plugins', |
|
274 | + 'path' => $editor['library path'].'/editor/plugins', |
|
275 | 275 | 'buttons' => array( |
276 | 276 | 'TableCellProp' => t('Table: Cell properties'), |
277 | 277 | 'TableInsertRowAfter' => t('Table: Insert row after'), |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | 'title' => 'WYMeditor', |
14 | 14 | 'vendor url' => 'http://www.wymeditor.org/', |
15 | 15 | 'download url' => 'http://www.wymeditor.org/download/', |
16 | - 'library path' => wysiwyg_get_path('wymeditor') . '/wymeditor', |
|
16 | + 'library path' => wysiwyg_get_path('wymeditor').'/wymeditor', |
|
17 | 17 | 'libraries' => array( |
18 | 18 | 'min' => array( |
19 | 19 | 'title' => 'Minified', |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * The installed editor version. |
52 | 52 | */ |
53 | 53 | function wysiwyg_wymeditor_version($editor) { |
54 | - $script = $editor['library path'] . '/jquery.wymeditor.js'; |
|
54 | + $script = $editor['library path'].'/jquery.wymeditor.js'; |
|
55 | 55 | if (!file_exists($script)) { |
56 | 56 | return; |
57 | 57 | } |
@@ -99,10 +99,10 @@ discard block |
||
99 | 99 | // @todo Setup $library in wysiwyg_load_editor() already. |
100 | 100 | $library = (isset($editor['library']) ? $editor['library'] : key($editor['libraries'])); |
101 | 101 | $settings = array( |
102 | - 'basePath' => base_path() . $editor['library path'] . '/', |
|
102 | + 'basePath' => base_path().$editor['library path'].'/', |
|
103 | 103 | 'wymPath' => $editor['libraries'][$library]['files'][0], |
104 | 104 | // @todo Does not work in Drupal; jQuery can live anywhere. |
105 | - 'jQueryPath' => base_path() . 'misc/jquery.js', |
|
105 | + 'jQueryPath' => base_path().'misc/jquery.js', |
|
106 | 106 | 'updateSelector' => '.form-submit', |
107 | 107 | 'skin' => $theme, |
108 | 108 | ); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $settings['toolsItems'][] = array( |
137 | 137 | 'name' => $button, |
138 | 138 | 'title' => $plugins[$plugin][$type][$button], |
139 | - 'css' => 'wym_tools_' . $button, |
|
139 | + 'css' => 'wym_tools_'.$button, |
|
140 | 140 | ); |
141 | 141 | } |
142 | 142 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $settings['containersItems'][] = array( |
164 | 164 | 'name' => strtoupper($tag), |
165 | 165 | 'title' => $containers[$tag], |
166 | - 'css' => 'wym_containers_' . $tag, |
|
166 | + 'css' => 'wym_containers_'.$tag, |
|
167 | 167 | ); |
168 | 168 | } |
169 | 169 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * The installed editor version. |
59 | 59 | */ |
60 | 60 | function wysiwyg_ckeditor_version($editor) { |
61 | - $library = $editor['library path'] . '/ckeditor.js'; |
|
61 | + $library = $editor['library path'].'/ckeditor.js'; |
|
62 | 62 | if (!file_exists($library)) { |
63 | 63 | return; |
64 | 64 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | fclose($library); |
73 | 73 | // Version numbers need to have three parts since 3.0.1. |
74 | 74 | $version[1] = preg_replace('/^(\d+)\.(\d+)$/', '${1}.${2}.0', $version[1]); |
75 | - return $version[1] . '.' . $version[2]; |
|
75 | + return $version[1].'.'.$version[2]; |
|
76 | 76 | } |
77 | 77 | $max_lines--; |
78 | 78 | } |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | */ |
94 | 94 | function wysiwyg_ckeditor_themes($editor, $profile) { |
95 | 95 | // @todo Skins are not themes but this will do for now. |
96 | - $path = $editor['library path'] . '/skins/'; |
|
96 | + $path = $editor['library path'].'/skins/'; |
|
97 | 97 | if (file_exists($path) && ($dir_handle = opendir($path))) { |
98 | 98 | $themes = array(); |
99 | 99 | while ($file = readdir($dir_handle)) { |
100 | - if (is_dir($path . $file) && substr($file, 0, 1) != '.' && $file != 'CVS') { |
|
100 | + if (is_dir($path.$file) && substr($file, 0, 1) != '.' && $file != 'CVS') { |
|
101 | 101 | $themes[] = $file; |
102 | 102 | } |
103 | 103 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | function wysiwyg_ckeditor_settings($editor, $config, $theme) { |
129 | 129 | $settings = array( |
130 | - 'baseHref' => $GLOBALS['base_url'] . '/', |
|
130 | + 'baseHref' => $GLOBALS['base_url'].'/', |
|
131 | 131 | 'width' => '100%', |
132 | 132 | // For better compatibility with smaller textareas. |
133 | 133 | 'resize_minWidth' => 450, |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | if (isset($config['resizing'])) { |
187 | 187 | // CKEditor tests "!== false", so ensure it is a Boolean. |
188 | - $settings['resize_enabled'] = (bool) $config['resizing']; |
|
188 | + $settings['resize_enabled'] = (bool)$config['resizing']; |
|
189 | 189 | } |
190 | 190 | if (isset($config['toolbar_loc'])) { |
191 | 191 | $settings['toolbarLocation'] = $config['toolbar_loc']; |
@@ -251,11 +251,11 @@ discard block |
||
251 | 251 | $settings[$name] = array(); |
252 | 252 | // Add path for native external plugins. |
253 | 253 | if (empty($plugin['internal']) && isset($plugin['path'])) { |
254 | - $settings[$name]['path'] = base_path() . $plugin['path'] . '/'; |
|
254 | + $settings[$name]['path'] = base_path().$plugin['path'].'/'; |
|
255 | 255 | } |
256 | 256 | // Force native internal plugins to use the standard path. |
257 | 257 | else { |
258 | - $settings[$name]['path'] = base_path() . $editor['library path'] . '/plugins/' . $name . '/'; |
|
258 | + $settings[$name]['path'] = base_path().$editor['library path'].'/plugins/'.$name.'/'; |
|
259 | 259 | } |
260 | 260 | // CKEditor defaults to 'plugin.js' on its own when filename is not set. |
261 | 261 | if (!empty($plugin['filename'])) { |
@@ -275,10 +275,10 @@ discard block |
||
275 | 275 | // Populate required plugin settings. |
276 | 276 | $settings[$name] = $plugin['dialog settings'] + array( |
277 | 277 | 'title' => $plugin['title'], |
278 | - 'icon' => base_path() . $plugin['icon path'] . '/' . $plugin['icon file'], |
|
278 | + 'icon' => base_path().$plugin['icon path'].'/'.$plugin['icon file'], |
|
279 | 279 | 'iconTitle' => $plugin['icon title'], |
280 | 280 | // @todo These should only be set if the plugin defined them. |
281 | - 'css' => base_path() . $plugin['css path'] . '/' . $plugin['css file'], |
|
281 | + 'css' => base_path().$plugin['css path'].'/'.$plugin['css file'], |
|
282 | 282 | ); |
283 | 283 | } |
284 | 284 | return $settings; |