Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions install/OpensisSchemaMysqlInc.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,7 @@ ALTER TABLE `mail_groupmembers` ADD INDEX `mail_groupmembers_ind` (`school_id`)

CREATE TABLE IF NOT EXISTS `msg_inbox` (
`mail_id` int(11) NOT NULL AUTO_INCREMENT,
`mail_uuid` varchar(50) NOT NULL,
`to_user` varchar(211) NOT NULL,
`from_user` varchar(211) NOT NULL,
`mail_Subject` varchar(211) NULL,
Expand Down
7 changes: 7 additions & 0 deletions install/OpensisTriggerMysqlInc.sql
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ CREATE TRIGGER `ti_user_file_upload`
BEFORE INSERT ON user_file_upload
FOR EACH ROW
SET NEW.download_id = UUID();

DROP TRIGGER IF EXISTS `ti_msg_inbox`;
CREATE TRIGGER `ti_mail_uuid`
BEFORE INSERT ON msg_inbox
FOR EACH ROW
SET NEW.mail_uuid = UUID();

DROP TRIGGER IF EXISTS `tu_login_authentication`;
DELIMITER $$
CREATE TRIGGER `tu_login_authentication`
Expand Down
6 changes: 3 additions & 3 deletions modules/messaging/Inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
echo '<div class="panel panel-default">';
echo '<div class="panel-body">';
$mail_id = $_REQUEST['mail_id'];
$mail_body = "select mail_body,mail_attachment,mail_Subject,from_user,mail_datetime,to_cc_multiple,to_multiple_users,to_bcc_multiple,mail_read_unread from msg_inbox where mail_id='$mail_id'";
$mail_body = "select mail_body,mail_attachment,mail_Subject,from_user,mail_datetime,to_cc_multiple,to_multiple_users,to_bcc_multiple,mail_read_unread from msg_inbox where mail_uuid='$mail_id'";

$mail_body_info = DBGet(DBQuery($mail_body));
$sub = $mail_body_info[1]['MAIL_SUBJECT'];
Expand Down Expand Up @@ -521,7 +521,7 @@
// }
// for($i=0;$i<(count($attach));$i++)
// {
echo "<a href='DownloadWindow.php?down_id=" . $img['ID'] . "'>" . $img['NAME'] . "</a>";
echo "<a href='DownloadWindow.php?down_id=" . $img['DOWNLOAD_ID'] . "'>" . $img['NAME'] . "</a>";

echo '<br>&nbsp;&nbsp;&nbsp;<br>';
}
Expand Down Expand Up @@ -637,7 +637,7 @@
$columns = $LO_columns;
}
$link['MAIL_SUBJECT']['link'] = "Modules.php?modname=messaging/Inbox.php&modfunc=body";
$link['MAIL_SUBJECT']['variables'] = array('mail_id' => 'MAIL_ID');
$link['MAIL_SUBJECT']['variables'] = array('mail_id' => 'MAIL_UUID');
$link['remove']['link'] = "Modules.php?modname=$_REQUEST[modname]&modfunc=trash";
$options['search'] = 'asdad';

Expand Down
4 changes: 2 additions & 2 deletions modules/messaging/Trash.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
if (isset($_REQUEST['modfunc']) && $_REQUEST['modfunc'] == 'body') {
PopTable('header', _messageDetails);
$mail_id = $_REQUEST['mail_id'];
$mail_body = "select mail_body,to_user,from_user,mail_datetime,mail_attachment from msg_inbox where mail_id='$mail_id'";
$mail_body = "select mail_body,to_user,from_user,mail_datetime,mail_attachment from msg_inbox where mail_uuid='$mail_id'";
$mail_body_info = DBGet(DBQuery($mail_body));
foreach ($mail_body_info as $k => $v) {
echo "<table width='100%' style='width:650px'>
Expand Down Expand Up @@ -271,7 +271,7 @@
$columns = $LO_columns;
}
$link['MAIL_SUBJECT']['link'] = "Modules.php?modname=messaging/Trash.php&modfunc=body";
$link['MAIL_SUBJECT']['variables'] = array('mail_id' => 'MAIL_ID');
$link['MAIL_SUBJECT']['variables'] = array('mail_id' => 'MAIL_UUID');
$link['remove']['link'] = "Modules.php?modname=messaging/Trash.php&modfunc=delete";

foreach ($trash_info as $id => $value) {
Expand Down