comparison program/lib/Roundcube/rcube_message.php @ 24:e53add5ddac5

More cleaning up php8 Warnings/deprecations
author Charlie Root
date Fri, 17 Oct 2025 17:31:22 -0400
parents 303b85d5b561
children bea5a38be938
comparison
equal deleted inserted replaced
23:929c05ba3b2f 24:e53add5ddac5
91 91
92 $this->uid = $uid; 92 $this->uid = $uid;
93 $this->context = $context; 93 $this->context = $context;
94 $this->app = rcube::get_instance(); 94 $this->app = rcube::get_instance();
95 $this->storage = $this->app->get_storage(); 95 $this->storage = $this->app->get_storage();
96 $this->folder = strlen($folder) ? $folder : $this->storage->get_folder(); 96 $this->folder = (!empty($folder)) ? $folder : $this->storage->get_folder();
97 97
98 // Set current folder 98 // Set current folder
99 $this->storage->set_folder($this->folder); 99 $this->storage->set_folder($this->folder);
100 $this->storage->set_options(array('all_headers' => true)); 100 $this->storage->set_options(array('all_headers' => true));
101 101
588 $mimetype = $structure->mimetype; 588 $mimetype = $structure->mimetype;
589 } 589 }
590 590
591 // show message headers 591 // show message headers
592 if ($recursive && is_array($structure->headers) && 592 if ($recursive && is_array($structure->headers) &&
593 (isset($structure->headers['subject']) || $structure->headers['from'] || $structure->headers['to']) 593 (isset($structure->headers['subject']) || ($structure->headers['from']??false) || ($structure->headers['to']??false))
594 ) { 594 ) {
595 $c = new stdClass; 595 $c = new stdClass;
596 $c->type = 'headers'; 596 $c->type = 'headers';
597 $c->headers = $structure->headers; 597 $c->headers = $structure->headers;
598 $this->add_part($c); 598 $this->add_part($c);
843 if (preg_match('/^multipart\/(related|relative)/', $mimetype) 843 if (preg_match('/^multipart\/(related|relative)/', $mimetype)
844 && ($mail_part->headers['content-id'] || $mail_part->headers['content-location']) 844 && ($mail_part->headers['content-id'] || $mail_part->headers['content-location'])
845 ) { 845 ) {
846 if ($mail_part->headers['content-id']) 846 if ($mail_part->headers['content-id'])
847 $mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']); 847 $mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']);
848 if ($mail_part->headers['content-location']) 848 if (!isempty($mail_part->headers['content-location']))
849 $mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location']; 849 $mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location'];
850 850
851 $this->add_part($mail_part, 'inline'); 851 $this->add_part($mail_part, 'inline');
852 } 852 }
853 // regular attachment with valid content type 853 // regular attachment with valid content type