mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-70298 lib_horde: Upgrade Horde library to 5.2.23
This commit is contained in:
parent
ed2400457b
commit
49266827c4
@ -88,6 +88,9 @@ class Horde_Idna
|
||||
*/
|
||||
protected static function _checkForError($info)
|
||||
{
|
||||
if (!isset($info['errors'])) {
|
||||
return;
|
||||
}
|
||||
switch (true) {
|
||||
case $info['errors'] & IDNA_ERROR_EMPTY_LABEL:
|
||||
throw new Horde_Idna_Exception(Horde_Idna_Translation::t(
|
||||
|
@ -120,6 +120,53 @@ class Horde_Imap_Client_Data_Thread implements Countable, Serializable
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns array of all threads.
|
||||
*
|
||||
* @return array Keys of thread arrays are indices, values are objects with the following
|
||||
* properties:
|
||||
* - base: (integer) Base ID of the thread. If null, thread is a single
|
||||
* message.
|
||||
* - last: (boolean) If true, this is the last index in the sublevel.
|
||||
* - level: (integer) The sublevel of the index.
|
||||
*/
|
||||
public function getThreads()
|
||||
{
|
||||
$data = array();
|
||||
foreach ($this->_thread as $v) {
|
||||
reset($v);
|
||||
|
||||
$ob = new stdClass;
|
||||
$ob->base = (count($v) > 1) ? key($v) : null;
|
||||
$ob->last = false;
|
||||
|
||||
$levels = $out = array();
|
||||
$last = 0;
|
||||
|
||||
while (($v2 = current($v)) !== false) {
|
||||
$k2 = key($v);
|
||||
$ob2 = clone $ob;
|
||||
$ob2->level = $v2;
|
||||
$out[$k2] = $ob2;
|
||||
|
||||
if (($last < $v2) && isset($levels[$v2])) {
|
||||
$out[$levels[$v2]]->last = true;
|
||||
}
|
||||
$levels[$v2] = $k2;
|
||||
$last = $v2;
|
||||
next($v);
|
||||
}
|
||||
|
||||
foreach ($levels as $v) {
|
||||
$out[$v]->last = true;
|
||||
}
|
||||
|
||||
$data[] = $out;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/* Countable methods. */
|
||||
|
||||
/**
|
||||
|
@ -595,7 +595,7 @@ class Horde_Imap_Client_Search_Query implements Serializable
|
||||
* Search for text in either the entire message, or just the body.
|
||||
*
|
||||
* @param string $text The search text.
|
||||
* @param string $bodyonly If true, only search in the body of the
|
||||
* @param boolean $bodyonly If true, only search in the body of the
|
||||
* message. If false, also search in the headers.
|
||||
* @param boolean $not If true, do a 'NOT' search of $text.
|
||||
* @param array $opts Additional options:
|
||||
|
@ -1543,12 +1543,9 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
|
||||
|
||||
/* Add in STATUS return, if needed. */
|
||||
if (!empty($options['status']) && $this->_capability('LIST-STATUS')) {
|
||||
foreach ($pattern as $val) {
|
||||
$val_utf8 = Horde_Imap_Client_Utf7imap::Utf7ImapToUtf8($val);
|
||||
if (isset($lr[$val_utf8])) {
|
||||
$lr[$val_utf8]['status'] = $this->_prepareStatusResponse($status_opts, $val_utf8);
|
||||
}
|
||||
}
|
||||
foreach($lr as $val_utf8 => $tmp) {
|
||||
$lr[$val_utf8]['status'] = $this->_prepareStatusResponse($status_opts, $val_utf8);
|
||||
}
|
||||
}
|
||||
|
||||
return $lr;
|
||||
|
@ -110,7 +110,7 @@ class Horde_Imap_Client_Socket_ClientSort
|
||||
}
|
||||
|
||||
$mbox = $this->_socket->currentMailbox();
|
||||
$fetch_res = $this->_socket->fetch($mbox['mailbox'], $query, array(
|
||||
$fetch_res = $this->_socket->fetch(isset($mbox['mailbox']) ? $mbox['mailbox'] : null, $query, array(
|
||||
'ids' => $res
|
||||
));
|
||||
|
||||
|
@ -394,10 +394,10 @@ class Horde_Mime_Mail
|
||||
/**
|
||||
* Sends this message.
|
||||
*
|
||||
* @param Mail $mailer A Mail object.
|
||||
* @param boolean $resend If true, the message id and date are re-used;
|
||||
* If false, they will be updated.
|
||||
* @param boolean $flowed Send message in flowed text format.
|
||||
* @param Horde_Mail_Transport $mailer A Horde_Mail_Transport object.
|
||||
* @param boolean $resend If true, the message id and date are re-used;
|
||||
* If false, they will be updated.
|
||||
* @param boolean $flowed Send message in flowed text format.
|
||||
*
|
||||
* @throws Horde_Mime_Exception
|
||||
*/
|
||||
@ -488,7 +488,7 @@ class Horde_Mime_Mail
|
||||
* @param boolean $stream If true, return a stream resource, otherwise
|
||||
* a string is returned.
|
||||
*
|
||||
* @return stream|string The raw email data.
|
||||
* @return resource|string The raw email data.
|
||||
* @since 2.4.0
|
||||
*/
|
||||
public function getRaw($stream = true)
|
||||
|
@ -91,7 +91,7 @@ class Client
|
||||
$secure = false;
|
||||
}
|
||||
|
||||
$context = array_merge_recursive(
|
||||
$context = array_replace_recursive(
|
||||
array(
|
||||
'ssl' => array(
|
||||
'verify_peer' => false,
|
||||
|
@ -114,7 +114,7 @@ class Horde_Util
|
||||
public static function dispelMagicQuotes($var)
|
||||
{
|
||||
if (is_null(self::$_magicquotes)) {
|
||||
self::$_magicquotes = get_magic_quotes_gpc();
|
||||
self::$_magicquotes = function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc();
|
||||
}
|
||||
|
||||
if (self::$_magicquotes) {
|
||||
@ -304,7 +304,7 @@ class Horde_Util
|
||||
/* Get the first 8 characters of a random string to use as a temporary
|
||||
directory name. */
|
||||
do {
|
||||
$new_dir = $temp_dir . '/' . substr(base_convert(uniqid(mt_rand()), 10, 36), 0, 8);
|
||||
$new_dir = $temp_dir . '/' . substr(base_convert(uniqid(mt_rand()), 16, 36), 0, 8);
|
||||
} while (file_exists($new_dir));
|
||||
|
||||
$old_umask = umask(0000);
|
||||
|
@ -12,10 +12,6 @@ Description of import of Horde libraries
|
||||
# Copy the following script and store it on /tmp, change it's execute bit(chmod 777), and run it,
|
||||
passing in your path to Horde (the directory you've cloned the repository):
|
||||
/tmp/copyhorde.sh ~/git/base/directory/from/step/2
|
||||
# Verify that these patches have been applied in the imported version. Apply them locally if not:
|
||||
- https://github.com/horde/Mail/pull/1 (Mail component).
|
||||
- https://github.com/horde/Imap_Client/pull/6 (IMAP Client component).
|
||||
- https://github.com/horde/Crypt_Blowfish/pull/1 (PHP 7.4 compatibility, Crypt_Blowfish)
|
||||
|
||||
====
|
||||
#!/bin/sh
|
||||
|
@ -179,7 +179,7 @@
|
||||
<location>horde</location>
|
||||
<name>Horde</name>
|
||||
<license>LGPL/BSD</license>
|
||||
<version>5.2.22</version>
|
||||
<version>5.2.23</version>
|
||||
<licenseversion>2.1</licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
|
@ -2,6 +2,7 @@ This files describes API changes in core libraries and APIs,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
=== 3.11 ===
|
||||
* The horde library has been updated to version 5.2.23.
|
||||
* New optional parameter $extracontent for print_collapsible_region_start(). This allows developers to add interactive HTML elements
|
||||
(e.g. a help icon) after the collapsible region's toggle link.
|
||||
* Final deprecation i_dock_block() in behat_deprecated.php
|
||||
|
Loading…
x
Reference in New Issue
Block a user