diff --git a/models/helper.php b/models/helper.php index 015bc68..cf59873 100644 --- a/models/helper.php +++ b/models/helper.php @@ -74,7 +74,7 @@ static function get_month($month) $ausgabe = "April"; break; case 5: - $ausgabe = "Mail"; + $ausgabe = "Mai"; break; case 6: $ausgabe = "Juni"; diff --git a/models/mail.php b/models/mail.php index 30f348b..7af7f87 100644 --- a/models/mail.php +++ b/models/mail.php @@ -125,7 +125,7 @@ static function get_mails($user_id, $intervall, $inbox = true) $stmt = $db->prepare("SELECT $user_fields, $msg_fields, $msg_user_fields FROM message JOIN message_user ON message.message_id = message_user.message_id - JOIN auth_user_md5 ON message_user.user_id = auth_user_md5.user_id + LEFT JOIN auth_user_md5 ON message.autor_id = auth_user_md5.user_id ".$where." ORDER BY message.mkdate DESC LIMIT 0,30"); diff --git a/views/mails/_list_in.php b/views/mails/_list_in.php index 34c77f2..e2e9868 100644 --- a/views/mails/_list_in.php +++ b/views/mails/_list_in.php @@ -33,11 +33,11 @@ { $wochentag = \Studip\Mobile\Helper::get_weekday(date("N", $mail['mkdate'])); $monat = \Studip\Mobile\Helper::get_month(date("m", $mail['mkdate'])); - $day = $wochentag.date(", j. ",$mail['mkdate']).$monat.date(", Y",$mail['mkdate']); + $day = $wochentag.date(", j. ",$mail['mkdate']).$monat.date(", Y",$mail['mkdate']); $dayCount = date("j.m.Y",$mail['mkdate']); ?> - <li data-role="list-divider"><?= Studip\Mobile\Helper::out($day) ?></li> + <li data-role="list-divider"><?= $wochentag.date(", j. ",$mail['mkdate']).$monat.date(", Y",$mail['mkdate']); ?></li> <?php } @@ -56,10 +56,10 @@ \Studip\Mobile\Helper::getColorball("#000000",10,true); } ?> - <h3><?= Studip\Mobile\Helper::out($mail['author']) ?></h3> + <h3><?= $mail['author_id'] != '____%system%____' ? Studip\Mobile\Helper::out($mail['author']) : 'Stud.IP-System' ?></h3> <p><strong><?= Studip\Mobile\Helper::out($mail['title']) ?></strong></p> - <p><?= Studip\Mobile\Helper::fout($mail['message']) ?> + <p><?= Studip\Mobile\Helper::fout(mila($mail['message'])) ?> <p class="ui-li-aside"><strong><?= Studip\Mobile\Helper::out($time) ?></strong></p> </a></li> diff --git a/views/mails/show_msg.php b/views/mails/show_msg.php index 7446ff7..ac5cd1c 100644 --- a/views/mails/show_msg.php +++ b/views/mails/show_msg.php @@ -32,7 +32,7 @@ <li data-role="fieldcontain"> <p style="padding-top:12px;"> <strong>An:</strong> <?= Studip\Mobile\Helper::out($mail[0]['receiver']) ?><br> - <strong>Von:</strong> <?= ($mail[0]['author'] != ' ') ? Studip\Mobile\Helper::out($mail[0]['author']) : ' Stud.IP System' ?> + <strong>Von:</strong> <?= $mail[0]['author_id'] != '____%system%____' ? Studip\Mobile\Helper::out($mail[0]['author']) : 'Stud.IP-System' ?> </p> <span class="ui-li-count"> <?=$time ?> Uhr</span> </li> @@ -57,7 +57,7 @@ <div data-role="navbar" data-iconspos="top"> <ul class="ui-grid-a"> <li class="ui-block-a"><a id="marikieren" href="<?= $controller->url_for("mails/show_msg",$mail[0]['id'], true) ?>" data-theme="c" data-icon="star" data-transition="flip">Markieren</a></li> - <? if (empty($mail[0]['author_id'])) : ?> + <? if ($mail[0]['author_id'] == '____%system%____') : ?> <li class="ui-block-b"><a id="antworten" data-theme="c" data-icon="check" data-transition="slideup" class='ui-disabled'>Antworten</a></li> <? else: ?> <li class="ui-block-b"><a id="antworten" href="<?= $controller->url_for("mails/write",$mail[0]['author_id']) ?>" data-theme="c" data-icon="check" data-transition="slideup">Antworten</a></li>