Skip to content
Merged
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
7 changes: 7 additions & 0 deletions public_html/lists/admin/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@
}
}

## ironically, this doesn't work with Xdebug enabled.
## avoid the screen being blank, due to the FOUC system
ini_set("error_append_string",'<script>document.body.classList.remove("invisible");</script>'); ## remove the FOUC
ini_set("error_prepend_string",'<div style="{font-size: 24px;color:red;}">Sorry a software error occurred:</div><br/>
Please <a href="http://mantis.phplist.org">report a bug</a> when reporting the bug, please include URL and the entire content of this page.<br/>');


if (function_exists('mb_internal_encoding')) {
mb_internal_encoding('UTF-8');
}
Expand Down
5 changes: 3 additions & 2 deletions public_html/lists/admin/languages.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,10 @@ public function databaseTranslation($text)
$tr = Sql_Fetch_Row_Query(sprintf('select translation from '.$GLOBALS['tables']['i18n'].' where original = "%s" and lan = "%s"',
sql_escape(str_replace('"', '\"', $text)), $this->language), 1);
}
$this->setCachedTranslation($text, stripslashes($tr[0]));
$translated = !empty($tr[0]) ? stripslashes($tr[0]) : '';
$this->setCachedTranslation($text, $translated);

return stripslashes($tr[0]);
return $translated;
}

public function pageTitle($page)
Expand Down
20 changes: 12 additions & 8 deletions public_html/lists/admin/processbounces.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ function processBounceData($bounceid, $msgid, $userid, $bounceDate = null)
{
global $tables;
$useremailQ = Sql_fetch_row_query(sprintf('select email from %s where id = %d', $tables['user'], $userid));
$useremail = $useremailQ[0];
if (empty($useremailQ)) {
$useremail = "";
} else {
$useremail = $useremailQ[0];
}

if ($bounceDate === null) {
$bounceDate = date('Y-m-d H:i', time());
Expand Down Expand Up @@ -361,11 +365,7 @@ function processPop($server, $user, $password)
}
set_time_limit(6000);

if (!TEST) {
$link = imap_open('{'.$server.':'.$port.'}INBOX', $user, $password, CL_EXPUNGE);
} else {
$link = imap_open('{'.$server.':'.$port.'}INBOX', $user, $password);
}
$link = imap_open('{'.$server.':'.$port.'}INBOX', $user, $password);

if (!$link) {
outputProcessBounce($GLOBALS['I18N']->get('Cannot create POP3 connection to')." $server: ".imap_last_error());
Expand Down Expand Up @@ -415,7 +415,7 @@ function processMessages($link, $max = 3000)
if (TEST) {
echo s('Running in test mode, not deleting messages from mailbox').'<br/>';
} else {
echo s('Processed messages will be deleted from mailbox').'<br/>';
echo s('Processed messages will be deleted from the mailbox').'<br/>';
}
$nberror = 0;
// for ($x=1;$x<150;$x++) {
Expand Down Expand Up @@ -453,7 +453,11 @@ function processMessages($link, $max = 3000)
flush();
outputProcessBounce(s('Closing mailbox, and purging messages'));
set_time_limit(60 * $num);
imap_close($link);
if (!TEST) {
imap_close($link, CL_EXPUNGE);
} else {
imap_close($link);
}

return $report;
}
Expand Down