@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | */ |
21 | 21 | function pm_block_user_help($path) { |
22 | 22 | switch ($path) { |
23 | - case 'admin/settings/messages/block': |
|
24 | - return '<p>' . t('This area is used to define user blocking rules for the Privatemsg module. Rules allow control of who may block messages from whom. By default all users are allowed to block messages from anyone else. However, a site may have groups of users that need to contact or get information to others, for example: the site may have administrative staff or be a forum with moderators. Groups of users are defined by roles, which can be managed on the <a href="@roles">roles configuration page</a>.', array('@roles' => url('admin/user/roles'))) . '</p>'; |
|
23 | + case 'admin/settings/messages/block': |
|
24 | + return '<p>' . t('This area is used to define user blocking rules for the Privatemsg module. Rules allow control of who may block messages from whom. By default all users are allowed to block messages from anyone else. However, a site may have groups of users that need to contact or get information to others, for example: the site may have administrative staff or be a forum with moderators. Groups of users are defined by roles, which can be managed on the <a href="@roles">roles configuration page</a>.', array('@roles' => url('admin/user/roles'))) . '</p>'; |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
@@ -485,14 +485,14 @@ discard block |
||
485 | 485 | function pm_block_user_form_submit($form, &$form_state) { |
486 | 486 | if ($form_state['values']['confirm']) { |
487 | 487 | switch ($form_state['values']['block_action']) { |
488 | - case 'block_user': |
|
489 | - db_query('INSERT INTO {pm_block_user} (author, recipient) VALUES (%d, %d)', $form_state['values']['author'], $form_state['values']['recipient']); |
|
490 | - drupal_set_message(t('@author has been blocked from sending you any further messages.', array('@author' => $form_state['values']['author_name']))); |
|
491 | - break; |
|
492 | - case 'unblock_user': |
|
493 | - db_query('DELETE FROM {pm_block_user} WHERE author = %d AND recipient = %d', $form_state['values']['author'], $form_state['values']['recipient']); |
|
494 | - drupal_set_message(t('@author is now allowed to send you new messages.', array('@author' => $form_state['values']['author_name']))); |
|
495 | - break; |
|
488 | + case 'block_user': |
|
489 | + db_query('INSERT INTO {pm_block_user} (author, recipient) VALUES (%d, %d)', $form_state['values']['author'], $form_state['values']['recipient']); |
|
490 | + drupal_set_message(t('@author has been blocked from sending you any further messages.', array('@author' => $form_state['values']['author_name']))); |
|
491 | + break; |
|
492 | + case 'unblock_user': |
|
493 | + db_query('DELETE FROM {pm_block_user} WHERE author = %d AND recipient = %d', $form_state['values']['author'], $form_state['values']['recipient']); |
|
494 | + drupal_set_message(t('@author is now allowed to send you new messages.', array('@author' => $form_state['values']['author_name']))); |
|
495 | + break; |
|
496 | 496 | } |
497 | 497 | } |
498 | 498 | $form_state['redirect'] = $form_state['values']['destination']; |
@@ -576,9 +576,9 @@ discard block |
||
576 | 576 | */ |
577 | 577 | function pm_block_user_user($op, &$edit, &$account, $category = NULL) { |
578 | 578 | switch ($op) { |
579 | - case 'delete': |
|
580 | - // Delete blocking rules which involve this user. |
|
581 | - db_query("DELETE FROM {pm_block_user} WHERE author = %d OR recipient = %d", $account->uid, $account->uid); |
|
582 | - break; |
|
579 | + case 'delete': |
|
580 | + // Delete blocking rules which involve this user. |
|
581 | + db_query("DELETE FROM {pm_block_user} WHERE author = %d OR recipient = %d", $account->uid, $account->uid); |
|
582 | + break; |
|
583 | 583 | } |
584 | 584 | } |
@@ -280,12 +280,12 @@ discard block |
||
280 | 280 | } |
281 | 281 | |
282 | 282 | switch ($op) { |
283 | - case 'delete': |
|
284 | - // Only call delete function on certain node types |
|
285 | - if (in_array( $node->type, $node_types)) { |
|
286 | - boinc_solr_comments_delete($node); |
|
287 | - } |
|
288 | - break; |
|
283 | + case 'delete': |
|
284 | + // Only call delete function on certain node types |
|
285 | + if (in_array( $node->type, $node_types)) { |
|
286 | + boinc_solr_comments_delete($node); |
|
287 | + } |
|
288 | + break; |
|
289 | 289 | } //switch |
290 | 290 | } |
291 | 291 | |
@@ -335,13 +335,13 @@ discard block |
||
335 | 335 | */ |
336 | 336 | function boinc_solr_comments_comment(&$a1, $op) { |
337 | 337 | switch ($op) { |
338 | - case 'view': |
|
339 | - case 'update': |
|
340 | - break; |
|
341 | - case 'delete': |
|
342 | - // $a1 should be a comment object |
|
343 | - boinc_solr_comments_deletecomment($a1); |
|
344 | - break; |
|
338 | + case 'view': |
|
339 | + case 'update': |
|
340 | + break; |
|
341 | + case 'delete': |
|
342 | + // $a1 should be a comment object |
|
343 | + boinc_solr_comments_deletecomment($a1); |
|
344 | + break; |
|
345 | 345 | }// switch |
346 | 346 | } |
347 | 347 |
@@ -19,10 +19,10 @@ |
||
19 | 19 | foreach (content_types() as $key => $info) { |
20 | 20 | // Exclude node types profile, team, and panel |
21 | 21 | switch ($key) { |
22 | - case 'profile': |
|
23 | - case 'team': |
|
24 | - case 'panel': |
|
25 | - continue 2; |
|
22 | + case 'profile': |
|
23 | + case 'team': |
|
24 | + case 'panel': |
|
25 | + continue 2; |
|
26 | 26 | }// switch key |
27 | 27 | $options[$key] = $info['name']; |
28 | 28 | } |
@@ -1066,42 +1066,42 @@ |
||
1066 | 1066 | $R=$StartR;$G=$StartG;$B=$StartB; |
1067 | 1067 | switch($Direction) |
1068 | 1068 | { |
1069 | - case DIRECTION_VERTICAL: |
|
1070 | - $StartY = $Y1; $EndY = floor($Y2)+1; $LastY2 = $StartY; |
|
1071 | - for($i=0;$i<=$Step;$i++) |
|
1069 | + case DIRECTION_VERTICAL: |
|
1070 | + $StartY = $Y1; $EndY = floor($Y2)+1; $LastY2 = $StartY; |
|
1071 | + for($i=0;$i<=$Step;$i++) |
|
1072 | + { |
|
1073 | + $Y2 = floor($StartY + ($i * $StepSize)); |
|
1074 | + |
|
1075 | + if ($Y2 > $EndY) { $Y2 = $EndY; } |
|
1076 | + if (($Y1 != $Y2 && $Y1 < $Y2) || $Y2 == $EndY) |
|
1072 | 1077 | { |
1073 | - $Y2 = floor($StartY + ($i * $StepSize)); |
|
1074 | - |
|
1075 | - if ($Y2 > $EndY) { $Y2 = $EndY; } |
|
1076 | - if (($Y1 != $Y2 && $Y1 < $Y2) || $Y2 == $EndY) |
|
1077 | - { |
|
1078 | - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); |
|
1079 | - $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); |
|
1080 | - $LastY2 = max($LastY2,$Y2); |
|
1081 | - $Y1 = $Y2+1; |
|
1082 | - } |
|
1083 | - $R = $R + $RStep; $G = $G + $GStep; $B = $B + $BStep; |
|
1078 | + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); |
|
1079 | + $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); |
|
1080 | + $LastY2 = max($LastY2,$Y2); |
|
1081 | + $Y1 = $Y2+1; |
|
1084 | 1082 | } |
1085 | - if ( $LastY2 < $EndY && isset($Color)) { for ($i=$LastY2+1;$i<=$EndY;$i++) { $this->drawLine($X1,$i,$X2,$i,$Color); } } |
|
1086 | - break; |
|
1087 | - |
|
1088 | - case DIRECTION_HORIZONTAL: |
|
1089 | - $StartX = $X1; $EndX = $X2; |
|
1090 | - for($i=0;$i<=$Step;$i++) |
|
1083 | + $R = $R + $RStep; $G = $G + $GStep; $B = $B + $BStep; |
|
1084 | + } |
|
1085 | + if ( $LastY2 < $EndY && isset($Color)) { for ($i=$LastY2+1;$i<=$EndY;$i++) { $this->drawLine($X1,$i,$X2,$i,$Color); } } |
|
1086 | + break; |
|
1087 | + |
|
1088 | + case DIRECTION_HORIZONTAL: |
|
1089 | + $StartX = $X1; $EndX = $X2; |
|
1090 | + for($i=0;$i<=$Step;$i++) |
|
1091 | + { |
|
1092 | + $X2 = floor($StartX + ($i * $StepSize)); |
|
1093 | + |
|
1094 | + if ($X2 > $EndX) { $X2 = $EndX; } |
|
1095 | + if (($X1 != $X2 && $X1 < $X2) || $X2 == $EndX) |
|
1091 | 1096 | { |
1092 | - $X2 = floor($StartX + ($i * $StepSize)); |
|
1093 | - |
|
1094 | - if ($X2 > $EndX) { $X2 = $EndX; } |
|
1095 | - if (($X1 != $X2 && $X1 < $X2) || $X2 == $EndX) |
|
1096 | - { |
|
1097 | - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); |
|
1098 | - $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); |
|
1099 | - $X1 = $X2+1; |
|
1100 | - } |
|
1101 | - $R = $R + $RStep; $G = $G + $GStep; $B = $B + $BStep; |
|
1097 | + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); |
|
1098 | + $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); |
|
1099 | + $X1 = $X2+1; |
|
1102 | 1100 | } |
1103 | - if ( $X2 < $EndX && isset($Color)) { $this->drawFilledRectangle($X2,$Y1,$EndX,$Y2,$Color); } |
|
1104 | - break; |
|
1101 | + $R = $R + $RStep; $G = $G + $GStep; $B = $B + $BStep; |
|
1102 | + } |
|
1103 | + if ( $X2 < $EndX && isset($Color)) { $this->drawFilledRectangle($X2,$Y1,$EndX,$Y2,$Color); } |
|
1104 | + break; |
|
1105 | 1105 | } |
1106 | 1106 | |
1107 | 1107 | $this->Shadow = $Shadow; |
@@ -180,12 +180,12 @@ |
||
180 | 180 | */ |
181 | 181 | function boincwork_locale($op = 'groups', $group = NULL) { |
182 | 182 | switch ($op) { |
183 | - case 'groups': |
|
184 | - return array('project' => bts('Project')); |
|
185 | - case 'info': |
|
186 | - $info['project']['refresh callback'] = 'boincwork_locale_refresh'; |
|
187 | - $info['project']['format'] = FALSE; |
|
188 | - return $info; |
|
183 | + case 'groups': |
|
184 | + return array('project' => bts('Project')); |
|
185 | + case 'info': |
|
186 | + $info['project']['refresh callback'] = 'boincwork_locale_refresh'; |
|
187 | + $info['project']['format'] = FALSE; |
|
188 | + return $info; |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 |
@@ -300,125 +300,125 @@ |
||
300 | 300 | } |
301 | 301 | |
302 | 302 | switch ($form_state['values']['import']) { |
303 | - case 'users': |
|
304 | - boincimport_users(); |
|
305 | - break; |
|
306 | - |
|
307 | - case 'teams': |
|
308 | - boincimport_teams(); |
|
309 | - if (!variable_get('boincimport_import_team_successful', 0)) { |
|
310 | - $_SESSION['boincimport_stage_selected'] = 'teams'; |
|
311 | - } |
|
312 | - else { |
|
313 | - $_SESSION['boincimport_stage_selected'] = 'friends'; |
|
314 | - } |
|
315 | - break; |
|
303 | + case 'users': |
|
304 | + boincimport_users(); |
|
305 | + break; |
|
316 | 306 | |
317 | - case 'friends': |
|
318 | - boincimport_friends(); |
|
319 | - if (!variable_get('boincimport_import_friend_successful', 0)) { |
|
320 | - $_SESSION['boincimport_stage_selected'] = 'friends'; |
|
321 | - } |
|
322 | - else { |
|
323 | - $_SESSION['boincimport_stage_selected'] = 'preferences'; |
|
324 | - } |
|
325 | - break; |
|
307 | + case 'teams': |
|
308 | + boincimport_teams(); |
|
309 | + if (!variable_get('boincimport_import_team_successful', 0)) { |
|
310 | + $_SESSION['boincimport_stage_selected'] = 'teams'; |
|
311 | + } |
|
312 | + else { |
|
313 | + $_SESSION['boincimport_stage_selected'] = 'friends'; |
|
314 | + } |
|
315 | + break; |
|
326 | 316 | |
327 | - case 'preferences': |
|
328 | - boincimport_preferences(); |
|
329 | - if (!variable_get('boincimport_import_preferences_successful', 0)) { |
|
330 | - $_SESSION['boincimport_stage_selected'] = 'preferences'; |
|
331 | - } |
|
332 | - else { |
|
333 | - $_SESSION['boincimport_stage_selected'] = 'private messages'; |
|
334 | - } |
|
335 | - break; |
|
317 | + case 'friends': |
|
318 | + boincimport_friends(); |
|
319 | + if (!variable_get('boincimport_import_friend_successful', 0)) { |
|
320 | + $_SESSION['boincimport_stage_selected'] = 'friends'; |
|
321 | + } |
|
322 | + else { |
|
323 | + $_SESSION['boincimport_stage_selected'] = 'preferences'; |
|
324 | + } |
|
325 | + break; |
|
336 | 326 | |
337 | - case 'private messages': |
|
338 | - boincimport_private_msgs(); |
|
339 | - if (!variable_get('boincimport_import_private_msg_successful', 0)) { |
|
340 | - $_SESSION['boincimport_stage_selected'] = 'private messages'; |
|
341 | - } |
|
342 | - else { |
|
343 | - $_SESSION['boincimport_stage_selected'] = 'categories'; |
|
344 | - } |
|
345 | - break; |
|
327 | + case 'preferences': |
|
328 | + boincimport_preferences(); |
|
329 | + if (!variable_get('boincimport_import_preferences_successful', 0)) { |
|
330 | + $_SESSION['boincimport_stage_selected'] = 'preferences'; |
|
331 | + } |
|
332 | + else { |
|
333 | + $_SESSION['boincimport_stage_selected'] = 'private messages'; |
|
334 | + } |
|
335 | + break; |
|
346 | 336 | |
347 | - case 'categories': |
|
348 | - boincimport_forum_categories(); |
|
349 | - if (!variable_get('boincimport_import_category_successful', 0)) { |
|
350 | - $_SESSION['boincimport_stage_selected'] = 'categories'; |
|
351 | - } |
|
352 | - else { |
|
353 | - $_SESSION['boincimport_stage_selected'] = 'topics'; |
|
354 | - } |
|
355 | - break; |
|
337 | + case 'private messages': |
|
338 | + boincimport_private_msgs(); |
|
339 | + if (!variable_get('boincimport_import_private_msg_successful', 0)) { |
|
340 | + $_SESSION['boincimport_stage_selected'] = 'private messages'; |
|
341 | + } |
|
342 | + else { |
|
343 | + $_SESSION['boincimport_stage_selected'] = 'categories'; |
|
344 | + } |
|
345 | + break; |
|
356 | 346 | |
357 | - case 'topics': |
|
358 | - boincimport_forum_topics(); |
|
359 | - if (!variable_get('boincimport_import_topic_successful', 0)) { |
|
360 | - $_SESSION['boincimport_stage_selected'] = 'topics'; |
|
361 | - } |
|
362 | - else { |
|
363 | - $_SESSION['boincimport_stage_selected'] = 'posts'; |
|
364 | - } |
|
365 | - break; |
|
347 | + case 'categories': |
|
348 | + boincimport_forum_categories(); |
|
349 | + if (!variable_get('boincimport_import_category_successful', 0)) { |
|
350 | + $_SESSION['boincimport_stage_selected'] = 'categories'; |
|
351 | + } |
|
352 | + else { |
|
353 | + $_SESSION['boincimport_stage_selected'] = 'topics'; |
|
354 | + } |
|
355 | + break; |
|
356 | + |
|
357 | + case 'topics': |
|
358 | + boincimport_forum_topics(); |
|
359 | + if (!variable_get('boincimport_import_topic_successful', 0)) { |
|
360 | + $_SESSION['boincimport_stage_selected'] = 'topics'; |
|
361 | + } |
|
362 | + else { |
|
363 | + $_SESSION['boincimport_stage_selected'] = 'posts'; |
|
364 | + } |
|
365 | + break; |
|
366 | 366 | |
367 | - case 'posts': |
|
368 | - boincimport_forum_posts(); |
|
369 | - if (!variable_get('boincimport_import_post_successful', 0)) { |
|
370 | - $_SESSION['boincimport_stage_selected'] = 'posts'; |
|
371 | - } |
|
372 | - else { |
|
373 | - $_SESSION['boincimport_stage_selected'] = 'url'; |
|
374 | - } |
|
375 | - break; |
|
367 | + case 'posts': |
|
368 | + boincimport_forum_posts(); |
|
369 | + if (!variable_get('boincimport_import_post_successful', 0)) { |
|
370 | + $_SESSION['boincimport_stage_selected'] = 'posts'; |
|
371 | + } |
|
372 | + else { |
|
373 | + $_SESSION['boincimport_stage_selected'] = 'url'; |
|
374 | + } |
|
375 | + break; |
|
376 | 376 | |
377 | - case 'team forums': |
|
378 | - boincimport_team_forums(); |
|
379 | - if (!variable_get('boincimport_team_forum_successful', 0)) { |
|
380 | - $_SESSION['boincimport_stage_selected'] = 'team forums'; |
|
381 | - } |
|
382 | - else { |
|
383 | - $_SESSION['boincimport_stage_selected'] = 'team topics'; |
|
384 | - } |
|
385 | - break; |
|
377 | + case 'team forums': |
|
378 | + boincimport_team_forums(); |
|
379 | + if (!variable_get('boincimport_team_forum_successful', 0)) { |
|
380 | + $_SESSION['boincimport_stage_selected'] = 'team forums'; |
|
381 | + } |
|
382 | + else { |
|
383 | + $_SESSION['boincimport_stage_selected'] = 'team topics'; |
|
384 | + } |
|
385 | + break; |
|
386 | 386 | |
387 | - case 'team topics': |
|
388 | - boincimport_team_forum_topics(); |
|
389 | - if (!variable_get('boincimport_team_topic_successful', 0)) { |
|
390 | - $_SESSION['boincimport_stage_selected'] = 'team topics'; |
|
391 | - } |
|
392 | - else { |
|
393 | - $_SESSION['boincimport_stage_selected'] = 'team posts'; |
|
394 | - } |
|
395 | - break; |
|
387 | + case 'team topics': |
|
388 | + boincimport_team_forum_topics(); |
|
389 | + if (!variable_get('boincimport_team_topic_successful', 0)) { |
|
390 | + $_SESSION['boincimport_stage_selected'] = 'team topics'; |
|
391 | + } |
|
392 | + else { |
|
393 | + $_SESSION['boincimport_stage_selected'] = 'team posts'; |
|
394 | + } |
|
395 | + break; |
|
396 | 396 | |
397 | - case 'team posts': |
|
398 | - boincimport_team_forum_posts(); |
|
399 | - if (!variable_get('boincimport_team_post_successful', 0)) { |
|
400 | - $_SESSION['boincimport_stage_selected'] = 'team posts'; |
|
401 | - } |
|
402 | - else { |
|
403 | - $_SESSION['boincimport_stage_selected'] = 'url'; |
|
404 | - } |
|
405 | - break; |
|
397 | + case 'team posts': |
|
398 | + boincimport_team_forum_posts(); |
|
399 | + if (!variable_get('boincimport_team_post_successful', 0)) { |
|
400 | + $_SESSION['boincimport_stage_selected'] = 'team posts'; |
|
401 | + } |
|
402 | + else { |
|
403 | + $_SESSION['boincimport_stage_selected'] = 'url'; |
|
404 | + } |
|
405 | + break; |
|
406 | 406 | |
407 | - case 'url': |
|
408 | - boincimport_replace_urls(); |
|
409 | - if (!variable_get('boincimport_replace_url_successful', 0)) { |
|
410 | - $_SESSION['boincimport_stage_selected'] = 'url'; |
|
411 | - } |
|
412 | - else { |
|
413 | - drupal_set_message('Congratulations. Import Finished'); |
|
414 | - drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page'); |
|
415 | - watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); |
|
416 | - unset($_SESSION['boincimport_stage_selected']); |
|
417 | - } |
|
418 | - break; |
|
419 | - default: |
|
420 | - $_SESSION['boincimport_stage_selected'] = 'users'; |
|
421 | - break; |
|
407 | + case 'url': |
|
408 | + boincimport_replace_urls(); |
|
409 | + if (!variable_get('boincimport_replace_url_successful', 0)) { |
|
410 | + $_SESSION['boincimport_stage_selected'] = 'url'; |
|
411 | + } |
|
412 | + else { |
|
413 | + drupal_set_message('Congratulations. Import Finished'); |
|
414 | + drupal_set_message('Please visit the '. l('Post migration configuration', 'admin/boinc/import/post_configuration') .' page'); |
|
415 | + watchdog('boincimport', 'Import process is complete', array(), WATCHDOG_INFO); |
|
416 | + unset($_SESSION['boincimport_stage_selected']); |
|
417 | + } |
|
418 | + break; |
|
419 | + default: |
|
420 | + $_SESSION['boincimport_stage_selected'] = 'users'; |
|
421 | + break; |
|
422 | 422 | } |
423 | 423 | } |
424 | 424 |
@@ -382,16 +382,16 @@ discard block |
||
382 | 382 | // Store the menu item since it has some useful information. |
383 | 383 | $vars['menu_item'] = menu_get_item(); |
384 | 384 | switch ($vars['menu_item']['page_callback']) { |
385 | - case 'views_page': |
|
386 | - // Is this a Views page? |
|
387 | - $vars['classes_array'][] = 'page-views'; |
|
388 | - break; |
|
389 | - case 'page_manager_page_execute': |
|
390 | - case 'page_manager_node_view': |
|
391 | - case 'page_manager_contact_site': |
|
392 | - // Is this a Panels page? |
|
393 | - $vars['classes_array'][] = 'page-panels'; |
|
394 | - break; |
|
385 | + case 'views_page': |
|
386 | + // Is this a Views page? |
|
387 | + $vars['classes_array'][] = 'page-views'; |
|
388 | + break; |
|
389 | + case 'page_manager_page_execute': |
|
390 | + case 'page_manager_node_view': |
|
391 | + case 'page_manager_contact_site': |
|
392 | + // Is this a Panels page? |
|
393 | + $vars['classes_array'][] = 'page-panels'; |
|
394 | + break; |
|
395 | 395 | } |
396 | 396 | } |
397 | 397 | |
@@ -428,31 +428,31 @@ discard block |
||
428 | 428 | function zen_preprocess_node(&$vars, $hook) { |
429 | 429 | // Create the build_mode variable. |
430 | 430 | switch ($vars['node']->build_mode) { |
431 | - case NODE_BUILD_NORMAL: |
|
432 | - if ($vars['node']->build_mode === NODE_BUILD_NORMAL) { |
|
433 | - $vars['build_mode'] = $vars['teaser'] ? 'teaser' : 'full'; |
|
434 | - } |
|
435 | - else { |
|
436 | - $vars['build_mode'] = $vars['node']->build_mode; |
|
437 | - } |
|
438 | - break; |
|
439 | - case NODE_BUILD_PREVIEW: |
|
440 | - $vars['build_mode'] = 'preview'; |
|
441 | - break; |
|
442 | - case NODE_BUILD_SEARCH_INDEX: |
|
443 | - $vars['build_mode'] = 'search_index'; |
|
444 | - break; |
|
445 | - case NODE_BUILD_SEARCH_RESULT: |
|
446 | - $vars['build_mode'] = 'search_result'; |
|
447 | - break; |
|
448 | - case NODE_BUILD_RSS: |
|
449 | - $vars['build_mode'] = 'rss'; |
|
450 | - break; |
|
451 | - case NODE_BUILD_PRINT: |
|
452 | - $vars['build_mode'] = 'print'; |
|
453 | - break; |
|
454 | - default: |
|
431 | + case NODE_BUILD_NORMAL: |
|
432 | + if ($vars['node']->build_mode === NODE_BUILD_NORMAL) { |
|
433 | + $vars['build_mode'] = $vars['teaser'] ? 'teaser' : 'full'; |
|
434 | + } |
|
435 | + else { |
|
455 | 436 | $vars['build_mode'] = $vars['node']->build_mode; |
437 | + } |
|
438 | + break; |
|
439 | + case NODE_BUILD_PREVIEW: |
|
440 | + $vars['build_mode'] = 'preview'; |
|
441 | + break; |
|
442 | + case NODE_BUILD_SEARCH_INDEX: |
|
443 | + $vars['build_mode'] = 'search_index'; |
|
444 | + break; |
|
445 | + case NODE_BUILD_SEARCH_RESULT: |
|
446 | + $vars['build_mode'] = 'search_result'; |
|
447 | + break; |
|
448 | + case NODE_BUILD_RSS: |
|
449 | + $vars['build_mode'] = 'rss'; |
|
450 | + break; |
|
451 | + case NODE_BUILD_PRINT: |
|
452 | + $vars['build_mode'] = 'print'; |
|
453 | + break; |
|
454 | + default: |
|
455 | + $vars['build_mode'] = $vars['node']->build_mode; |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | // Create the user_picture variable. |
@@ -80,20 +80,20 @@ |
||
80 | 80 | |
81 | 81 | function upload_error_description($errno) { |
82 | 82 | switch($errno) { |
83 | - case UPLOAD_ERR_INI_SIZE: |
|
84 | - return "The uploaded file exceeds upload_max_filesize of php.ini."; break; |
|
85 | - case UPLOAD_ERR_FORM_SIZE: |
|
86 | - return "The uploaded file exceeds the MAX_FILE_SIZE specified in the HTML form."; break; |
|
87 | - case UPLOAD_ERR_PARTIAL: |
|
88 | - return "The uploaded file was only partially uploaded."; break; |
|
89 | - case UPLOAD_ERR_NO_FILE: |
|
90 | - return "No file was uploaded."; break; |
|
91 | - case UPLOAD_ERR_NO_TMP_DIR: |
|
92 | - return "Missing a temporary folder."; break; |
|
93 | - case UPLOAD_ERR_CANT_WRITE: |
|
94 | - return "Failed to write file to disk."; break; |
|
95 | - case UPLOAD_ERR_EXTENSION: |
|
96 | - return "A PHP extension stopped the file upload."; break; |
|
83 | + case UPLOAD_ERR_INI_SIZE: |
|
84 | + return "The uploaded file exceeds upload_max_filesize of php.ini."; break; |
|
85 | + case UPLOAD_ERR_FORM_SIZE: |
|
86 | + return "The uploaded file exceeds the MAX_FILE_SIZE specified in the HTML form."; break; |
|
87 | + case UPLOAD_ERR_PARTIAL: |
|
88 | + return "The uploaded file was only partially uploaded."; break; |
|
89 | + case UPLOAD_ERR_NO_FILE: |
|
90 | + return "No file was uploaded."; break; |
|
91 | + case UPLOAD_ERR_NO_TMP_DIR: |
|
92 | + return "Missing a temporary folder."; break; |
|
93 | + case UPLOAD_ERR_CANT_WRITE: |
|
94 | + return "Failed to write file to disk."; break; |
|
95 | + case UPLOAD_ERR_EXTENSION: |
|
96 | + return "A PHP extension stopped the file upload."; break; |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 |
@@ -55,14 +55,14 @@ |
||
55 | 55 | |
56 | 56 | // TODO: create a function for this in forum_banishment_vote.inc to make it more flexible |
57 | 57 | switch (post_int("category", true)) { |
58 | - case 1: |
|
59 | - $mod_category = tra("Obscene"); |
|
60 | - case 2: |
|
61 | - $mod_category = tra("Flame/Hate mail"); |
|
62 | - case 3: |
|
63 | - $mod_category = tra("User Request"); |
|
64 | - default: |
|
65 | - $mod_category = tra("Other"); |
|
58 | +case 1: |
|
59 | + $mod_category = tra("Obscene"); |
|
60 | +case 2: |
|
61 | + $mod_category = tra("Flame/Hate mail"); |
|
62 | +case 3: |
|
63 | + $mod_category = tra("User Request"); |
|
64 | +default: |
|
65 | + $mod_category = tra("Other"); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | if (post_str('reason', true)){ |