mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:50:11 +01:00
daily-report.php fix
This commit is contained in:
parent
e20af9d380
commit
74cd173eac
5
configure
vendored
5
configure
vendored
@ -4651,6 +4651,11 @@ if test "$have_icc_guide" = "yes" && test "$have_mysql" = "yes"; then
|
|||||||
sql_libs="$sql_libs -lguide"
|
sql_libs="$sql_libs -lguide"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$have_psql" = "yes"; then
|
||||||
|
defs="$defs -DNEED_PSQL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "$have_multitenancy" = "yes"; then
|
if test "$have_multitenancy" = "yes"; then
|
||||||
echo "multitenancy support: yes"
|
echo "multitenancy support: yes"
|
||||||
defs="$defs -DHAVE_MULTITENANCY"
|
defs="$defs -DHAVE_MULTITENANCY"
|
||||||
|
@ -400,6 +400,11 @@ if test "$have_icc_guide" = "yes" && test "$have_mysql" = "yes"; then
|
|||||||
sql_libs="$sql_libs -lguide"
|
sql_libs="$sql_libs -lguide"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$have_psql" = "yes"; then
|
||||||
|
defs="$defs -DNEED_PSQL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "$have_multitenancy" = "yes"; then
|
if test "$have_multitenancy" = "yes"; then
|
||||||
echo "multitenancy support: yes"
|
echo "multitenancy support: yes"
|
||||||
defs="$defs -DHAVE_MULTITENANCY"
|
defs="$defs -DHAVE_MULTITENANCY"
|
||||||
|
16
src/defs.h
16
src/defs.h
@ -8,15 +8,8 @@
|
|||||||
#ifdef NEED_MYSQL
|
#ifdef NEED_MYSQL
|
||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef NEED_SQLITE3
|
#ifdef NEED_PSQL
|
||||||
#include <sqlite3.h>
|
#include <libpq-fe.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
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_TRE
|
#ifdef HAVE_TRE
|
||||||
#include <tre/tre.h>
|
#include <tre/tre.h>
|
||||||
@ -202,8 +195,9 @@ struct session_data {
|
|||||||
#ifdef NEED_MYSQL
|
#ifdef NEED_MYSQL
|
||||||
MYSQL mysql;
|
MYSQL mysql;
|
||||||
#endif
|
#endif
|
||||||
#ifdef NEED_SQLITE3
|
#ifdef NEED_PSQL
|
||||||
sqlite3 *db;
|
PGconn *psql;
|
||||||
|
char conninfo[SMALLBUFSIZE];
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,6 +97,7 @@ $mail = new ModelMailMail();
|
|||||||
$averagesqlsizeraw = $sqlsizeraw / $counters['rcvd'];
|
$averagesqlsizeraw = $sqlsizeraw / $counters['rcvd'];
|
||||||
$averagesphinxsizeraw = $sphinxsizeraw / $counters['rcvd'];
|
$averagesphinxsizeraw = $sphinxsizeraw / $counters['rcvd'];
|
||||||
$averagesizedayraw = ($averagemessagesizeraw+$averagesqlsizeraw+$averagesphinxsizeraw) * $averagemessagesweekraw;
|
$averagesizedayraw = ($averagemessagesizeraw+$averagesqlsizeraw+$averagesphinxsizeraw) * $averagemessagesweekraw;
|
||||||
|
$datapart = 0;
|
||||||
foreach($shortdiskinfo as $part) {
|
foreach($shortdiskinfo as $part) {
|
||||||
if( $part['partition'] == DATA_PARTITION ) { $datapart = $part['freespace']*1024; }
|
if( $part['partition'] == DATA_PARTITION ) { $datapart = $part['freespace']*1024; }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user