diff options
author | Alex Dupre <ale@FreeBSD.org> | 2009-09-07 20:57:06 +0000 |
---|---|---|
committer | Alex Dupre <ale@FreeBSD.org> | 2009-09-07 20:57:06 +0000 |
commit | 6a6551951f79078bfe517245390b6b16040368e3 (patch) | |
tree | 8e1c09a33c2edc4ff647ed6c70b3f1bfb0156616 /mail/roundcube | |
parent | 54732cbcfcd4c4cb98a58320d5dccc060fdce10e (diff) | |
download | ports-6a6551951f79078bfe517245390b6b16040368e3.tar.gz ports-6a6551951f79078bfe517245390b6b16040368e3.zip |
Update to 0.3 release:
- add plugins support
- add a fix for encrypted sessions
Notes
Notes:
svn path=/head/; revision=241010
Diffstat (limited to 'mail/roundcube')
-rw-r--r-- | mail/roundcube/Makefile | 21 | ||||
-rw-r--r-- | mail/roundcube/distinfo | 6 | ||||
-rw-r--r-- | mail/roundcube/files/patch-program_include_rcube_message.php | 12 | ||||
-rw-r--r-- | mail/roundcube/files/patch-program_include_session.inc | 157 |
4 files changed, 177 insertions, 19 deletions
diff --git a/mail/roundcube/Makefile b/mail/roundcube/Makefile index 2c980b2fa715..688d5a2a1676 100644 --- a/mail/roundcube/Makefile +++ b/mail/roundcube/Makefile @@ -6,18 +6,18 @@ # PORTNAME= roundcube -DISTVERSION= 0.2.2 +DISTVERSION= 0.3 PORTEPOCH= 1 CATEGORIES= mail www -MASTER_SITES= SF/${PORTNAME}mail/${PORTNAME}mail/${PORTVERSION} -DISTNAME= ${PORTNAME}mail-${DISTVERSION} +MASTER_SITES= SF/${PORTNAME}mail/${PORTNAME}mail/${PORTVERSION}-stable +DISTNAME= ${PORTNAME}mail-${DISTVERSION}-stable MAINTAINER= ale@FreeBSD.org COMMENT= Fully skinnable XHTML/CSS webmail written in PHP NO_BUILD= yes -RCUBECOMP= SQL bin config index.php logs program robots.txt skins temp +RCUBECOMP= SQL bin config index.php logs plugins program robots.txt skins temp PORTDOCS= CHANGELOG INSTALL LICENSE README UPGRADING SCRIPTS_ENV= SHAREOWN=${SHAREOWN} SHAREGRP=${SHAREGRP} \ @@ -90,6 +90,7 @@ post-patch: .endif .if defined(WITH_REPLACE_MAIL_URL) @${REINPLACE_CMD} "s/'mail'/'${MAIL}'/g" ${WRKSRC}/index.php \ + ${WRKSRC}/plugins/*/*.php \ ${WRKSRC}/program/include/rcmail.php \ ${WRKSRC}/program/localization/*/labels.inc \ ${WRKSRC}/program/steps/addressbook/mailto.inc @@ -99,14 +100,14 @@ post-patch: ${WRKSRC}/program/js/app.js \ ${WRKSRC}/skins/default/includes/header.html \ ${WRKSRC}/skins/default/includes/taskbar.html - @${REINPLACE_CMD} "s/mail.gif/${MAIL}.gif/g" \ - ${WRKSRC}/skins/default/common.css - @${REINPLACE_CMD} "s/mail.css/${MAIL}.css/g" \ - ${WRKSRC}/skins/default/templates/*.html + @${REINPLACE_CMD} "s/mail_toolbar/${MAIL}_toolbar/g" \ + ${WRKSRC}/skins/default/*.css @${MV} ${WRKSRC}/program/steps/mail \ ${WRKSRC}/program/steps/${MAIL} - @${MV} ${WRKSRC}/skins/default/images/buttons/mail.gif \ - ${WRKSRC}/skins/default/images/buttons/${MAIL}.gif + @${MV} ${WRKSRC}/skins/default/images/mail_toolbar.gif \ + ${WRKSRC}/skins/default/images/${MAIL}_toolbar.gif + @${MV} ${WRKSRC}/skins/default/images/mail_toolbar.png \ + ${WRKSRC}/skins/default/images/${MAIL}_toolbar.png @${MV} ${WRKSRC}/skins/default/mail.css \ ${WRKSRC}/skins/default/${MAIL}.css @${MV} ${WRKSRC}/skins/default/templates/mail.html \ diff --git a/mail/roundcube/distinfo b/mail/roundcube/distinfo index 21a18362834d..b22e2aa74ccf 100644 --- a/mail/roundcube/distinfo +++ b/mail/roundcube/distinfo @@ -1,3 +1,3 @@ -MD5 (roundcubemail-0.2.2.tar.gz) = 992bd125a5f3c91e81f1eebbdef63575 -SHA256 (roundcubemail-0.2.2.tar.gz) = 57df1dfa6b88973f74131adf0262de4fbf5217be3bc6739faeccff77a9dfffa3 -SIZE (roundcubemail-0.2.2.tar.gz) = 1703629 +MD5 (roundcubemail-0.3-stable.tar.gz) = 741bb3dace2e2824c0cbb3e86142be5b +SHA256 (roundcubemail-0.3-stable.tar.gz) = 11b1618692000b82c4fde26527b2cf5c18850eb6f48c6c0004758c39308dfd04 +SIZE (roundcubemail-0.3-stable.tar.gz) = 1888994 diff --git a/mail/roundcube/files/patch-program_include_rcube_message.php b/mail/roundcube/files/patch-program_include_rcube_message.php index d35f8801433e..cec05f069708 100644 --- a/mail/roundcube/files/patch-program_include_rcube_message.php +++ b/mail/roundcube/files/patch-program_include_rcube_message.php @@ -1,11 +1,11 @@ ---- ./program/include/rcube_message.php.orig 2009-07-30 14:35:17.000000000 +0200 -+++ ./program/include/rcube_message.php 2009-07-30 14:35:35.000000000 +0200 -@@ -373,7 +373,7 @@ +--- program/include/rcube_message.php.orig 2009-08-27 10:08:27.000000000 +0200 ++++ program/include/rcube_message.php 2009-09-07 17:47:43.000000000 +0200 +@@ -384,7 +384,7 @@ - // part is file/attachment - else if ($mail_part->disposition == 'attachment' || $mail_part->disposition == 'inline' || + // part is a file/attachment + else if (preg_match('/^(inline|attach)/', $mail_part->disposition) || - $mail_part->headers['content-id'] || (empty($mail_part->disposition) && $mail_part->filename)) { + $mail_part->headers['content-id'] || $mail_part->filename) { + // skip apple resource forks if ($message_ctype_secondary == 'appledouble' && $secondary_type == 'applefile') - continue; diff --git a/mail/roundcube/files/patch-program_include_session.inc b/mail/roundcube/files/patch-program_include_session.inc new file mode 100644 index 000000000000..5b16f413bf09 --- /dev/null +++ b/mail/roundcube/files/patch-program_include_session.inc @@ -0,0 +1,157 @@ +--- program/include/session.inc.orig 2009-09-07 22:22:55.000000000 +0200 ++++ program/include/session.inc 2009-09-07 22:47:29.000000000 +0200 +@@ -19,8 +19,6 @@ + + */ + +-$GLOBALS['rcube_session_unsets'] = array(); +- + function rcube_sess_open($save_path, $session_name) + { + return true; +@@ -66,20 +64,15 @@ + $now = $DB->fromunixtime(time()); + + $sql_result = $DB->query( +- "SELECT vars FROM " . get_table_name('session') . " ++ "SELECT 1 FROM " . get_table_name('session') . " + WHERE sess_id=?", $key); + +- if ($sql_arr = $DB->fetch_assoc($sql_result)) { +- +- $a_oldvars = rcube_sess_unserialize($sql_arr['vars']); +- foreach ((array)$GLOBALS['rcube_session_unsets'] as $k) +- unset($a_oldvars[$k]); +- ++ if ($DB->num_rows($sql_result)) { + $DB->query( + "UPDATE " . get_table_name('session') . " + SET vars=?, changed= " . $now . " + WHERE sess_id=?", +- rcube_sess_serialize(array_merge($a_oldvars, rcube_sess_unserialize($vars))), ++ $vars, + $key); + } + else { +@@ -92,7 +85,6 @@ + (string)$_SERVER['REMOTE_ADDR']); + } + +- $GLOBALS['rcube_session_unsets'] = array(); + return true; + } + +@@ -103,113 +95,12 @@ + if (empty($var)) + return rcube_sess_destroy(session_id()); + +- $GLOBALS['rcube_session_unsets'][] = $var; + unset($_SESSION[$var]); + + return true; + } + + +-// serialize session data +-function rcube_sess_serialize($vars) +-{ +- $data = ''; +- if (is_array($vars)) +- foreach ($vars as $var=>$value) +- $data .= $var.'|'.serialize($value); +- else +- $data = 'b:0;'; +- return $data; +-} +- +- +-// unserialize session data +-// http://www.php.net/manual/en/function.session-decode.php#56106 +-function rcube_sess_unserialize($str) +-{ +- $str = (string)$str; +- $endptr = strlen($str); +- $p = 0; +- +- $serialized = ''; +- $items = 0; +- $level = 0; +- +- while ($p < $endptr) { +- $q = $p; +- while ($str[$q] != '|') +- if (++$q >= $endptr) break 2; +- +- if ($str[$p] == '!') { +- $p++; +- $has_value = false; +- } else { +- $has_value = true; +- } +- +- $name = substr($str, $p, $q - $p); +- $q++; +- +- $serialized .= 's:' . strlen($name) . ':"' . $name . '";'; +- +- if ($has_value) { +- for (;;) { +- $p = $q; +- switch (strtolower($str[$q])) { +- case 'n': /* null */ +- case 'b': /* boolean */ +- case 'i': /* integer */ +- case 'd': /* decimal */ +- do $q++; +- while ( ($q < $endptr) && ($str[$q] != ';') ); +- $q++; +- $serialized .= substr($str, $p, $q - $p); +- if ($level == 0) break 2; +- break; +- case 'r': /* reference */ +- $q+= 2; +- for ($id = ''; ($q < $endptr) && ($str[$q] != ';'); $q++) $id .= $str[$q]; +- $q++; +- $serialized .= 'R:' . ($id + 1) . ';'; /* increment pointer because of outer array */ +- if ($level == 0) break 2; +- break; +- case 's': /* string */ +- $q+=2; +- for ($length=''; ($q < $endptr) && ($str[$q] != ':'); $q++) $length .= $str[$q]; +- $q+=2; +- $q+= (int)$length + 2; +- $serialized .= substr($str, $p, $q - $p); +- if ($level == 0) break 2; +- break; +- case 'a': /* array */ +- case 'o': /* object */ +- do $q++; +- while ( ($q < $endptr) && ($str[$q] != '{') ); +- $q++; +- $level++; +- $serialized .= substr($str, $p, $q - $p); +- break; +- case '}': /* end of array|object */ +- $q++; +- $serialized .= substr($str, $p, $q - $p); +- if (--$level == 0) break 2; +- break; +- default: +- return false; +- } +- } +- } else { +- $serialized .= 'N;'; +- $q+= 2; +- } +- $items++; +- $p = $q; +- } +- +- return unserialize( 'a:' . $items . ':{' . $serialized . '}' ); +-} +- +- + // handler for session_destroy() + function rcube_sess_destroy($key) + { |