daily-report.php fix

This commit is contained in:
SJ 2013-05-21 11:03:03 +02:00
parent e20af9d380
commit 74cd173eac
4 changed files with 16 additions and 11 deletions

5
configure vendored
View File

@ -4651,6 +4651,11 @@ if test "$have_icc_guide" = "yes" && test "$have_mysql" = "yes"; then
sql_libs="$sql_libs -lguide"
fi
if test "$have_psql" = "yes"; then
defs="$defs -DNEED_PSQL"
fi
if test "$have_multitenancy" = "yes"; then
echo "multitenancy support: yes"
defs="$defs -DHAVE_MULTITENANCY"

View File

@ -400,6 +400,11 @@ if test "$have_icc_guide" = "yes" && test "$have_mysql" = "yes"; then
sql_libs="$sql_libs -lguide"
fi
if test "$have_psql" = "yes"; then
defs="$defs -DNEED_PSQL"
fi
if test "$have_multitenancy" = "yes"; then
echo "multitenancy support: yes"
defs="$defs -DHAVE_MULTITENANCY"

View File

@ -8,15 +8,8 @@
#ifdef NEED_MYSQL
#include <mysql.h>
#endif
#ifdef NEED_SQLITE3
#include <sqlite3.h>
/* for older versions of sqlite3 do not have the sqlite3_prepare_v2() function, 2009.12.30, SJ */
#if SQLITE_VERSION_NUMBER < 3006000
#define sqlite3_prepare_v2 sqlite3_prepare
#endif
#ifdef NEED_PSQL
#include <libpq-fe.h>
#endif
#ifdef HAVE_TRE
#include <tre/tre.h>
@ -202,8 +195,9 @@ struct session_data {
#ifdef NEED_MYSQL
MYSQL mysql;
#endif
#ifdef NEED_SQLITE3
sqlite3 *db;
#ifdef NEED_PSQL
PGconn *psql;
char conninfo[SMALLBUFSIZE];
#endif
};

View File

@ -97,6 +97,7 @@ $mail = new ModelMailMail();
$averagesqlsizeraw = $sqlsizeraw / $counters['rcvd'];
$averagesphinxsizeraw = $sphinxsizeraw / $counters['rcvd'];
$averagesizedayraw = ($averagemessagesizeraw+$averagesqlsizeraw+$averagesphinxsizeraw) * $averagemessagesweekraw;
$datapart = 0;
foreach($shortdiskinfo as $part) {
if( $part['partition'] == DATA_PARTITION ) { $datapart = $part['freespace']*1024; }
}