Date: Sat, 24 Nov 2018 10:12:21 +0000 (UTC) From: Jochen Neumeister <joneum@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r485752 - in head/security/mailzu: . files Message-ID: <201811241012.wAOACLRr077180@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: joneum Date: Sat Nov 24 10:12:21 2018 New Revision: 485752 URL: https://svnweb.freebsd.org/changeset/ports/485752 Log: security/mailzu: Fix support for php 7.x - Pass Maintainership to Submitter PR: 230712 Submitted by: Krzysztof <ports@bsdserwis.com> Sponsored by: Netzkommune GmbH Differential Revision: https://reviews.freebsd.org/D17946 Added: head/security/mailzu/files/patch-config_init.php (contents, props changed) head/security/mailzu/files/patch-config_langs.php (contents, props changed) head/security/mailzu/files/patch-lib_Auth.class.php (contents, props changed) head/security/mailzu/files/patch-lib_CmnFns.class.php (contents, props changed) head/security/mailzu/files/patch-lib_Quarantine.lib.php (contents, props changed) head/security/mailzu/files/patch-lib_Template.class.php (contents, props changed) head/security/mailzu/files/patch-messagesAdmin.php (contents, props changed) head/security/mailzu/files/patch-read__mail.php (contents, props changed) head/security/mailzu/files/patch-templates_quarantine.template.php (contents, props changed) head/security/mailzu/files/pl.help.php (contents, props changed) head/security/mailzu/files/pl.lang.php (contents, props changed) Modified: head/security/mailzu/Makefile head/security/mailzu/files/patch-lib-DBEngine.class.php head/security/mailzu/pkg-plist Modified: head/security/mailzu/Makefile ============================================================================== --- head/security/mailzu/Makefile Sat Nov 24 10:06:17 2018 (r485751) +++ head/security/mailzu/Makefile Sat Nov 24 10:12:21 2018 (r485752) @@ -3,19 +3,17 @@ PORTNAME= mailzu DISTVERSION= 0.8rc3 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/MailZu%200.8RC3 DISTNAME= MailZu_${DISTVERSION:S/rc/RC/} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= ports@bsdserwis.com COMMENT= Simple and intuitive web interface to manage amavisd-new quarantine LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -IGNORE_WITH_PHP= 70 71 72 73 - RUN_DEPENDS= ${LOCALBASE}/sbin/amavisd:security/amavisd-new \ ${PEARDIR}/DB.php:databases/pear-DB@${PHP_FLAVOR} \ ${PEARDIR}/Mail/mime.php:mail/pear-Mail_Mime@${PHP_FLAVOR} \ @@ -40,18 +38,21 @@ PGSQL_DESC= Use PostgreSQL database/auth storage backe IMAP_DESC= Use IMAP auth backend LDAP_DESC= Use LDAP auth backend -MYSQL_USE= PHP=mysql +MYSQL_USE= PHP=mysqli PGSQL_USE= PHP=pgsql IMAP_USE= PHP=imap LDAP_USE= PHP=ldap PORTDOCS= * +post-patch: + ${INSTALL_DATA} ${FILESDIR}/pl.*.php ${WRKSRC}/lang/ + do-install: @${MKDIR} ${STAGEDIR}${WWWDIR} - ${INSTALL_DATA} ${WRKSRC}/*.php* ${WRKSRC}/*.js* ${WRKSRC}/*.css* ${STAGEDIR}${WWWDIR} + ${INSTALL_DATA} ${WRKSRC}/*.php ${WRKSRC}/*.js ${WRKSRC}/*.css ${STAGEDIR}${WWWDIR} (cd ${WRKSRC} && ${COPYTREE_SHARE} "config contrib img lang lib templates" \ - ${STAGEDIR}${WWWDIR} "! -name *.orig") + ${STAGEDIR}${WWWDIR} "! -name '*.orig'") (cd ${WRKSRC} && ${COPYTREE_BIN} scripts ${STAGEDIR}${WWWDIR}) ${CHMOD} 644 ${STAGEDIR}${WWWDIR}/config/config.php.sample Added: head/security/mailzu/files/patch-config_init.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-config_init.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,11 @@ +--- config/init.php.orig 2007-06-14 19:00:15 UTC ++++ config/init.php +@@ -35,7 +35,7 @@ + session_start(); + + // Turn off magic quotes (do not edit!) +-set_magic_quotes_runtime(0); ++// set_magic_quotes_runtime(0); + + $conf['app']['version'] = '0.8RC3'; + Added: head/security/mailzu/files/patch-config_langs.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-config_langs.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,21 @@ +--- config/langs.php.orig 2007-06-14 19:00:15 UTC ++++ config/langs.php +@@ -47,7 +47,8 @@ $languages = array ( + 'cs' => array('cs([-_][[:alpha:]]{2})?|czech', 'cs.lang.php', 'cs', 'Česky'), + 'fr' => array('fr([-_][[:alpha:]]{2})?|french', 'fr.lang.php', 'fr', 'Français'), + 'it' => array('it([-_][[:alpha:]]{2})?|italian', 'it.lang.php', 'it', 'Italiano'), +- 'pt_BR' => array('pt([-_]br)?|portuguese', 'pt_BR.lang.php', 'pt', 'Portuguese Brazilian') ++ 'pt_BR' => array('pt([-_]br)?|portuguese', 'pt_BR.lang.php', 'pt', 'Portuguese Brazilian'), ++ 'pl' => array('cs([-_][[:alpha:]]{2})?|polish', 'pl.lang.php', 'pl', 'Polski') + ); + + // Language files directory +@@ -113,7 +114,7 @@ function get_browser_lang() { + global $languages; + + if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { +- $http_accepted = split(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); ++ $http_accepted = str_split(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); + for ($i = 0; $i < count($http_accepted); $i++) { + foreach ($languages as $lang => $vals) { + if (eregi($vals[0], $http_accepted[$i])) Modified: head/security/mailzu/files/patch-lib-DBEngine.class.php ============================================================================== --- head/security/mailzu/files/patch-lib-DBEngine.class.php Sat Nov 24 10:06:17 2018 (r485751) +++ head/security/mailzu/files/patch-lib-DBEngine.class.php Sat Nov 24 10:12:21 2018 (r485752) @@ -1,134 +1,143 @@ ---- lib/DBEngine.class.php.orig 2010-11-24 11:32:33.000000000 +0100 -+++ lib/DBEngine.class.php 2010-11-24 11:32:41.000000000 +0100 -@@ -132,7 +132,7 @@ - MAX(stattable.badheaders) AS badheaders, +--- lib/DBEngine.class.php.orig 2007-06-14 19:00:15 UTC ++++ lib/DBEngine.class.php +@@ -133,35 +133,35 @@ class DBEngine { MAX(stattable.pending) AS pending FROM ( -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, - COUNT(content) AS spam, + SELECT CAST(time_iso AS DATE) AS date, +- COUNT(content) AS spam, ++ COUNT(msgs.content) AS spam, 0 AS banned, 0 AS viruses, -@@ -141,9 +141,9 @@ + 0 AS badheaders, + 0 AS pending FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id - WHERE content='S' AND NOT (msgs.quar_type = '') +- WHERE content='S' AND NOT (msgs.quar_type = '') ++ WHERE msgs.content='S' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) + GROUP BY CAST(time_iso AS DATE) UNION -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, + SELECT CAST(time_iso AS DATE) AS date, 0 AS spam, - COUNT(content) AS banned, +- COUNT(content) AS banned, ++ COUNT(msgs.content) AS banned, 0 AS viruses, -@@ -152,9 +152,9 @@ + 0 AS badheaders, + 0 AS pending FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id - WHERE content='B' AND NOT (msgs.quar_type = '') +- WHERE content='B' AND NOT (msgs.quar_type = '') ++ WHERE msgs.content='B' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) + GROUP BY CAST(time_iso AS DATE) UNION -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, + SELECT CAST(time_iso AS DATE) AS date, 0 AS spam, 0 AS banned, - COUNT(content) AS viruses, -@@ -163,9 +163,9 @@ +- COUNT(content) AS viruses, ++ COUNT(msgs.content) AS viruses, + 0 AS badheaders, + 0 AS pending FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id - WHERE content='V' AND NOT (msgs.quar_type = '') +- WHERE content='V' AND NOT (msgs.quar_type = '') ++ WHERE msgs.content='V' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) + GROUP BY CAST(time_iso AS DATE) UNION -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, +@@ -169,10 +169,10 @@ class DBEngine { 0 AS spam, 0 AS banned, 0 AS viruses, -@@ -174,9 +174,9 @@ +- COUNT(content) AS badheaders, ++ COUNT(msgs.content) AS badheaders, + 0 AS pending FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id - WHERE content='H' AND NOT (msgs.quar_type = '') +- WHERE content='H' AND NOT (msgs.quar_type = '') ++ WHERE msgs.content='H' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) + GROUP BY CAST(time_iso AS DATE) UNION -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, - 0 AS spam, +@@ -181,7 +181,7 @@ class DBEngine { 0 AS banned, 0 AS viruses, -@@ -184,7 +184,7 @@ - COUNT(content) AS pending + 0 AS badheaders, +- COUNT(content) AS pending ++ COUNT(msgs.content) AS pending FROM msgs JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id WHERE msgrcpt.rs='p' AND NOT (msgs.quar_type = '') -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) - ) AS stattable - GROUP BY date - ORDER BY date"; -@@ -253,7 +253,7 @@ - MAX(stattable.badheaders) AS badheaders, + GROUP BY CAST(time_iso AS DATE) +@@ -240,7 +240,7 @@ class DBEngine { + $recipEmailClause = $this->convertEmailaddresses2SQL($emailaddresses); + + # mysql seems to run faster with a left join +- if ($conf['db']['dbtype'] == 'mysql') { ++ if ($conf['db']['dbType'] == 'mysql') { + $join_type = ' LEFT JOIN'; + } else { + $join_type = ' INNER JOIN'; +@@ -254,38 +254,38 @@ class DBEngine { MAX(stattable.pending) AS pending FROM ( -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, - COUNT(content) AS spam, + SELECT CAST(time_iso AS DATE) AS date, +- COUNT(content) AS spam, ++ COUNT(msgs.content) AS spam, 0 AS banned, 0 AS viruses, -@@ -263,9 +263,9 @@ + 0 AS badheaders, + 0 AS pending + FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id $join_type maddr AS recip ON msgrcpt.rid=recip.id - WHERE content='S' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') +- WHERE content='S' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') ++ WHERE msgs.content='S' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') AND $recipEmailClause -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) + GROUP BY CAST(time_iso AS DATE) UNION -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, + SELECT CAST(time_iso AS DATE) AS date, 0 AS spam, - COUNT(content) AS banned, +- COUNT(content) AS banned, ++ COUNT(msgs.content) AS banned, 0 AS viruses, -@@ -275,9 +275,9 @@ + 0 AS badheaders, + 0 AS pending + FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id $join_type maddr AS recip ON msgrcpt.rid=recip.id - WHERE content='B' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') +- WHERE content='B' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') ++ WHERE msgs.content='B' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') AND $recipEmailClause -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) + GROUP BY CAST(time_iso AS DATE) UNION -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, + SELECT CAST(time_iso AS DATE) AS date, 0 AS spam, 0 AS banned, - COUNT(content) AS viruses, -@@ -287,9 +287,9 @@ +- COUNT(content) AS viruses, ++ COUNT(msgs.content) AS viruses, + 0 AS badheaders, + 0 AS pending + FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id $join_type maddr AS recip ON msgrcpt.rid=recip.id - WHERE content='V' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') +- WHERE content='V' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') ++ WHERE msgs.content='V' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') AND $recipEmailClause -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) + GROUP BY CAST(time_iso AS DATE) UNION -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, +@@ -293,11 +293,11 @@ class DBEngine { 0 AS spam, 0 AS banned, 0 AS viruses, -@@ -299,9 +299,9 @@ +- COUNT(content) AS badheaders, ++ COUNT(msgs.content) AS badheaders, + 0 AS pending + FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id $join_type maddr AS recip ON msgrcpt.rid=recip.id - WHERE content='H' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') +- WHERE content='H' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') ++ WHERE msgs.content='H' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v') AND $recipEmailClause -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) + GROUP BY CAST(time_iso AS DATE) UNION -- SELECT CAST(time_iso AS DATE) AS date, -+ SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date, - 0 AS spam, +@@ -306,7 +306,7 @@ class DBEngine { 0 AS banned, 0 AS viruses, -@@ -311,7 +311,7 @@ + 0 AS badheaders, +- COUNT(content) AS pending ++ COUNT(msgs.content) AS pending + FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id $join_type maddr AS recip ON msgrcpt.rid=recip.id WHERE msgrcpt.rs='p' AND NOT (msgs.quar_type = '') - AND $recipEmailClause -- GROUP BY CAST(time_iso AS DATE) -+ GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE) - ) AS stattable - GROUP BY date - ORDER BY date"; Added: head/security/mailzu/files/patch-lib_Auth.class.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-lib_Auth.class.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,129 @@ +--- lib/Auth.class.php.orig 2007-06-14 19:00:15 UTC ++++ lib/Auth.class.php +@@ -43,42 +43,42 @@ class Auth { + * and start the session + * @param none + */ +- //function Auth() { ++ //public static function Auth() { + // $this->db = new AuthDB(); + //} + + /** + * Check if user is a super administrator +- * This function checks to see if the currently ++ * This public static function checks to see if the currently + * logged in user is the administrator, granting + * them special permissions + * @param none + * @return boolean whether the user is a s_admin + */ +- function isAdmin() { ++ public static function isAdmin() { + return isset($_SESSION['sessionAdmin']); + } + + /** + * Check if user is a mail administrator +- * This function checks to see if the currently ++ * This public static function checks to see if the currently + * logged in user is the administrator, granting + * them special permissions + * @param none + * @return boolean whether the user is a m_admin + */ +- function isMailAdmin() { ++ public static function isMailAdmin() { + return (isset($_SESSION['sessionMailAdmin']) || isset($_SESSION['sessionAdmin'])); + } + + /** + * Check user login +- * This function checks to see if the user has ++ * This public static function checks to see if the user has + * a valid session set (if they are logged in) + * @param none + * @return boolean whether the user is logged in + */ +- function is_logged_in() { ++ public static function is_logged_in() { + return isset($_SESSION['sessionID']); + } + +@@ -87,7 +87,7 @@ class Auth { + * @param none + * @return the userid, or null if the user is not logged in + */ +- function getCurrentID() { ++ public static function getCurrentID() { + return $_SESSION['sessionID'];//isset($_SESSION['sessionID']) ? $_SESSION['sessionID'] : null; + } + +@@ -281,7 +281,7 @@ class Auth { + } + } + +- function isAllowedToLogin( $username ) { ++ public static function isAllowedToLogin( $username ) { + + global $conf; + +@@ -333,7 +333,7 @@ class Auth { + * @param none + * @return whether the user is attempting to log in + */ +- function isAttempting() { ++ public static function isAttempting() { + return $this->is_attempt; + } + +@@ -341,7 +341,7 @@ class Auth { + * Kills app + * @param none + */ +- function kill() { ++ public static function kill() { + die; + } + +@@ -349,7 +349,7 @@ class Auth { + * Destroy any lingering sessions + * @param none + */ +- function clean() { ++ public static function clean() { + // Destroy all session variables + unset($_SESSION['sessionID']); + unset($_SESSION['sessionName']); +@@ -359,11 +359,11 @@ class Auth { + } + + /** +- * Wrapper function to call template 'printLoginForm' function ++ * Wrapper public static function to call template 'printLoginForm' function + * @param string $msg error messages to display for user + * @param string $resume page to resume after a login + */ +- function printLoginForm($msg = '', $resume = '') { ++ public static function printLoginForm($msg = '', $resume = '') { + printLoginForm($msg, $resume); + } + +@@ -371,7 +371,7 @@ class Auth { + * Prints a message telling the user to log in + * @param boolean $kill whether to end the program or not + */ +- function print_login_msg($kill = true) { ++ public static function print_login_msg($kill = true) { + CmnFns::redirect(CmnFns::getScriptURL() . '/index.php?auth=no&resume=' . urlencode($_SERVER['PHP_SELF']) . '?' . urlencode($_SERVER['QUERY_STRING'])); + } + +@@ -379,7 +379,7 @@ class Auth { + * Prints out the latest success box + * @param none + */ +- function print_success_box() { ++ public static function print_success_box() { + CmnFns::do_message_box($this->success); + } + } Added: head/security/mailzu/files/patch-lib_CmnFns.class.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-lib_CmnFns.class.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,296 @@ +--- lib/CmnFns.class.php.orig 2007-06-14 19:00:15 UTC ++++ lib/CmnFns.class.php +@@ -53,7 +53,7 @@ class CmnFns { + * @param double $time time to convert in minutes + * @return string time in 12 hour time + */ +- function formatTime($time) { ++ public static function formatTime($time) { + global $conf; + + // Set up time array with $timeArray[0]=hour, $timeArray[1]=minute +@@ -82,7 +82,7 @@ class CmnFns { + * @param string $date string (yyyy-mm-dd) + * @return int timestamp + */ +- function formatDateISO($date) { ++ public static function formatDateISO($date) { + + $time = strtotime($date); + return $time; +@@ -94,7 +94,7 @@ class CmnFns { + * @param string $format format to put datestamp into + * @return string date as $format or as default format + */ +- function formatDate($date, $format = '') { ++ public static function formatDate($date, $format = '') { + global $dates; + + if (empty($format)) $format = $dates['general_date']; +@@ -108,7 +108,7 @@ class CmnFns { + * @param string $format format to put datestamp into + * @return string date/time as $format or as default format + */ +- function formatDateTime($ts, $format = '') { ++ public static function formatDateTime($ts, $format = '') { + global $conf; + global $dates; + +@@ -123,7 +123,7 @@ class CmnFns { + * @param int $minutes minutes to convert + * @return string version of hours and minutes + */ +- function minutes_to_hours($minutes) { ++ public static function minutes_to_hours($minutes) { + if ($minutes == 0) + return '0 ' . translate('hours'); + +@@ -137,7 +137,7 @@ class CmnFns { + * @param none + * @return url url of curent script directory + */ +- function getScriptURL() { ++ public static function getScriptURL() { + global $conf; + $uri = $conf['app']['weburi']; + return (strrpos($uri, '/') === false) ? $uri : substr($uri, 0, strlen($uri)); +@@ -150,7 +150,7 @@ class CmnFns { + * @param string $style inline CSS style definition to apply to box + * @param boolean $die whether to kill the app or not + */ +- function do_error_box($msg, $style='', $die = true) { ++ public static function do_error_box($msg, $style='', $die = true) { + global $conf; + + echo '<table border="0" cellspacing="0" cellpadding="0" align="center" class="alert" style="' . $style . '"><tr><td>' . $msg . '</td></tr></table>'; +@@ -171,7 +171,7 @@ class CmnFns { + * @param string $msg message to print out + * @param string $style inline CSS style definition to apply to box + */ +- function do_message_box($msg, $style='') { ++ public static function do_message_box($msg, $style='') { + echo '<table border="0" cellspacing="0" cellpadding="0" align="center" class="message" style="' . $style . '"><tr><td>' . $msg . '</td></tr></table>'; + } + +@@ -181,7 +181,7 @@ class CmnFns { + * @param none + * @return Link object + */ +- function getNewLink() { ++ public static function getNewLink() { + return new Link(); + } + +@@ -191,7 +191,7 @@ class CmnFns { + * @param none + * @return Pager object + */ +- function getNewPager() { ++ public static function getNewPager() { + return new Pager(); + } + +@@ -200,7 +200,7 @@ class CmnFns { + * @param none + * @return array of cleaned up POST values + */ +- function cleanPostVals() { ++ public static function cleanPostVals() { + $return = array(); + + foreach ($_POST as $key => $val) +@@ -214,7 +214,7 @@ class CmnFns { + * @param none + * @return array of cleaned up data + */ +- function cleanVals($data) { ++ public static function cleanVals($data) { + $return = array(); + + foreach ($data as $key => $val) +@@ -228,7 +228,7 @@ class CmnFns { + * @param string $vert value of vertical order + * @return string vertical order + */ +- function get_vert_order($get_name = 'vert') { ++ public static function get_vert_order($get_name = 'vert') { + // If no vertical value is specified, use DESC + $vert = isset($_GET[$get_name]) ? $_GET[$get_name] : 'DESC'; + +@@ -251,7 +251,7 @@ class CmnFns { + * @param array $orders all valid order names + * @return string order of recorset + */ +- function get_value_order($orders = array(), $get_name = 'order') { ++ public static function get_value_order($orders = array(), $get_name = 'order') { + if (empty($orders)) // Return null if the order array is empty + return NULL; + +@@ -269,12 +269,12 @@ class CmnFns { + + + /** +- * Opposite of php's nl2br function. ++ * Opposite of php's nl2br public static function. + * Subs in a newline for all brs + * @param string $subject line to make subs on + * @return reformatted line + */ +- function br2nl($subject) { ++ public static function br2nl($subject) { + return str_replace('<br />', "\n", $subject); + } + +@@ -284,7 +284,7 @@ class CmnFns { + * @param string $userid memeber id of user performing the action + * @param string $ip ip address of user performing the action + */ +- function write_log($string, $userid = NULL, $ip = NULL) { ++ public static function write_log($string, $userid = NULL, $ip = NULL) { + global $conf; + $delim = "\t"; + $file = $conf['app']['logfile']; +@@ -319,7 +319,7 @@ class CmnFns { + * @param int $day_of_week day of the week + * @param int $type how to return the day name (0 = full, 1 = one letter, 2 = two letter, 3 = three letter) + */ +- function get_day_name($day_of_week, $type = 0) { ++ public static function get_day_name($day_of_week, $type = 0) { + global $days_full; + global $days_abbr; + global $days_letter; +@@ -343,7 +343,7 @@ class CmnFns { + * @param string $location new http location + * @param int $time time in seconds to wait before redirect + */ +- function redirect($location, $time = 0, $die = true) { ++ public static function redirect($location, $time = 0, $die = true) { + header("Refresh: $time; URL=$location"); + if ($die) exit; + } +@@ -352,7 +352,7 @@ class CmnFns { + * Prints out the HTML to choose a language + * @param none + */ +- function print_language_pulldown() { ++ public static function print_language_pulldown() { + global $conf; + ?> + <select name="language" class="textbox" onchange="changeLanguage(this);"> +@@ -375,7 +375,7 @@ class CmnFns { + * @param string $str string to search for links to create + * @return string with 'URL-like' text changed into clickable links + */ +- function html_activate_links($str) { ++ public static function html_activate_links($str) { + $str = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+)', '<a href="\1" target="_blank">\1</a>', $str); + $str = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&//=]+)', '\1<a href="http://\2" target="_blank">\2</a>', $str); + $str = eregi_replace('([_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3})','<a href="mailto:\1">\1</a>', $str); +@@ -388,7 +388,7 @@ class CmnFns { + * @param integer $page value of current page number + * @return integer current page number + */ +- function get_current_page_number($get_name = 'page') { ++ public static function get_current_page_number($get_name = 'page') { + // If no page number is specified, use 0 + $page = ( isset($_GET[$get_name]) && is_numeric($_GET[$get_name]) ) ? $_GET[$get_name] : 0; + return $page; +@@ -399,7 +399,7 @@ class CmnFns { + * @param none + * @return string mail_id + */ +- function get_mail_id($get_name = 'mail_id') { ++ public static function get_mail_id($get_name = 'mail_id') { + // If there isnt one set, return NULL + $mail_id = (isset($_GET[$get_name])) ? $_GET[$get_name] : NULL; + return $mail_id; +@@ -413,7 +413,7 @@ class CmnFns { + * @param array $exclude_vars to be excluded from the resulting string + * @param boolean $url_encode_ampersands + */ +- function array_to_query_string( $array, $exclude_vars=array(), $url_encode_ampersands=true ) ++ public static function array_to_query_string( $array, $exclude_vars=array(), $url_encode_ampersands=true ) + { + if( ! is_array( $array ) ) + return ''; +@@ -441,7 +441,7 @@ class CmnFns { + * @param integer $sizeLimit maximum number of messages per page + * @param integer $count total number of messages + */ +- function genMultiPagesLinks( $page, $sizeLimit, $count) { ++ public static function genMultiPagesLinks( $page, $sizeLimit, $count) { + global $link; + + $total_pages = $count / $sizeLimit; +@@ -501,7 +501,7 @@ class CmnFns { + * Generate HTML for search engine + * @param $content_type: 'B' (attachment) or 'S' (spam) + */ +- function searchEngine($content_type, $submit_page, $full_search = false) { ++ public static function searchEngine($content_type, $submit_page, $full_search = false) { + global $conf; + + $fields_array = array("f" => translate('From'), +@@ -579,7 +579,7 @@ class CmnFns { + * @param none + * @return value boolean + */ +- function didSearch() { ++ public static function didSearch() { + $return = false; + $strings = array('f_string','s_string','t_string','m_string'); + foreach ($strings as $string) { +@@ -593,7 +593,7 @@ class CmnFns { + * @param array of variables to exclude + * @return query string + */ +- function querystring_exclude_vars( $excl_array = array() ) { ++ public static function querystring_exclude_vars( $excl_array = array() ) { + return CmnFns::array_to_query_string( $_GET, $excl_array ); + } + +@@ -602,7 +602,7 @@ class CmnFns { + * @param none + * @return value + */ +- function get_ctype($get_name = 'ctype') { ++ public static function get_ctype($get_name = 'ctype') { + // If there isnt one set, return NULL + $result = NULL; + if ( isset($_GET[$get_name]) ) +@@ -617,7 +617,7 @@ class CmnFns { + * @param none + * @return value + */ +- function get_action($get_name = 'action') { ++ public static function get_action($get_name = 'action') { + // If there isnt one set, return NULL + $result = (isset($_POST[$get_name])) ? $_POST[$get_name] : NULL; + return $result; +@@ -628,7 +628,7 @@ class CmnFns { + * @param none + * @return value + */ +- function get_query_string($get_name = 'query_string') { ++ public static function get_query_string($get_name = 'query_string') { + // If there isnt one set, return NULL + $result = (isset($_POST[$get_name])) ? $_POST[$get_name] : NULL; + return $result; +@@ -656,7 +656,7 @@ class CmnFns { + * INORDER, SESSION, FORM, POST, GET, SERVER + * @return value of var + */ +- function getGlobalVar($name, $search = INORDER) { ++ public static function getGlobalVar($name, $search = INORDER) { + + switch ($search) { + +@@ -699,7 +699,7 @@ class CmnFns { + * Redirect using javascript + * @param $location string + */ +- function redirect_js($location) { ++ public static function redirect_js($location) { + echo "<SCRIPT LANGUAGE=\"JavaScript\">"; + echo "parent.location.href = '" . $location . "';"; + echo "</SCRIPT>"; Added: head/security/mailzu/files/patch-lib_Quarantine.lib.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-lib_Quarantine.lib.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,20 @@ +--- lib/Quarantine.lib.php.orig 2007-06-14 19:00:15 UTC ++++ lib/Quarantine.lib.php +@@ -65,7 +65,7 @@ function releaseMessages($emailaddresses + foreach ($mail_id_array as $mail_id_recip) { + + // Get mail_id and recipient email address +- $temp = preg_split('/_/', $mail_id_recip, 2); ++ $temp = preg_split('/__/', $mail_id_recip, 2); + $mail_id = $temp[0]; + $recip_email = $temp[1]; + +@@ -258,7 +258,7 @@ function updateMessages($flag, $content_ + foreach ($mail_id_array as $mail_id_recip) { + + // Get mail_id and recipient email address +- $temp = preg_split('/_/', $mail_id_recip, 2); ++ $temp = preg_split('/__/', $mail_id_recip, 2); + $mail_id = $temp[0]; + $recip_email = $temp[1]; + Added: head/security/mailzu/files/patch-lib_Template.class.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-lib_Template.class.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,11 @@ +--- lib/Template.class.php.orig 2007-06-14 19:00:15 UTC ++++ lib/Template.class.php +@@ -111,7 +111,7 @@ class Template { + <td class="mainBkgrdClr" valign="top"> + <div align="right"> + <p> +- <?= translate_date('header', mktime());?> ++ <?= translate_date('header', time());?> + </p> + <!--<p> + <? $this->link->doLink('javascript: help();', translate('Help')) ?> Added: head/security/mailzu/files/patch-messagesAdmin.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-messagesAdmin.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,10 @@ +--- messagesAdmin.php.orig 2007-06-14 19:00:15 UTC ++++ messagesAdmin.php +@@ -55,6 +55,7 @@ if (! Auth::isMailAdmin()) { + CmnFns::do_error_box(translate('Access Denied')); + + } else { ++ $content_type = (CmnFns::get_ctype() ? CmnFns::get_ctype() : 'A'); + // Draw search engine + printSearchEngine($content_type, $_SERVER['PHP_SELF'], 1); + echo '<br>'; Added: head/security/mailzu/files/patch-read__mail.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-read__mail.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,11 @@ +--- read_mail.php.orig 2007-06-14 19:00:15 UTC ++++ read_mail.php +@@ -59,7 +59,7 @@ if ( ! $m->msg_found) { + } else { + + echo '<form name="messages_process_form" action="messagesProcessing.php" method="POST">'; +- echo ' <input type="hidden" name="mail_id_array[]" value="' . $mail_id . '_' . $recip_email . '">'; ++ echo ' <input type="hidden" name="mail_id_array[]" value="' . $mail_id . '__' . $recip_email . '">'; + echo ' <input type="hidden" name="query_string" value="' . $query_string . '">'; + printActionButtons(false); + echo '</form>'; Added: head/security/mailzu/files/patch-templates_quarantine.template.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/patch-templates_quarantine.template.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,11 @@ +--- templates/quarantine.template.php.orig 2007-06-14 19:00:15 UTC ++++ templates/quarantine.template.php +@@ -143,7 +143,7 @@ function showMessagesTable($content_type + echo "<tr class=\"$class\" align=\"center\">"; + + echo ' <td><input type="checkbox" onclick="ColorRow(this,\'lightyellow\')" +- name="mail_id_array[]" value="' . $rs['mail_id'] . '_' . $rs['email'] . '"></td>'; ++ name="mail_id_array[]" value="' . $rs['mail_id'] . '__' . $rs['email'] . '"></td>'; + if ( (count($_SESSION['sessionMail']) > 1) || (Auth::isMailAdmin() && + ("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav']))) { + echo ' <td>' . $to . '</td>'; Added: head/security/mailzu/files/pl.help.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/pl.help.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,144 @@ +<?php +/** +* English (en) help translation file. +* This also serves as the base translation file from which to derive +* all other translations. +* +* @author Brian Wong <bwsource@users.sourceforge.net> +* @translator Your Name <your@email.com> +* @version 01-08-05 +* @package Languages +* +* Copyright (C) 2003 - 2007 MailZu +* License: GPL, see LICENSE +* +* $Id$ +*/ +/////////////////////////////////////////////////////////// +// INSTRUCTIONS +/////////////////////////////////////////////////////////// +// This file contains all the help file for MailZu. Please save the translated +// file as '2 letter language code'.help.php. For example, en.help.php. +// +// To make MailZu help available in another language, simply translate this +// file into your language. If there is no direct translation, please provide the +// closest translation. +// +// This will be included in the body of the help file. +// +// Please keep the HTML formatting unless you need to change it. Also, please try +// to keep the HTML XHTML 1.0 Transitional complaint. +/////////////////////////////////////////////////////////// +?> +<div align="center"> + <h3><a name="top" id="top"></a>Wprowadzenie do MailZu</h3> + <p><a href="http://mailzu.net" target="_blank">http://mailzu.net</a></p> + <table width="100%" border="0" cellspacing="0" cellpadding="5" style="border: solid #CCCCCC 1px"> + <tr> + <td bgcolor="#FAFAFA"> + <ul> + <li><b><a href="#getting_started">Rozpoczęcie pracy</a></b></li> + <ul> + <li><a href="#logging_in">Logowanie</a></li> + <li><a href="#language">Wybór mojego języka</a></li> + <li><a href="#getting_support">Uzyskanie wsparcia</a></li> + </ul> + <li><a href="#using_mailzu"><b>Używanie MailZu</b></a></li> + <ul> + <li><a href="#quick_links">Moje szybkie odnośniki</a></li> + <li><a href="#msg_summary">Podsumowanie wiadomości</a></li> + <li><a href="#msg_index">Indeksy wiadomości</a></li> + <li><a href="#search">Szukanie wiadomości</a></li> + <li><a href="#msg_view">Podgląd wiadomości</a></li> + </ul> + </ul> + <hr width="95%" size="1" noshade="noshade" /> + <h4><a name="getting_started" id="getting_started"></a>Rozpoczęcie pracy</h4> + <p> At the top of each page you will see a welcome message and today's date. + If a previous user is displayed in the welcome message, click "Log + Out" to clear out any cookies they were using and <a href="#logging_in">log + in</a> as yourself. + Clicking the "Help" link brings a pop-up help window. Clicking + the "Email Administrator" link will open a new mail addressed to the system's + administrator.</p> + <p align="right"><a href="#top">Top</a></p> + <h5><a name="logging_in" id="logging_in"></a>Logging In</h5> + <p>To log in, users must provide their login id and password. The login id + may be your fully-qualified email address ('user@example.com') or simply + your username ('user'). The administrator shall inform you of the correct + form to use. Selecting the "Keep Me Logged In" option will use + cookies to identify you each time you return to the quarantine, bypassing + the need to log in each time. <i>You should only use this option if + you are the only person using MailZu on your computer.</i> After + logging in, you will be redirected to the <a href="#message_summary"> + Message Summary</a>.</p> + <p align="right"><a href="#top">Top</a></p> + <h5><a name="language" id="language"></a>Selecting My Language</h5> + <p>On the login page, there will be a pull down menu with all of the + available language translations that your administrator has included. + Please select the language that you prefer and all MailZu text + will be translated. This will not translate any text related to actual + email messages; it will only translate the application text. You will + need to log out to select a different language.</p> + <p align="right"><a href="#top">Top</a></p> + <h5><a name="getting_support" id="getting_support"></a>Getting + Help</h5> + <p>If you you need assistance with viewing your quarantined messages or any + issue whatsoever, feel free to use the "Email + Administrator" link located in <a href="#quick_links">My Quick Links</a>.</p> + <p align="right"><a href="#top">Top</a></p> <p align="right"> </p> + <hr width="95%" size="1" noshade="noshade" /> + <h4><a name="using_mailzu" id="using_mailzu"></a>Using MailZu</h4> + <p>MailZu allows the user to view quarantined messages based on the type of messages. + The most prevalent types of messages which will be quarantined are those that are + considered spam, or contain a banned attachment. + <p align="right"><a href="#top">Top</a></p> + <h5><a name="quick_links" id="quick_links"></a>My Quick Links</h5> + <p>The Quick Links table will provide you with common application links. + The first, "Quarantine Summary" will give an overview of your message + quarantines.</p> + <p> "My Quarantine" will take you to + an index of your unsolicited bulk email and banned attachments.</p> + <p>"Email Administrator" is a quick way to contact your support + staff if you require assistance.</p> + <p>"Help" gives you this document.</p> + <p>The final link, "Log Out" will log you out of your current + session and return you to the log in screen.</p> + <p align="right"><a href="#top">Top</a></p> + <h5><a name="msg_summary" id="msg_summary"></a>Message Summary</h5> + <p> The message summary is the default page after login. It gives you a quick count of + how many messages you have in your quarantine and their type. + <p align="right"><a href="#top">Top</a></p> + <h5><a name="msg_index" id="msg_index"></a>Message Indexes</h5> + <p> Message indices show all the email for selected quarantined. + For each email quarantined, the index will show the From, Subject, and Date. Depending + on the quarantine currently in view, the index may show more information.</p> + <p>To sort your index by a specific field, click on the field title. Clicking the field + title again will reverse the sort.</p> + <p>Several buttons are available for handling the messages shown in the index. The + 'Release/Request' action removes the message from the index and delivers the email as + if it had never been quarantined. The 'Delete' action only removes the message from the + index. These buttons perform the action on the messages selected through the checkboxes. + The 'Delete All' button ignores the state of the checkboxes and removes all messages in + the quarantine selected.</p> + <p>When viewing your pending requests you can withdraw the request by clicking + 'Cancel Request'. The message will no longer be queued for administrator review. + </p> + <p align="right"><a href="#top">Top</a></p> + <h5><a name="search" id="search"></a>Message Search</h5> + <p>Using the search function is a quick way to find a message you believe has been + quarantined. You can search for a message by specifying either who its from, or + what the subject is, or both. The search is not case sensitive.</p> + <p align="right"><a href="#top">Top</a></p> + <h5><a name="msg_view" id="msg_view"></a>Message View</h5> + <p>The Message View allows you to see the contents of the message to help + determine if the message is legitimate. This view offers other options such + as to display the original plain text email and see additional message headers. + </p> + <p align="right"><a href="#top">Top</a></p> <p align="right"> </p> + + <hr width="95%" size="1" noshade="noshade" /> + </td> + </tr> + </table> +</div> Added: head/security/mailzu/files/pl.lang.php ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/mailzu/files/pl.lang.php Sat Nov 24 10:12:21 2018 (r485752) @@ -0,0 +1,324 @@ +<?php +/** +* Polish (pl) translation file. +* Based on phpScheduleIt translation file. +* This also serves as the base translation file from which to derive +* all other translations. +* +* @author Samuel Tran <stran2005@users.sourceforge.net> +* @author Brian Wong <bwsource@users.sourceforge.net> +* @author Nicolas Peyrussie <peyrouz@users.sourceforge.net> +* @version 04-03-07 +* @package Languages +* +* Copyright (C) 2005 - 2007 MailZu +* License: GPL, see LICENSE +* +* $Id$ +*/ +/////////////////////////////////////////////////////////// +// INSTRUCTIONS +/////////////////////////////////////////////////////////// +// This file contains all of the strings that are used throughout phpScheduleit. +// Please save the translated file as '2 letter language code'.lang.php. For example, en.lang.php. +// +// To make phpScheduleIt available in another language, simply translate each +// of the following strings into the appropriate one for the language. If there +// is no direct translation, please provide the closest translation. Please be sure +// to make the proper additions the /config/langs.php file (instructions are in the file). *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811241012.wAOACLRr077180>