| @@ 482-486 (lines=5) @@ | ||
| 479 | $event->object['type'] = 'discussion-add'; |
|
| 480 | ||
| 481 | if($object->title){ |
|
| 482 | if (strpos($object->title, '"en":') !== false) { |
|
| 483 | $event->object['name'] = gc_explode_translation($object->title, $lang); |
|
| 484 | } else { |
|
| 485 | $event->object['name'] = $object->title; |
|
| 486 | } |
|
| 487 | } else if($object->name){ |
|
| 488 | if (strpos($object->name, '"en":') !== false) { |
|
| 489 | $event->object['name'] = gc_explode_translation($object->name, $lang); |
|
| @@ 514-518 (lines=5) @@ | ||
| 511 | } |
|
| 512 | } else { |
|
| 513 | //@TODO handle any unknown events |
|
| 514 | if (strpos($object->title, '"en":') !== false) { |
|
| 515 | $event->object['name'] = gc_explode_translation($object->title, $lang); |
|
| 516 | } else { |
|
| 517 | $event->object['name'] = $object->title; |
|
| 518 | } |
|
| 519 | ||
| 520 | if (strpos($object->description, '"en":') !== false) { |
|
| 521 | $event->object['description'] = gc_explode_translation($object->description, $lang); |
|
| @@ 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); |
|