File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -97,19 +97,16 @@ protected function isShared() {
9797 * @param Component\VCalendar $vObject
9898 * @return void
9999 */
100- private function createConfidentialObject (Component \VCalendar $ vObject ) {
100+ private function createConfidentialObject (Component \VCalendar $ vObject ): void {
101101 /** @var Component $vElement */
102- $ vElement = null ;
103- if (isset ($ vObject ->VEVENT )) {
104- $ vElement = $ vObject ->VEVENT ;
105- }
106- if (isset ($ vObject ->VJOURNAL )) {
107- $ vElement = $ vObject ->VJOURNAL ;
108- }
109- if (isset ($ vObject ->VTODO )) {
110- $ vElement = $ vObject ->VTODO ;
111- }
112- if (!is_null ($ vElement )) {
102+ $ vElements = array_filter ($ vObject ->getComponents (), static function ($ vElement ) {
103+ return $ vElement instanceof Component \VEvent || $ vElement instanceof Component \VJournal || $ vElement instanceof Component \VTodo;
104+ });
105+
106+ foreach ($ vElements as $ vElement ) {
107+ if (empty ($ vElement ->select ('SUMMARY ' ))) {
108+ $ vElement ->add ('SUMMARY ' , $ this ->l10n ->t ('Busy ' )); // This is needed to mask "Untitled Event" events
109+ }
113110 foreach ($ vElement ->children () as &$ property ) {
114111 /** @var Property $property */
115112 switch ($ property ->name ) {
You can’t perform that action at this time.
0 commit comments