git.cweiske.de
/
auerswald-callnotifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d1c45d
)
make numbers nice on dreambox, do not show from/to when only one type gets logged
author
Christian Weiske
<cweiske@cweiske.de>
Sat, 25 Aug 2012 21:18:51 +0000
(23:18 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Sat, 25 Aug 2012 21:18:51 +0000
(23:18 +0200)
src/callnotifier/Logger/CallFileTop.php
patch
|
blob
|
history
diff --git
a/src/callnotifier/Logger/CallFileTop.php
b/src/callnotifier/Logger/CallFileTop.php
index 4dc6b6c82a99fcdd28c6854a71d18fc067675593..58f3174a625e1ef8758b85071279c311d9dc5e81 100644
(file)
--- a/
src/callnotifier/Logger/CallFileTop.php
+++ b/
src/callnotifier/Logger/CallFileTop.php
@@
-18,7
+18,7
@@
class Logger_CallFileTop extends Logger_CallBase
protected $file;
/**
protected $file;
/**
- * Create a new file call logger.
+ * Create a new file call logger.
*
* @param string $file Path to the file to log the calls in.
* @param string $callTypes Which types of call to log:
*
* @param string $file Path to the file to log the calls in.
* @param string $callTypes Which types of call to log:
@@
-85,9
+85,18
@@
class Logger_CallFileTop extends Logger_CallBase
$this->addUnsetVars($call);
$str = ' ' . date('H:i', $call->start);
if ($call->type == CallMonitor_Call::INCOMING) {
$this->addUnsetVars($call);
$str = ' ' . date('H:i', $call->start);
if ($call->type == CallMonitor_Call::INCOMING) {
- $str .= ' von ' . str_pad($this->getNumberString($call, 'from'), 30);
+ $prefix = ' von ';
+ $numstr = $this->getNumberString($call, 'from');
} else {
} else {
- $str .= ' nach ' . str_pad($this->getNumberString($call, 'to'), 30);
+ $prefix = ' nach ';
+ $numstr = $this->getNumberString($call, 'to');
+ }
+
+ if ($this->callTypes == 'io') {
+ $str .= $prefix;
+ $str .= str_pad($numstr, 20);
+ } else {
+ $str .= ' ' . str_pad($numstr, 25);
}
$str .= ' ' . date('H:i:s', $call->end - $call->start - 3600);
}
$str .= ' ' . date('H:i:s', $call->end - $call->start - 3600);