- 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)
This commit is contained in:
parent
c7840909fa
commit
27aa0428c2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=298831
2 changed files with 12 additions and 2 deletions
|
@ -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
|
||||
|
|
9
www/asterisk-stat/files/pgsql__patch-call.log.php
Normal file
9
www/asterisk-stat/files/pgsql__patch-call.log.php
Normal file
|
@ -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";
|
Loading…
Reference in a new issue