@@ -159,26 +159,26 @@ |
||
159 | 159 | public function step(&$client, $response, &$message, &$interactions) |
160 | 160 | { |
161 | 161 | switch ($this->state) { |
162 | - case SASL_NTLM_STATE_IDENTIFY_DOMAIN: |
|
163 | - $message = $this->typeMsg1($this->credentials["realm"], $this->credentials["workstation"]); |
|
164 | - $this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE; |
|
165 | - break; |
|
166 | - case SASL_NTLM_STATE_RESPOND_CHALLENGE: |
|
167 | - $ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]); |
|
168 | - $message = $this->typeMsg3( |
|
169 | - $ntlm_response, |
|
170 | - $this->credentials["user"], |
|
171 | - $this->credentials["realm"], |
|
172 | - $this->credentials["workstation"] |
|
173 | - ); |
|
174 | - $this->state = SASL_NTLM_STATE_DONE; |
|
175 | - break; |
|
176 | - case SASL_NTLM_STATE_DONE: |
|
177 | - $client->error = "NTLM authentication was finished without success"; |
|
178 | - return (SASL_FAIL); |
|
179 | - default: |
|
180 | - $client->error = "invalid NTLM authentication step state"; |
|
181 | - return (SASL_FAIL); |
|
162 | + case SASL_NTLM_STATE_IDENTIFY_DOMAIN: |
|
163 | + $message = $this->typeMsg1($this->credentials["realm"], $this->credentials["workstation"]); |
|
164 | + $this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE; |
|
165 | + break; |
|
166 | + case SASL_NTLM_STATE_RESPOND_CHALLENGE: |
|
167 | + $ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]); |
|
168 | + $message = $this->typeMsg3( |
|
169 | + $ntlm_response, |
|
170 | + $this->credentials["user"], |
|
171 | + $this->credentials["realm"], |
|
172 | + $this->credentials["workstation"] |
|
173 | + ); |
|
174 | + $this->state = SASL_NTLM_STATE_DONE; |
|
175 | + break; |
|
176 | + case SASL_NTLM_STATE_DONE: |
|
177 | + $client->error = "NTLM authentication was finished without success"; |
|
178 | + return (SASL_FAIL); |
|
179 | + default: |
|
180 | + $client->error = "invalid NTLM authentication step state"; |
|
181 | + return (SASL_FAIL); |
|
182 | 182 | } |
183 | 183 | return (SASL_CONTINUE); |
184 | 184 | } |
@@ -617,42 +617,42 @@ discard block |
||
617 | 617 | // first, disallow 8 bit characters and control characters |
618 | 618 | if (preg_match('/[\0-\37\200-\377]+/',$attvalue)) { |
619 | 619 | switch ($attname) { |
620 | - case 'href': |
|
621 | - $attvalue = $sQuote . 'http://invalid-stuff-detected.example.com' . $sQuote; |
|
622 | - break; |
|
623 | - default: |
|
624 | - $attvalue = $sQuote . $trans_image_path . $sQuote; |
|
625 | - break; |
|
620 | + case 'href': |
|
621 | + $attvalue = $sQuote . 'http://invalid-stuff-detected.example.com' . $sQuote; |
|
622 | + break; |
|
623 | + default: |
|
624 | + $attvalue = $sQuote . $trans_image_path . $sQuote; |
|
625 | + break; |
|
626 | 626 | } |
627 | 627 | } else { |
628 | 628 | $aUrl = parse_url($attvalue); |
629 | 629 | if (isset($aUrl['scheme'])) { |
630 | 630 | switch(strtolower($aUrl['scheme'])) { |
631 | - case 'mailto': |
|
632 | - case 'http': |
|
633 | - case 'https': |
|
634 | - case 'ftp': |
|
635 | - if ($attname != 'href') { |
|
636 | - if ($block_external_images == true) { |
|
631 | + case 'mailto': |
|
632 | + case 'http': |
|
633 | + case 'https': |
|
634 | + case 'ftp': |
|
635 | + if ($attname != 'href') { |
|
636 | + if ($block_external_images == true) { |
|
637 | + $attvalue = $sQuote . $trans_image_path . $sQuote; |
|
638 | + } else { |
|
639 | + if (!isset($aUrl['path'])) { |
|
637 | 640 | $attvalue = $sQuote . $trans_image_path . $sQuote; |
638 | - } else { |
|
639 | - if (!isset($aUrl['path'])) { |
|
640 | - $attvalue = $sQuote . $trans_image_path . $sQuote; |
|
641 | - } |
|
642 | 641 | } |
643 | - } else { |
|
644 | - $attvalue = $sQuote . $attvalue . $sQuote; |
|
645 | 642 | } |
646 | - break; |
|
647 | - case 'outbind': |
|
648 | - $attvalue = $sQuote . $attvalue . $sQuote; |
|
649 | - break; |
|
650 | - case 'cid': |
|
643 | + } else { |
|
651 | 644 | $attvalue = $sQuote . $attvalue . $sQuote; |
652 | - break; |
|
653 | - default: |
|
654 | - $attvalue = $sQuote . $trans_image_path . $sQuote; |
|
655 | - break; |
|
645 | + } |
|
646 | + break; |
|
647 | + case 'outbind': |
|
648 | + $attvalue = $sQuote . $attvalue . $sQuote; |
|
649 | + break; |
|
650 | + case 'cid': |
|
651 | + $attvalue = $sQuote . $attvalue . $sQuote; |
|
652 | + break; |
|
653 | + default: |
|
654 | + $attvalue = $sQuote . $trans_image_path . $sQuote; |
|
655 | + break; |
|
656 | 656 | } |
657 | 657 | } else { |
658 | 658 | if (!isset($aUrl['path']) || $aUrl['path'] != $trans_image_path) { |
@@ -673,53 +673,53 @@ discard block |
||
673 | 673 | for ($i=$pos,$iCount=strlen($body);$i<$iCount;++$i) { |
674 | 674 | $char = $body{$i}; |
675 | 675 | switch ($char) { |
676 | - case '<': |
|
677 | - $sToken = $char; |
|
678 | - break; |
|
679 | - case '/': |
|
680 | - if ($sToken == '<') { |
|
681 | - $sToken .= $char; |
|
682 | - $bEndTag = true; |
|
683 | - } else { |
|
684 | - $content .= $char; |
|
685 | - } |
|
686 | - break; |
|
687 | - case '>': |
|
688 | - if ($bEndTag) { |
|
689 | - $sToken .= $char; |
|
690 | - if (preg_match('/\<\/\s*style\s*\>/i',$sToken,$aMatch)) { |
|
691 | - $newpos = $i + 1; |
|
692 | - $bSucces = true; |
|
693 | - break 2; |
|
694 | - } else { |
|
695 | - $content .= $sToken; |
|
696 | - } |
|
697 | - $bEndTag = false; |
|
698 | - } else { |
|
699 | - $content .= $char; |
|
700 | - } |
|
701 | - break; |
|
702 | - case '!': |
|
703 | - if ($sToken == '<') { |
|
704 | - // possible comment |
|
705 | - if (isset($body{$i+2}) && substr($body,$i,3) == '!--') { |
|
706 | - $i = strpos($body,'-->',$i+3); |
|
707 | - if ($i === false) { // no end comment |
|
708 | - $i = strlen($body); |
|
709 | - } |
|
710 | - $sToken = ''; |
|
711 | - } |
|
676 | + case '<': |
|
677 | + $sToken = $char; |
|
678 | + break; |
|
679 | + case '/': |
|
680 | + if ($sToken == '<') { |
|
681 | + $sToken .= $char; |
|
682 | + $bEndTag = true; |
|
683 | + } else { |
|
684 | + $content .= $char; |
|
685 | + } |
|
686 | + break; |
|
687 | + case '>': |
|
688 | + if ($bEndTag) { |
|
689 | + $sToken .= $char; |
|
690 | + if (preg_match('/\<\/\s*style\s*\>/i',$sToken,$aMatch)) { |
|
691 | + $newpos = $i + 1; |
|
692 | + $bSucces = true; |
|
693 | + break 2; |
|
712 | 694 | } else { |
713 | - $content .= $char; |
|
695 | + $content .= $sToken; |
|
714 | 696 | } |
715 | - break; |
|
716 | - default: |
|
717 | - if ($bEndTag) { |
|
718 | - $sToken .= $char; |
|
719 | - } else { |
|
720 | - $content .= $char; |
|
697 | + $bEndTag = false; |
|
698 | + } else { |
|
699 | + $content .= $char; |
|
700 | + } |
|
701 | + break; |
|
702 | + case '!': |
|
703 | + if ($sToken == '<') { |
|
704 | + // possible comment |
|
705 | + if (isset($body{$i+2}) && substr($body,$i,3) == '!--') { |
|
706 | + $i = strpos($body,'-->',$i+3); |
|
707 | + if ($i === false) { // no end comment |
|
708 | + $i = strlen($body); |
|
709 | + } |
|
710 | + $sToken = ''; |
|
721 | 711 | } |
722 | - break; |
|
712 | + } else { |
|
713 | + $content .= $char; |
|
714 | + } |
|
715 | + break; |
|
716 | + default: |
|
717 | + if ($bEndTag) { |
|
718 | + $sToken .= $char; |
|
719 | + } else { |
|
720 | + $content .= $char; |
|
721 | + } |
|
722 | + break; |
|
723 | 723 | } |
724 | 724 | } |
725 | 725 | if ($bSucces == FALSE){ |
@@ -799,17 +799,17 @@ discard block |
||
799 | 799 | $quotchar = substr($attvalue, 0, 1); |
800 | 800 | $attvalue = str_replace($quotchar, "", $attvalue); |
801 | 801 | switch ($attname){ |
802 | - case 'background': |
|
803 | - $styledef .= "background-image: url('$trans_image_path'); "; |
|
804 | - break; |
|
805 | - case 'bgcolor': |
|
806 | - $has_bgc_stl = true; |
|
807 | - $styledef .= "background-color: $attvalue; "; |
|
808 | - break; |
|
809 | - case 'text': |
|
810 | - $has_txt_stl = true; |
|
811 | - $styledef .= "color: $attvalue; "; |
|
812 | - break; |
|
802 | + case 'background': |
|
803 | + $styledef .= "background-image: url('$trans_image_path'); "; |
|
804 | + break; |
|
805 | + case 'bgcolor': |
|
806 | + $has_bgc_stl = true; |
|
807 | + $styledef .= "background-color: $attvalue; "; |
|
808 | + break; |
|
809 | + case 'text': |
|
810 | + $has_txt_stl = true; |
|
811 | + $styledef .= "color: $attvalue; "; |
|
812 | + break; |
|
813 | 813 | } |
814 | 814 | } |
815 | 815 | // Outlook defines a white bgcolor and no text color. This can lead to |
@@ -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)){ |
@@ -36,12 +36,12 @@ |
||
36 | 36 | |
37 | 37 | function hide_explanation() { |
38 | 38 | switch (post_int("category", true)) { |
39 | - case 1: $c = "Obscene"; break; |
|
40 | - case 2: $c = "Flame/Hate mail"; break; |
|
41 | - case 3: $c = "Commercial spam"; break; |
|
42 | - case 4: $c = "Double post"; break; |
|
43 | - case 5: $c = "User Request"; break; |
|
44 | - default: $c = "Other"; break; |
|
39 | + case 1: $c = "Obscene"; break; |
|
40 | + case 2: $c = "Flame/Hate mail"; break; |
|
41 | + case 3: $c = "Commercial spam"; break; |
|
42 | + case 4: $c = "Double post"; break; |
|
43 | + case 5: $c = "User Request"; break; |
|
44 | + default: $c = "Other"; break; |
|
45 | 45 | } |
46 | 46 | $x = "\nYour post was categorized as ".$c; |
47 | 47 | $x .= mod_comment(); |
@@ -35,63 +35,63 @@ |
||
35 | 35 | start_table(); |
36 | 36 | |
37 | 37 | switch($table){ |
38 | - case "platform": |
|
39 | - break; |
|
40 | - case "app": |
|
41 | - break; |
|
42 | - case "app_version": |
|
43 | - print_detail_field(); |
|
44 | - print_query_field(); |
|
45 | - break; |
|
46 | - case "host": |
|
47 | - echo " |
|
38 | +case "platform": |
|
39 | + break; |
|
40 | +case "app": |
|
41 | + break; |
|
42 | +case "app_version": |
|
43 | + print_detail_field(); |
|
44 | + print_query_field(); |
|
45 | + break; |
|
46 | +case "host": |
|
47 | + echo " |
|
48 | 48 | <tr> |
49 | 49 | <td align=\"right\">Show Aggregate Information</td> |
50 | 50 | <td> |
51 | 51 | "; |
52 | - print_checkbox("", "show_aggregate", $show_aggregate); |
|
53 | - echo " |
|
52 | + print_checkbox("", "show_aggregate", $show_aggregate); |
|
53 | + echo " |
|
54 | 54 | </td> |
55 | 55 | </tr> |
56 | 56 | "; |
57 | - print_detail_field(); |
|
58 | - print_query_field(); |
|
59 | - break; |
|
60 | - case "workunit": |
|
61 | - print_detail_field(); |
|
62 | - print_query_field(); |
|
63 | - echo "<input type=\"hidden\" name=\"sort_by\" value=\"id\">\n"; |
|
64 | - break; |
|
65 | - case "result": |
|
66 | - echo "<tr><td align=\"right\">Server state</td><td> "; |
|
67 | - server_state_select(); |
|
68 | - echo "</td></tr>\n"; |
|
69 | - //print_text_field( "Batch number:", "batch", $batch ); |
|
70 | - echo "<tr><td align=\"right\">Outcome</td><td>"; |
|
71 | - outcome_select(); |
|
72 | - echo "</td></tr>\n"; |
|
73 | - echo "<tr><td align=\"right\">Client state</td><td>"; |
|
74 | - client_state_select(); |
|
75 | - echo "</td></tr>\n"; |
|
76 | - echo "<tr><td align=\"right\">Validate state</td><td>"; |
|
77 | - validate_state_select(); |
|
78 | - echo "</td></tr>\n"; |
|
79 | - echo "<tr><td align=\"right\">Sort by</td><td>"; |
|
80 | - result_sort_select(); |
|
81 | - sort_order_select(); |
|
82 | - echo "</td></tr>\n"; |
|
83 | - print_detail_field(); |
|
84 | - print_query_field(); |
|
85 | - break; |
|
86 | - case "team": |
|
87 | - print_query_field(); |
|
88 | - break; |
|
89 | - case "user": |
|
90 | - print_query_field(); |
|
91 | - break; |
|
92 | - default: |
|
93 | - echo "Unknown table name\n"; |
|
94 | - exit(); |
|
57 | + print_detail_field(); |
|
58 | + print_query_field(); |
|
59 | + break; |
|
60 | +case "workunit": |
|
61 | + print_detail_field(); |
|
62 | + print_query_field(); |
|
63 | + echo "<input type=\"hidden\" name=\"sort_by\" value=\"id\">\n"; |
|
64 | + break; |
|
65 | +case "result": |
|
66 | + echo "<tr><td align=\"right\">Server state</td><td> "; |
|
67 | + server_state_select(); |
|
68 | + echo "</td></tr>\n"; |
|
69 | + //print_text_field( "Batch number:", "batch", $batch ); |
|
70 | + echo "<tr><td align=\"right\">Outcome</td><td>"; |
|
71 | + outcome_select(); |
|
72 | + echo "</td></tr>\n"; |
|
73 | + echo "<tr><td align=\"right\">Client state</td><td>"; |
|
74 | + client_state_select(); |
|
75 | + echo "</td></tr>\n"; |
|
76 | + echo "<tr><td align=\"right\">Validate state</td><td>"; |
|
77 | + validate_state_select(); |
|
78 | + echo "</td></tr>\n"; |
|
79 | + echo "<tr><td align=\"right\">Sort by</td><td>"; |
|
80 | + result_sort_select(); |
|
81 | + sort_order_select(); |
|
82 | + echo "</td></tr>\n"; |
|
83 | + print_detail_field(); |
|
84 | + print_query_field(); |
|
85 | + break; |
|
86 | +case "team": |
|
87 | + print_query_field(); |
|
88 | + break; |
|
89 | +case "user": |
|
90 | + print_query_field(); |
|
91 | + break; |
|
92 | +default: |
|
93 | + echo "Unknown table name\n"; |
|
94 | + exit(); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | row2("Number of entries to show", "<input name=\"nresults\" value=\"20\">"); |
@@ -86,14 +86,14 @@ |
||
86 | 86 | function _mysql_field_attrs($r, $i) { |
87 | 87 | $x = mysqli_fetch_field_direct($r, $i); |
88 | 88 | switch ($x->type) { |
89 | - case 1: $x->type = 'tinyint'; break; |
|
90 | - case 2: $x->type = 'smallint'; break; |
|
91 | - case 3: $x->type = 'int'; break; |
|
92 | - case 5: $x->type = 'double'; break; |
|
93 | - case 7: $x->type = 'timestamp'; break; |
|
94 | - case 252: $x->type = 'blob'; break; |
|
95 | - case 253: $x->type = 'varchar'; break; |
|
96 | - case 254: $x->type = 'char'; break; |
|
89 | + case 1: $x->type = 'tinyint'; break; |
|
90 | + case 2: $x->type = 'smallint'; break; |
|
91 | + case 3: $x->type = 'int'; break; |
|
92 | + case 5: $x->type = 'double'; break; |
|
93 | + case 7: $x->type = 'timestamp'; break; |
|
94 | + case 252: $x->type = 'blob'; break; |
|
95 | + case 253: $x->type = 'varchar'; break; |
|
96 | + case 254: $x->type = 'char'; break; |
|
97 | 97 | } |
98 | 98 | return $x; |
99 | 99 | } |
@@ -51,21 +51,21 @@ discard block |
||
51 | 51 | ?> |
52 | 52 | <?php switch ($info_split['type']): ?> |
53 | 53 | <?php |
54 | - case 'Profile': |
|
55 | - case 'profile': |
|
56 | - case 'User': |
|
57 | - case 'user': |
|
58 | - $nid = $result['fields']['entity_id']; |
|
59 | - $node = node_load($nid); |
|
60 | - $account = user_load($node->uid); |
|
61 | - if (isset($account)) { |
|
62 | - $user_image = boincuser_get_user_profile_image($account->uid); |
|
63 | - $url = "{$base_path}account/{$account->uid}"; |
|
64 | - if (empty($title)) { |
|
65 | - $title = $account->boincuser_name; |
|
66 | - } |
|
54 | +case 'Profile': |
|
55 | +case 'profile': |
|
56 | +case 'User': |
|
57 | +case 'user': |
|
58 | + $nid = $result['fields']['entity_id']; |
|
59 | + $node = node_load($nid); |
|
60 | + $account = user_load($node->uid); |
|
61 | + if (isset($account)) { |
|
62 | + $user_image = boincuser_get_user_profile_image($account->uid); |
|
63 | + $url = "{$base_path}account/{$account->uid}"; |
|
64 | + if (empty($title)) { |
|
65 | + $title = $account->boincuser_name; |
|
67 | 66 | } |
68 | - ?> |
|
67 | + } |
|
68 | +?> |
|
69 | 69 | <div class="result user"> |
70 | 70 | <?php if ($user_image['image']['filepath']): ?> |
71 | 71 | <div class="picture"> |
@@ -89,15 +89,15 @@ discard block |
||
89 | 89 | <?php break; ?> |
90 | 90 | |
91 | 91 | <?php |
92 | - case 'Forum topic': |
|
93 | - $nid = $result['fields']['entity_id']; |
|
94 | - $node = node_load($nid); |
|
95 | - // Get the taxonomy for the node, creates a link to the parent forum |
|
96 | - $taxonomy = reset($node->taxonomy); |
|
97 | - if ($vocab = taxonomy_vocabulary_load($taxonomy->vid)) { |
|
98 | - $parent_forum = l($taxonomy->name, "community/forum/{$taxonomy->tid}"); |
|
99 | - } |
|
100 | - ?> |
|
92 | +case 'Forum topic': |
|
93 | + $nid = $result['fields']['entity_id']; |
|
94 | + $node = node_load($nid); |
|
95 | + // Get the taxonomy for the node, creates a link to the parent forum |
|
96 | + $taxonomy = reset($node->taxonomy); |
|
97 | + if ($vocab = taxonomy_vocabulary_load($taxonomy->vid)) { |
|
98 | + $parent_forum = l($taxonomy->name, "community/forum/{$taxonomy->tid}"); |
|
99 | + } |
|
100 | +?> |
|
101 | 101 | <div class="result forum"> |
102 | 102 | <dt class="title"> |
103 | 103 | <?php if ($parent_forum): ?> |
@@ -117,18 +117,18 @@ discard block |
||
117 | 117 | <?php break; ?> |
118 | 118 | |
119 | 119 | <?php |
120 | - case 'Comment': |
|
121 | - // Get the node if for this comment |
|
122 | - $nid = $result['fields']['tos_content_extra']; |
|
123 | - $node = node_load($nid); |
|
124 | - // Link to the parent forum topic |
|
125 | - $parent_topic = l($node->title, drupal_get_path_alias('node/' . $nid) ); |
|
126 | - // Get the taxonomy for the node, creates a link to the parent forum |
|
127 | - $taxonomy = reset($node->taxonomy); |
|
128 | - if ($vocab = taxonomy_vocabulary_load($taxonomy->vid)) { |
|
129 | - $parent_forum = l($taxonomy->name, "community/forum/{$taxonomy->tid}"); |
|
130 | - } |
|
131 | - ?> |
|
120 | +case 'Comment': |
|
121 | + // Get the node if for this comment |
|
122 | + $nid = $result['fields']['tos_content_extra']; |
|
123 | + $node = node_load($nid); |
|
124 | + // Link to the parent forum topic |
|
125 | + $parent_topic = l($node->title, drupal_get_path_alias('node/' . $nid) ); |
|
126 | + // Get the taxonomy for the node, creates a link to the parent forum |
|
127 | + $taxonomy = reset($node->taxonomy); |
|
128 | + if ($vocab = taxonomy_vocabulary_load($taxonomy->vid)) { |
|
129 | + $parent_forum = l($taxonomy->name, "community/forum/{$taxonomy->tid}"); |
|
130 | + } |
|
131 | +?> |
|
132 | 132 | <div class="result"> |
133 | 133 | <dt class="title"> |
134 | 134 | <?php if ($parent_forum): ?> |