gunnar: server/php-kolab/Kolab_Filter/Filter Filter.php, 1.1, 1.2 Incoming.php, 1.2, 1.3 Outgoing.php, 1.2, 1.3 Outlook.php, 1.1, 1.2 Resource.php, 1.1, 1.2 Response.php, 1.1, 1.2
cvs at kolab.org
cvs at kolab.org
Tue Nov 27 11:01:54 CET 2007
- Previous message: gunnar: server/php-kolab/Kolab_Filter/tests/_data tiny.eml,NONE,1.1
- Next message: gunnar: server/php-kolab/Kolab_Filter/Filter Filter.php, 1.2, 1.3 Incoming.php, 1.3, 1.4 Outgoing.php, 1.3, 1.4 Outlook.php, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: gunnar
Update of /kolabrepository/server/php-kolab/Kolab_Filter/Filter
In directory doto:/tmp/cvs-serv8941/php-kolab/Kolab_Filter/Filter
Modified Files:
Filter.php Incoming.php Outgoing.php Outlook.php Resource.php
Response.php
Log Message:
Fix all myLog occurences.
Index: Filter.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Filter/Filter/Filter.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Filter.php 26 Nov 2007 16:35:21 -0000 1.1
+++ Filter.php 27 Nov 2007 10:01:52 -0000 1.2
@@ -72,6 +72,7 @@
$this->_tmpdir = sys_get_temp_dir();
}
+ // FIXME: Do we need this?
/* This is used as the default domain for unqualified adresses */
global $_SERVER;
if (!array_key_exists('SERVER_NAME', $_SERVER)) {
@@ -159,7 +160,7 @@
!array_key_exists('s', $options)) {
return PEAR::raiseError(sprintf(_("Usage is %s -s sender at domain -r recipient at domain"),
$args[0]),
- OUT_STDOUT || ERR_TEMPFAIL);
+ OUT_STDOUT | ERR_TEMPFAIL);
}
$this->_sender = strtolower($options['s']);
@@ -199,7 +200,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Could not open %s for writing: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
register_shutdown_function(array($this, '_cleanupTmp'));
@@ -225,7 +226,7 @@
return $transport;
}
return PEAR::raiseError(sprintf(_("No such class \"%s\""), $class),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
function _rewriteCode($result)
@@ -237,7 +238,7 @@
}
$append = sprintf(_(", original code %s"), $result->getCode());
$result->message = $result->getMessage() . $append;
- $result->code = OUT_LOG || OUT_STDOUT || $code;
+ $result->code = OUT_LOG | OUT_STDOUT | $code;
return $result;
}
}
Index: Incoming.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Filter/Filter/Incoming.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Incoming.php 27 Nov 2007 07:30:25 -0000 1.2
+++ Incoming.php 27 Nov 2007 10:01:52 -0000 1.3
@@ -72,7 +72,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Could not write to %s: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
}
@@ -82,7 +82,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Could not write to %s: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
}
@@ -90,7 +90,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Failed closing %s: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
if ($ical) {
@@ -156,7 +156,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Could not open %s for writing: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
$result = $transport->start($this->_sender, $this->_recipients);
Index: Outgoing.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Filter/Filter/Outgoing.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Outgoing.php 27 Nov 2007 07:30:25 -0000 1.2
+++ Outgoing.php 27 Nov 2007 10:01:52 -0000 1.3
@@ -147,7 +147,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Could not write to %s: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
}
while (!feof($inh)) {
@@ -156,7 +156,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Could not write to %s: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
}
@@ -164,7 +164,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Failed closing %s: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
if (!$senderok) {
@@ -180,7 +180,7 @@
} else {
return PEAR::raiseError(sprintf(_("Invalid From: header. %s looks like a forged sender"),
$from),
- OUT_LOG || OUT_STDOUT || ERR_UNAVAILABLE);
+ OUT_LOG | OUT_STDOUT | ERR_UNAVAILABLE);
}
}
@@ -215,7 +215,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Could not open %s for writing: %s"),
$this->_tmpfile, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
$result = $transport->start($this->_sender, $this->_recipients);
@@ -324,7 +324,7 @@
if (!ldap_bind($ldap, $conf['filter']['bind_dn'], $conf['filter']['bind_pw'])) {
return PEAR::raiseError(sprintf(_("Unable to contact LDAP server: %s"),
ldap_error($ldap)),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
$filter = "(&(objectClass=kolabInetOrgPerson)(|(mail=$sasluser)(uid=$sasluser)))";
@@ -334,14 +334,14 @@
if (!$result) {
return PEAR::raiseError(sprintf(_("Unable to perform LDAP search: %s"),
ldap_error($ldap)),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
$entries = ldap_get_entries($ldap, $result);
if ($entries['count'] != 1) {
return PEAR::raiseError(sprintf(_("%s objects returned for uid %s. Unable to look up user."),
$entries['count'], $sasluser),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
unset($entries[0]['mail']['count']);
unset($entries[0]['alias']['count']);
@@ -357,7 +357,7 @@
if (!$result) {
return PEAR::raiseError(sprintf(_("Unable to perform LDAP search: %s"),
ldap_error($ldap)),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
$entries = ldap_get_entries($ldap, $result);
Index: Outlook.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Filter/Filter/Outlook.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Outlook.php 27 Nov 2007 07:35:45 -0000 1.1
+++ Outlook.php 27 Nov 2007 10:01:52 -0000 1.2
@@ -160,7 +160,7 @@
$msg = $php_errormsg;
return PEAR::raiseError(sprintf(_("Error: Could not open %s for writing: %s"),
$tmpfname, $msg),
- OUT_LOG || ERR_TEMPFAIL);
+ OUT_LOG | ERR_TEMPFAIL);
}
while (!feof($handle)) {
$requestText .= fread($handle, 8192);
@@ -223,7 +223,7 @@
if (is_a($result, 'PEAR_Error')) {
$append = sprintf(_(", original code %s"), $result->getCode());
$result->message = $result->getMessage() . $append;
- $result->code = OUT_LOG || OUT_STDOUT || ERR_TEMPFAIL;
+ $result->code = OUT_LOG | OUT_STDOUT | ERR_TEMPFAIL;
return $result;
}
Index: Resource.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Filter/Filter/Resource.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Resource.php 27 Nov 2007 07:35:45 -0000 1.1
+++ Resource.php 27 Nov 2007 10:01:52 -0000 1.2
@@ -85,34 +85,33 @@
conflicts between an event and a freebusy list
*/
class ResmgrRecurrence extends Recurrence {
- function ResmgrRecurrence() {
- $this->conflict = false;
- }
+ function ResmgrRecurrence() {
+ $this->conflict = false;
+ }
- function setBusy( $start, $end, $duration ) {
[...2088 lines suppressed...]
+ return true;
}
- return false;;
- default:
- // We either don't currently handle these iTip methods, or they do not
- // apply to what we're trying to accomplish here
- myLog("Ignoring $method method and passing message through to $resource");
+ // Pass the message through to the group's mailbox
+ Horde::logMessage(sprintf(_("Passing through %s method to %s"),
+ $method, $resource),
+ __FILE__, __LINE__, PEAR_LOG_INFO);
return true;
- }
-
- // Pass the message through to the group's mailbox
- myLog("Passing through $method method to $resource");
- return true;
}
?>
Index: Response.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Filter/Filter/Response.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Response.php 26 Nov 2007 16:35:21 -0000 1.1
+++ Response.php 27 Nov 2007 10:01:52 -0000 1.2
@@ -74,20 +74,20 @@
$msg = $result->getMessage();
$code = $result->getCode();
- if ($code && OUT_STDOUT) {
+ if ($code & OUT_STDOUT) {
fwrite(STDOUT, $msg);
}
- if ($code && OUT_LOG) {
- $frame = $result->getBacktrace(2);
+ if ($code & OUT_LOG || empty($code)) {
+ $frame = $result->getBacktrace(1);
Horde::logMessage($msg, $frame['file'], $frame['line']);
}
// FIXME: Add a userinfo handler in case there were multiple
// combined errors
- if ($code && ERR_TEMPFAIL) {
+ if ($code & ERR_TEMPFAIL || empty($code)) {
exit(EX_TEMPFAIL);
- } else if ($code && ERR_UNAVAILABLE) {
+ } else if ($code & ERR_UNAVAILABLE) {
exit(EX_UNAVAILABLE);
} else {
exit(0);
- Previous message: gunnar: server/php-kolab/Kolab_Filter/tests/_data tiny.eml,NONE,1.1
- Next message: gunnar: server/php-kolab/Kolab_Filter/Filter Filter.php, 1.2, 1.3 Incoming.php, 1.3, 1.4 Outgoing.php, 1.3, 1.4 Outlook.php, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the commits
mailing list