Merge branch 'MDL-48688-28' of git://github.com/ankitagarwal/moodle into MOODLE_28_STABLE

This commit is contained in:
David Monllao
2015-01-07 08:48:05 +08:00
3 changed files with 8 additions and 9 deletions
@@ -411,7 +411,7 @@ class manager {
mtrace("-- Returning to the original user.");
cron_setup_user($originaluser);
return;
} catch (Exception $e) {
} catch (\Exception $e) {
// An unknown error occurred. The user is not informed, but the administrator is.
mtrace("-- Message processing failed. An unexpected exception was thrown. Details follow.");
mtrace($e->getMessage());
@@ -493,9 +493,8 @@ class manager {
/**
* Process a message again to add body and attachment data.
*
* @param Horde_Imap_Client_Data_Envelope $envelope The Envelope of the message
* @param Horde_Imap_Client_Data_Fetch $basemessagedata The structure and part of the message body
* @param string|Horde_Imap_Client_Ids $messageid The Hore message Uid
* @param \Horde_Imap_Client_Data_Fetch $basemessagedata The structure and part of the message body
* @param string|\Horde_Imap_Client_Ids $messageid The Hore message Uid
* @return \stdClass The current value of the messagedata
*/
private function process_message_data_body(
@@ -647,7 +646,7 @@ class manager {
// Perform a virus scan now.
try {
\repository::antivir_scan_file($filepath, $attachment->filename, true);
} catch (moodle_exception $e) {
} catch (\moodle_exception $e) {
mtrace("--> A virus was found in the attachment '{$attachment->filename}'.");
$this->inform_attachment_virus();
return;
@@ -795,7 +794,7 @@ class manager {
$error->message = $e->getMessage();
throw new \core\message\inbound\processing_failed_exception('messageprocessingfailed', 'tool_messageinbound', $error);
} catch (Exception $e) {
} catch (\Exception $e) {
mtrace("-> The Inbound Message handler threw an exception. Unable to process this message. User informed.");
mtrace("--> " . $e->getMessage());
// An unknown error occurred. Still inform the user but, this time do not include the specific
@@ -325,8 +325,8 @@ class address_manager {
if ($content['handlerid1'] > 0 || $content['userid1'] > 0 || $content['datavalue1'] > 0) {
// Any 64-bit integer which is greater than the 32-bit integer size will have a non-zero value in the first
// half of the integer.
throw new moodle_exception('Mixed environment.' +
' Key generated with a 64-bit machine but received into a 32-bit machine');
throw new \moodle_exception('Mixed environment.
Key generated with a 64-bit machine but received into a 32-bit machine.');
}
$content['handlerid'] = $content['handlerid2'];
$content['userid'] = $content['userid2'];
@@ -38,7 +38,7 @@ class processing_failed_exception extends \moodle_exception {
*
* @param string $identifier The string identifier to use when displaying this exception.
* @param string $component The string component
* @param stdClass $data The data to pass to get_string
* @param \stdClass $data The data to pass to get_string
*/
public function __construct($identifier, $component, \stdClass $data = null) {
return parent::__construct($identifier, $component, '', $data);