Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2011-04-14 12:20:49 +0400
committermattpiwik <matthieu.aubry@gmail.com>2011-04-14 12:20:49 +0400
commit28786cb297949b84501266d5d27846ce8a9be972 (patch)
treebedcaca9484bcb2d9dfc0029bd07d426a245ad0a /plugins/DBStats/API.php
parentb067297c52657a2c9d2d2a43b4c46358e2147b2c (diff)
Fixes #1478
* Adding one sentence to one paragraph description of each API (feedback on the actual test is most welcome!) * This will be displayed on the API Reference page: http://piwik.org/docs/analytics-api/reference/ that's why it's pretty important :) * Adding table of contents in the API Page git-svn-id: http://dev.piwik.org/svn/trunk@4448 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/DBStats/API.php')
-rw-r--r--plugins/DBStats/API.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php
index 9e07cfc223..bdce31c12a 100644
--- a/plugins/DBStats/API.php
+++ b/plugins/DBStats/API.php
@@ -11,7 +11,8 @@
*/
/**
- *
+ * DBStats API is used to request the overall status of the Mysql tables in use by Piwik.
+ *
* @package Piwik_DBStats
*/
class Piwik_DBStats_API
@@ -44,6 +45,7 @@ class Piwik_DBStats_API
$link = mysql_connect($configDb['host'], $configDb['username'], $configDb['password']);
$status = mysql_stat($link);
mysql_close($link);
+ $status = explode(" ", $status);
}
else
{
@@ -55,14 +57,14 @@ class Piwik_DBStats_API
}
$status = array(
- 'Uptime: ' . $fullStatus['Uptime']['Value'],
- 'Threads: ' . $fullStatus['Threads_running']['Value'],
- 'Questions: ' . $fullStatus['Questions']['Value'],
- 'Slow queries: ' . $fullStatus['Slow_queries']['Value'],
- 'Opens: ', // not available via SHOW STATUS
- 'Flush tables: ' . $fullStatus['Flush_commands']['Value'],
- 'Open tables: ' . $fullStatus['Open_tables']['Value'],
- 'Queries per second avg: ', // not available via SHOW STATUS
+ 'Uptime' => $fullStatus['Uptime']['Value'],
+ 'Threads' => $fullStatus['Threads_running']['Value'],
+ 'Questions' => $fullStatus['Questions']['Value'],
+ 'Slow queries' => $fullStatus['Slow_queries']['Value'],
+ 'Flush tables' => $fullStatus['Flush_commands']['Value'],
+ 'Open tables' => $fullStatus['Open_tables']['Value'],
+// 'Opens: ', // not available via SHOW STATUS
+// 'Queries per second avg' =/ // not available via SHOW STATUS
);
}