| @@ 614-618 (lines=5) @@ | ||
| 611 | $event->object['type'] = 'discussion-add'; |
|
| 612 | ||
| 613 | if($object->title){ |
|
| 614 | if (strpos($object->title, '"en":') !== false) { |
|
| 615 | $event->object['name'] = gc_explode_translation($object->title, $lang); |
|
| 616 | } else { |
|
| 617 | $event->object['name'] = $object->title; |
|
| 618 | } |
|
| 619 | } else if($object->name){ |
|
| 620 | if (strpos($object->name, '"en":') !== false) { |
|
| 621 | $event->object['name'] = gc_explode_translation($object->name, $lang); |
|
| @@ 646-650 (lines=5) @@ | ||
| 643 | } |
|
| 644 | } else { |
|
| 645 | //@TODO handle any unknown events |
|
| 646 | if (strpos($object->title, '"en":') !== false) { |
|
| 647 | $event->object['name'] = gc_explode_translation($object->title, $lang); |
|
| 648 | } else { |
|
| 649 | $event->object['name'] = $object->title; |
|
| 650 | } |
|
| 651 | ||
| 652 | if (strpos($object->description, '"en":') !== false) { |
|
| 653 | $event->object['description'] = gc_explode_translation($object->description, $lang); |
|
| @@ 885-888 (lines=4) @@ | ||
| 882 | $event->object['description'] = gc_explode_translation($object->description, $lang); |
|
| 883 | ||
| 884 | $other = get_entity($object->container_guid); |
|
| 885 | if ($other instanceof ElggGroup) { |
|
| 886 | $event->object['group_title'] = gc_explode_translation($other->title, $lang); |
|
| 887 | $event->object['group_guid'] = $other->guid; |
|
| 888 | } |
|
| 889 | if ($event->action == "comment") { |
|
| 890 | $other_other = get_entity($other->container_guid); |
|
| 891 | if ($other_other instanceof ElggGroup) { |
|
| @@ 891-894 (lines=4) @@ | ||
| 888 | } |
|
| 889 | if ($event->action == "comment") { |
|
| 890 | $other_other = get_entity($other->container_guid); |
|
| 891 | if ($other_other instanceof ElggGroup) { |
|
| 892 | $event->object['group_title'] = gc_explode_translation($other_other->title, $lang); |
|
| 893 | $event->object['group_guid'] = $other_other->guid; |
|
| 894 | } |
|
| 895 | } |
|
| 896 | ||
| 897 | if (strpos($event->object['name'], '"en":') !== false) { |
|
| @@ 902-906 (lines=5) @@ | ||
| 899 | } |
|
| 900 | } else { |
|
| 901 | //@TODO handle any unknown events |
|
| 902 | if (strpos($object->title, '"en":') !== false) { |
|
| 903 | $event->object['name'] = gc_explode_translation($object->title, $lang); |
|
| 904 | } else { |
|
| 905 | $event->object['name'] = $object->title; |
|
| 906 | } |
|
| 907 | ||
| 908 | if (strpos($object->description, '"en":') !== false) { |
|
| 909 | $event->object['description'] = gc_explode_translation($object->description, $lang); |
|
| @@ 496-500 (lines=5) @@ | ||
| 493 | $event->object['type'] = 'discussion-add'; |
|
| 494 | ||
| 495 | if($object->title){ |
|
| 496 | if (strpos($object->title, '"en":') !== false) { |
|
| 497 | $event->object['name'] = gc_explode_translation($object->title, $lang); |
|
| 498 | } else { |
|
| 499 | $event->object['name'] = $object->title; |
|
| 500 | } |
|
| 501 | } else if($object->name){ |
|
| 502 | if (strpos($object->name, '"en":') !== false) { |
|
| 503 | $event->object['name'] = gc_explode_translation($object->name, $lang); |
|
| @@ 528-532 (lines=5) @@ | ||
| 525 | } |
|
| 526 | } else { |
|
| 527 | //@TODO handle any unknown events |
|
| 528 | if (strpos($object->title, '"en":') !== false) { |
|
| 529 | $event->object['name'] = gc_explode_translation($object->title, $lang); |
|
| 530 | } else { |
|
| 531 | $event->object['name'] = $object->title; |
|
| 532 | } |
|
| 533 | ||
| 534 | if (strpos($object->description, '"en":') !== false) { |
|
| 535 | $event->object['description'] = gc_explode_translation($object->description, $lang); |
|