diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4427f7ef2c4..406bd791804 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -250,11 +250,6 @@ parameters: count: 1 path: plugins/subscriptions_option/subscriptions_option.php - - - message: "#^Method rcube_storage\\:\\:index\\(\\) invoked with 4 parameters, 0\\-3 required\\.$#" - count: 1 - path: plugins/zipdownload/zipdownload.php - - message: "#^Call to an undefined method object\\:\\:get_group\\(\\)\\.$#" count: 1 @@ -690,11 +685,6 @@ parameters: count: 1 path: program/lib/Roundcube/rcube_imap_generic.php - - - message: "#^Static method rcube_utils\\:\\:proxy_protocol_header\\(\\) invoked with 2 parameters, 0\\-1 required\\.$#" - count: 1 - path: program/lib/Roundcube/rcube_imap_generic.php - - message: "#^Undefined variable\\: \\$otoken$#" count: 2 @@ -735,16 +725,6 @@ parameters: count: 1 path: program/lib/Roundcube/rcube_ldap.php - - - message: "#^Method rcube\\:\\:url\\(\\) invoked with 4 parameters, 1 required\\.$#" - count: 1 - path: program/lib/Roundcube/rcube_message.php - - - - message: "#^Method rcube_storage\\:\\:get_message_part\\(\\) invoked with 8 parameters, 1\\-6 required\\.$#" - count: 3 - path: program/lib/Roundcube/rcube_message.php - - message: "#^Static method rcube_utils\\:\\:explode\\(\\) invoked with 3 parameters, 2 required\\.$#" count: 1 diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php index 1a0e41eb17a..0e6c76b35ae 100644 --- a/program/lib/Roundcube/rcube.php +++ b/program/lib/Roundcube/rcube.php @@ -1065,13 +1065,17 @@ public function check_request($mode = rcube_utils::INPUT_POST) } /** - * Build a valid URL to this instance of Roundcube + * Build a valid URL to this instance of Roundcube. * - * @param mixed $p Either a string with the action or url parameters as key-value pairs + * @param mixed $p Either a string with the action or + * url parameters as key-value pairs + * @param bool $absolute Build a URL absolute to document root + * @param bool $full Create fully qualified URL including http(s):// and hostname + * @param bool $secure Return absolute URL in secure location * * @return string Valid application URL */ - public function url($p) + public function url($p, $absolute = false, $full = false, $secure = false) { // STUB: should be overloaded by the application return ''; diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index ec94c2c861a..bef8792db8f 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -1049,7 +1049,7 @@ protected function _connect($host) // insert proxy protocol header, if enabled if (!empty($this->prefs['socket_options'])) { - $proxy_protocol_header = rcube_utils::proxy_protocol_header($this->prefs['socket_options'], $this->fp); + $proxy_protocol_header = rcube_utils::proxy_protocol_header($this->prefs['socket_options']); if (strlen($proxy_protocol_header) > 0) { fwrite($this->fp, $proxy_protocol_header); } diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index e18277f9eb4..5e623ae4724 100644 --- a/program/lib/Roundcube/rcube_storage.php +++ b/program/lib/Roundcube/rcube_storage.php @@ -394,10 +394,12 @@ abstract public function list_messages($folder = null, $page = null, $sort_field * @param string $folder Folder to get index from * @param string $sort_field Sort column * @param string $sort_order Sort order [ASC, DESC] + * @param bool $no_threads Get not threaded index + * @param bool $no_search Get index not limited to search result (optionally) * * @return rcube_result_index|rcube_result_thread List of messages (UIDs) */ - abstract public function index($folder = null, $sort_field = null, $sort_order = null); + abstract public function index($folder = null, $sort_field = null, $sort_order = null, $no_threads = false, $no_search = false); /** * Invoke search request to the server. @@ -455,7 +457,7 @@ abstract public function get_message($uid, $folder = null); abstract public function get_message_headers($uid, $folder = null, $force = false); /** - * Fetch message body of a specific message from the server + * Fetch message body of a specific message from the server. * * @param int $uid Message UID * @param string $part Part number @@ -463,10 +465,13 @@ abstract public function get_message_headers($uid, $folder = null, $force = fals * @param mixed $print True to print part, resource to write part contents in * @param resource $fp File pointer to save the message part * @param bool $skip_charset_conv Disables charset conversion + * @param int $max_bytes Only read this number of bytes + * @param bool $formatted Enables formatting of text/* parts bodies * * @return string|true|null Message/part body if not printed */ - abstract public function get_message_part($uid, $part = 1, $o_part = null, $print = null, $fp = null, $skip_charset_conv = false); + abstract public function get_message_part($uid, $part = 1, $o_part = null, $print = null, $fp = null, + $skip_charset_conv = false, $max_bytes = 0, $formatted = true); /** * Fetch message body of a specific message from the server