mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Update squirrelmail port to work under PHP5+ until the next
release comes out with the fix already in. PR: ports/85909 Submitted by: maintainer
This commit is contained in:
parent
6bb185d957
commit
05c76f798e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=142295
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= squirrelmail
|
||||
PORTVERSION?= 1.4.5
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES?= mail www
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= squirrelmail
|
||||
@ -63,7 +64,12 @@ slaveport-post-patch:
|
||||
|
||||
post-patch: slaveport-post-patch
|
||||
.ifndef PATCH_DEBUG
|
||||
@${RM} -f ${WRKSRC}/config/config_default.php.orig
|
||||
@${RM} -f ${WRKSRC}/config/config_default.php.orig \
|
||||
${WRKSRC}/src/configtest.php.orig \
|
||||
${WRKSRC}/src/search.php.orig \
|
||||
${WRKSRC}/class/mime/Rfc822Header.class.php.orig \
|
||||
${WRKSRC}/functions/imap_messages.php.orig \
|
||||
${WRKSRC}/plugins/listcommands/setup.php.orig
|
||||
.endif
|
||||
@${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \
|
||||
${MASTERDIR}/pkg-install > ${PKGINSTALL}
|
||||
|
92
mail/squirrelmail/files/patch-squirrelmail-stable.diff
Normal file
92
mail/squirrelmail/files/patch-squirrelmail-stable.diff
Normal file
@ -0,0 +1,92 @@
|
||||
diff -urN class/mime/Rfc822Header.class.php class/mime/Rfc822Header.class.php
|
||||
--- class/mime/Rfc822Header.class.php 2005-02-07 12:26:49.000000000 +0200
|
||||
+++ class/mime/Rfc822Header.class.php 2005-07-14 09:13:44.000000000 +0300
|
||||
@@ -505,8 +505,9 @@
|
||||
* functions/imap_messages. I'm not sure if it's ok here to call
|
||||
* that function?
|
||||
*/
|
||||
- function parsePriority($value) {
|
||||
- $value = strtolower(array_shift(split('/\w/',trim($value))));
|
||||
+ function parsePriority($sValue) {
|
||||
+ $aValue = split('/\w/',trim($sValue));
|
||||
+ $value = strtolower(array_shift($aValue));
|
||||
if ( is_numeric($value) ) {
|
||||
return $value;
|
||||
}
|
||||
diff -urN functions/imap_messages.php functions/imap_messages.php
|
||||
--- functions/imap_messages.php 2005-04-17 18:50:14.000000000 +0300
|
||||
+++ functions/imap_messages.php 2005-07-14 09:23:02.991592896 +0300
|
||||
@@ -476,8 +476,9 @@
|
||||
* NOTE: this is actually a duplicate from the function in
|
||||
* class/mime/Rfc822Header.php.
|
||||
*/
|
||||
-function parsePriority($value) {
|
||||
- $value = strtolower(array_shift(split('/\w/',trim($value))));
|
||||
+function parsePriority($sValue) {
|
||||
+ $aValue=split('/\w/',trim($sValue));
|
||||
+ $value = strtolower(array_shift($aValue));
|
||||
if ( is_numeric($value) ) {
|
||||
return $value;
|
||||
}
|
||||
diff -urN plugins/listcommands/setup.php plugins/listcommands/setup.php
|
||||
--- plugins/listcommands/setup.php 2005-03-02 20:22:17.000000000 +0200
|
||||
+++ plugins/listcommands/setup.php 2005-07-14 09:16:29.762372824 +0300
|
||||
@@ -51,8 +51,9 @@
|
||||
}
|
||||
|
||||
/* proto = {mailto,href} */
|
||||
- $proto = array_shift(array_keys($actions));
|
||||
- $act = array_shift($actions);
|
||||
+ $aActionKeys = array_keys($actions);
|
||||
+ $proto = array_shift($aActionKeys);
|
||||
+ $act = array_shift($aActionKeys);
|
||||
|
||||
if ($proto == 'mailto') {
|
||||
|
||||
diff -urN src/configtest.php src/configtest.php
|
||||
--- src/configtest.php 2005-05-23 20:12:39.000000000 +0300
|
||||
+++ src/configtest.php 2005-07-14 09:44:30.071926944 +0300
|
||||
@@ -314,7 +314,7 @@
|
||||
echo "$IND iconv - ";
|
||||
if (function_exists('iconv')) {
|
||||
echo "Iconv functions are available.<br />\n";
|
||||
-} elseif ($use_php_iconv) {
|
||||
+} elseif (isset($use_php_iconv) && $use_php_iconv) {
|
||||
echo "Iconv functions are unavailable.<br />\n";
|
||||
do_err('Your configuration requires iconv support, but iconv support is missing.');
|
||||
} else {
|
||||
@@ -365,7 +365,8 @@
|
||||
}
|
||||
|
||||
foreach($dsns as $type => $dsn) {
|
||||
- $dbtype = array_shift(explode(':', $dsn));
|
||||
+ $aDsn = explode(':', $dsn);
|
||||
+ $dbtype = array_shift($aDsn);
|
||||
if(isset($db_functions[$dbtype]) && function_exists($db_functions[$dbtype])) {
|
||||
echo "$IND$dbtype database support present.<br />\n";
|
||||
|
||||
@@ -380,7 +381,7 @@
|
||||
echo "$IND$type database connect successful.<br />\n";
|
||||
|
||||
} else {
|
||||
- do_err($db.' database support not present!');
|
||||
+ do_err($dbtype.' database support not present!');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
diff -urN src/search.php src/search.php
|
||||
--- src/search.php 2005-06-22 17:24:12.000000000 +0300
|
||||
+++ src/search.php 2005-07-14 09:35:24.000000000 +0300
|
||||
@@ -297,7 +297,11 @@
|
||||
/* update the recent and saved searches from the pref files */
|
||||
$attributes = get_recent($username, $data_dir);
|
||||
$saved_attributes = get_saved($username, $data_dir);
|
||||
-$saved_count = count($saved_attributes['saved_what']);
|
||||
+if (isset($saved_attributes['saved_what'])) {
|
||||
+ $saved_count = count($saved_attributes['saved_what']);
|
||||
+} else {
|
||||
+ $saved_count = 0;
|
||||
+}
|
||||
$count_all = 0;
|
||||
|
||||
/* Saved Search Table */
|
Loading…
Reference in New Issue
Block a user