Merge branch 'MDL-79539-master' of https://github.com/meirzamoodle/moodle

This commit is contained in:
Huong Nguyen
2023-10-04 10:53:57 +07:00
4 changed files with 26 additions and 4 deletions
@@ -829,7 +829,7 @@ class manager {
// An auto-reply may itself include the Bulk Precedence.
$precedence = $messagedata->getHeaderText(0, \Horde_Imap_Client_Data_Fetch::HEADER_PARSE)->getValue('Precedence');
$isbulk = $isbulk || strtolower($precedence) == 'bulk';
$isbulk = $isbulk || strtolower($precedence ?? '') == 'bulk';
// If the X-Autoreply header is set, and not 'no', then this is an automatic reply.
$autoreply = $messagedata->getHeaderText(0, \Horde_Imap_Client_Data_Fetch::HEADER_PARSE)->getValue('X-Autoreply');
@@ -456,12 +456,27 @@ class address_manager {
* @return string The encoded binary data
*/
protected function pack_int($int) {
// If PHP environment is running on a 64-bit.
if (PHP_INT_SIZE === 8) {
$l = intdiv($int, pow(2, 32)); // 32-bit integer quotient.
$r = $int % pow(2, 32); // 32-bit integer remaining.
// Will be used to ensures that the result remains as a 32-bit unsigned integer and
// doesn't extend beyond 32 bits.
$notation = 0xffffffff;
if ($int < 0) {
// If the given integer is negative, set it to -1.
$l = -1;
} else {
// Otherwise, calculate the upper 32 bits of the 64-bit integer.
$l = ($int >> 32) & $notation;
}
// Calculate the lower 32 bits of the 64-bit integer.
$r = $int & $notation;
// Pack the values of $l (upper 32 bits) and $r (lower 32 bits) into a binary string format.
return pack('NN', $l, $r);
} else {
// Pack the values into a binary string format.
return pack('NN', 0, $int);
}
}
+7
View File
@@ -3601,5 +3601,12 @@ privatefiles,moodle|/user/files.php';
upgrade_main_savepoint(true, 2023091300.03);
}
if ($oldversion < 2023100400.01) {
// Delete datakey with datavalue -1.
$DB->delete_records('messageinbound_datakeys', ['datavalue' => '-1']);
// Main savepoint reached.
upgrade_main_savepoint(true, 2023100400.01);
}
return true;
}
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2023100400.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2023100400.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.3rc1 (Build: 20231004)'; // Human-friendly version name