Index: security/mailzu/Makefile =================================================================== --- security/mailzu/Makefile +++ security/mailzu/Makefile @@ -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 @@ 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 Index: security/mailzu/files/patch-config_init.php =================================================================== --- /dev/null +++ security/mailzu/files/patch-config_init.php @@ -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'; + Index: security/mailzu/files/patch-config_langs.php =================================================================== --- /dev/null +++ security/mailzu/files/patch-config_langs.php @@ -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])) Index: security/mailzu/files/patch-lib-DBEngine.class.php =================================================================== --- security/mailzu/files/patch-lib-DBEngine.class.php +++ security/mailzu/files/patch-lib-DBEngine.class.php @@ -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"; Index: security/mailzu/files/patch-lib_Auth.class.php =================================================================== --- /dev/null +++ security/mailzu/files/patch-lib_Auth.class.php @@ -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); + } + } Index: security/mailzu/files/patch-lib_CmnFns.class.php =================================================================== --- /dev/null +++ security/mailzu/files/patch-lib_CmnFns.class.php @@ -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 '
' . $msg . '
'; +@@ -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 '
' . $msg . '
'; + } + +@@ -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('
', "\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; + ?> +