aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorscheidell <scheidell@FreeBSD.org>2012-06-09 19:10:50 +0800
committerscheidell <scheidell@FreeBSD.org>2012-06-09 19:10:50 +0800
commit2fd5d46035de6a892dd0e6bedb8e2a21752bcb4d (patch)
tree58c05e39ad06e470fa4e6fa524cfbfa661935bca /www
parent53b47cc99f45ec635ed3f1bfed39474bc6931845 (diff)
downloadfreebsd-ports-gnome-2fd5d46035de6a892dd0e6bedb8e2a21752bcb4d.tar.gz
freebsd-ports-gnome-2fd5d46035de6a892dd0e6bedb8e2a21752bcb4d.tar.zst
freebsd-ports-gnome-2fd5d46035de6a892dd0e6bedb8e2a21752bcb4d.zip
- Fix pgsql select substring() problem
- pet portlint (gd.4 to gd.[4-9] in LIB_DEPENDS) - Bump PORTREVISION PR: ports/166662 Submitted by: Veselin Slavov <vess@slavof.net> Reviewed by: scheidell@ (me) Approved by: F. Kimura <jfkimura@yahoo.co.jp> (maintainer)
Diffstat (limited to 'www')
-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";