Mercurial > hg > rc1
changeset 49:91f005a4f7e9
Slowly cleaning up more php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Mon, 06 Oct 2025 12:19:59 -0400 |
| parents | 839c4d0fcb9f |
| children | e09cef17c56c |
| files | etc/config.inc.php index.php plugins/advanced_search/advanced_search.php plugins/calendar/calendar.php plugins/libcalendaring/libvcalendar.php plugins/thunderbird_labels/thunderbird_labels.php |
| diffstat | 6 files changed, 16 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/config.inc.php Mon Oct 06 12:17:00 2025 -0400 +++ b/etc/config.inc.php Mon Oct 06 12:19:59 2025 -0400 @@ -109,7 +109,7 @@ 'managesieve', 'thunderbird_labels', 'contextmenu', - 'libcalendaring', + //'libcalendaring', 'calendar', 'password', 'advanced_search',
--- a/index.php Mon Oct 06 12:17:00 2025 -0400 +++ b/index.php Mon Oct 06 12:19:59 2025 -0400 @@ -100,6 +100,7 @@ $RCMAIL->set_task($startup['task']); $RCMAIL->action = $startup['action']; +$session_error = false; // try to log in if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { $request_valid = $_SESSION['temp'] && $RCMAIL->check_request();
--- a/plugins/advanced_search/advanced_search.php Mon Oct 06 12:17:00 2025 -0400 +++ b/plugins/advanced_search/advanced_search.php Mon Oct 06 12:19:59 2025 -0400 @@ -43,7 +43,7 @@ * @access private */ private $i18n_strings = array(); - + private $skin; /** * Initialisation of the plugin * @@ -1026,7 +1026,7 @@ } $uid_mboxes = $this->rcmail_js_message_list($messages, false, null, $showAvmbox, $avbox, $showMboxColumn); - return $uid_mboxes; + return ($uid_mboxes) ?? array(); } public function save_search() @@ -1083,6 +1083,6 @@ $names[] = $name; } - return $names; + return $names ?? array(); } }
--- a/plugins/calendar/calendar.php Mon Oct 06 12:17:00 2025 -0400 +++ b/plugins/calendar/calendar.php Mon Oct 06 12:19:59 2025 -0400 @@ -44,6 +44,9 @@ public $gmt_offset; public $ui; + private $dst_active; + private $driver; // available via __get + public $defaults = array( 'calendar_default_view' => "agendaWeek", 'calendar_timeslots' => 2,
--- a/plugins/libcalendaring/libvcalendar.php Mon Oct 06 12:17:00 2025 -0400 +++ b/plugins/libcalendaring/libvcalendar.php Mon Oct 06 12:19:59 2025 -0400 @@ -73,7 +73,7 @@ function __construct($tz = null) { $this->timezone = $tz; - $this->prodid = '-//Roundcube libcalendaring ' . RCUBE_VERSION . '//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN'; + $this->prodid = '-//Roundcube libcalendaring ' . RCUBE_VERSION . '//Sabre//Sabre VObject ' . '3.0.0' . '//EN'; /* VObject\Version::VERSION */ } /** @@ -1414,26 +1414,3 @@ } - -/** - * Override Sabre\VObject\Property\Text that quotes commas in the location property - * because Apple clients treat that property as list. - */ -class vobject_location_property extends VObject\Property\Text -{ - /** - * List of properties that are considered 'structured'. - * - * @var array - */ - protected $structuredValues = array( - // vCard - 'N', - 'ADR', - 'ORG', - 'GENDER', - 'LOCATION', - // iCalendar - 'REQUEST-STATUS', - ); -}
--- a/plugins/thunderbird_labels/thunderbird_labels.php Mon Oct 06 12:17:00 2025 -0400 +++ b/plugins/thunderbird_labels/thunderbird_labels.php Mon Oct 06 12:19:59 2025 -0400 @@ -13,7 +13,9 @@ public $task = 'mail|settings'; private $rc; private $map; - + private $name; + private $add_tb_flags; + private $message_tb_labels; function init() { $this->rc = rcmail::get_instance(); @@ -482,9 +484,9 @@ // set flags in IMAP server function set_flags() { - #rcube::write_log($this->name, "set: ".print_r($_GET, true)); + #rcube::write_log($this->name, "set: ".print_r($_GET, true)." rc: ".print_r($this->rc,true)); - $imap = $this->rc->imap; + $imap = $this->rc->storage; $cbox = rcube_utils::get_input_value('_cur', rcube_utils::INPUT_GET); $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GET); $toggle_label = rcube_utils::get_input_value('_toggle_label', rcube_utils::INPUT_GET); @@ -493,7 +495,8 @@ $unflag_uids = rcube_utils::get_input_value('_unflag_uids', rcube_utils::INPUT_GET); $unflag_uids = explode(',', $unflag_uids); - $imap->conn->flags = array_merge($imap->conn->flags, $this->add_tb_flags); + $imap->conn->flags = array_merge($imap->conn->flags ?? array(), + $this->add_tb_flags); #rcube::write_log($this->name, print_r($flag_uids, true)); #rcube::write_log($this->name, print_r($unflag_uids, true));
