aboutsummaryrefslogtreecommitdiff
path: root/www/asterisk-stat
diff options
context:
space:
mode:
authorMichael Scheidell <scheidell@FreeBSD.org>2012-06-09 11:10:50 +0000
committerMichael Scheidell <scheidell@FreeBSD.org>2012-06-09 11:10:50 +0000
commit27aa0428c2424395ec993196219ba9b20893109a (patch)
tree969577c5b5eb9dc023b3c0eedc9938dd59b3adda /www/asterisk-stat
parentc7840909fab10f16d03f09bd4fad67c4ffcf21be (diff)
downloadports-27aa0428c2424395ec993196219ba9b20893109a.tar.gz
ports-27aa0428c2424395ec993196219ba9b20893109a.zip
Notes
Diffstat (limited to 'www/asterisk-stat')
-rw-r--r--www/asterisk-stat/Makefile5
-rw-r--r--www/asterisk-stat/files/pgsql__patch-call.log.php9
2 files changed, 12 insertions, 2 deletions
diff --git a/www/asterisk-stat/Makefile b/www/asterisk-stat/Makefile
index f94d925b44c9..36d1e0fddd8a 100644
--- a/www/asterisk-stat/Makefile
+++ b/www/asterisk-stat/Makefile
@@ -7,7 +7,7 @@
PORTNAME= asterisk-stat
PORTVERSION= 2.0.1
-PORTREVISION= 11
+PORTREVISION= 12
CATEGORIES= www
MASTER_SITES= http://www.areski.net/${SITE_SUBDIR}/
DISTNAME= ${PORTNAME}-v${PORTVERSION:S/./_/g}
@@ -15,7 +15,7 @@ DISTNAME= ${PORTNAME}-v${PORTVERSION:S/./_/g}
MAINTAINER= jfkimura@yahoo.co.jp
COMMENT= ASTERISK Call Detail Records Analizer
-LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd
+LIB_DEPENDS= gd.[4-9]:${PORTSDIR}/graphics/gd
NO_BUILD= yes
USE_PHP= session gd pcre
@@ -32,6 +32,7 @@ OPTIONS= PGSQL "Use PostgreSQL instead of MySQL" off
.if defined(WITH_PGSQL)
ASTERISKSTATDB= pgsql
+EXTRA_PATCHES+= ${FILESDIR}/pgsql__patch-call.log.php
.else
ASTERISKSTATDB= mysql
RUN_DEPENDS+= ${LOCALBASE}/lib/asterisk/modules/cdr_addon_mysql.so:${PORTSDIR}/net/asterisk16-addons
diff --git a/www/asterisk-stat/files/pgsql__patch-call.log.php b/www/asterisk-stat/files/pgsql__patch-call.log.php
new file mode 100644
index 000000000000..32dee4bf9ba0
--- /dev/null
+++ b/www/asterisk-stat/files/pgsql__patch-call.log.php
@@ -0,0 +1,9 @@
+--- call-log.php.orig 2012-04-05 10:48:18.000000000 +0300
++++ call-log.php 2012-04-05 10:48:29.000000000 +0300
+@@ -229,7 +229,7 @@
+
+
+ /************************/
+- $QUERY = "SELECT substring(calldate,1,10) AS day, sum(duration) AS calltime, count(*) as nbcall FROM cdr WHERE ".$FG_TABLE_CLAUSE." GROUP BY substring(calldate,1,10)"; //extract(DAY from calldate)
++ $QUERY = "SELECT cast(calldate as date) AS day, sum(duration) AS calltime, count(*) as nbcall FROM cdr WHERE ".$FG_TABLE_CLAUSE." GROUP BY cast(calldate as date) order by 1 desc"; //extract(DAY from calldate)
+ //echo "$QUERY";