Commit 7884743b authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

Updated provision_stats module to be more recent. Hosting_stats still needs...

Updated provision_stats module to be more recent. Hosting_stats still needs more work before statistics will work as planned
parent c01e9848
name = Provision: Statistics
description = Generate statistics from a running Drupal site.
package = Provision
dependencies = drush
\ No newline at end of file
dependencies = provision
......@@ -9,14 +9,14 @@ function provision_stats_drush_command() {
function _provision_stats($url) {
#safety mechanism to ensure back end calls are not made via the front end.
if (!provision_confirm_drush()) return null;
$data = provision_get_site_data($url);
if (!$data['site-installed']) {
print t('The site %site has not been installed yet.', array('%site' => $url));
exit(PROVISION_FRAMEWORK_ERROR); #exit with error, so front end can catch it
if (!_provision_drupal_site_installed($url)) {
provision_log("error", "Site has not been installed yet.");
provision_output($url, $data);
$data = provision_get_site_data($url);
$rolled_back = provision_invoke("stats", $url, $data);
#needs to be done on active database
$modules = module_implements('provision_stats');
drupal_get_messages(); # clear the messages being saved so far.
......@@ -36,8 +36,8 @@ function _provision_stats($url) {
$stats = array_merge($stats, $func($url, $data));
return provision_output($url, $data, array('stats' => $stats));
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment