From eff4faea7f3c95440f02ea45d0be4f67236e2bf3 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 3 Nov 2010 22:13:10 +0000 Subject: Fixes #1320: Bundled mods use elgg_echo()'s internal string substitution. git-svn-id: http://code.elgg.org/elgg/trunk@7229 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/diagnostics/actions/download.php | 8 ++++---- mod/diagnostics/start.php | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mod/diagnostics') diff --git a/mod/diagnostics/actions/download.php b/mod/diagnostics/actions/download.php index 32ef5cbed..d429f2592 100644 --- a/mod/diagnostics/actions/download.php +++ b/mod/diagnostics/actions/download.php @@ -1,15 +1,15 @@ name); + + $output = elgg_echo('diagnostics:header', array(date('r'), get_loggedin_user()->name)); $output = trigger_plugin_hook('diagnostics:report', 'system', null, $output); - + header("Cache-Control: public"); header("Content-Description: File Transfer"); header('Content-disposition: attachment; filename=elggdiagnostic.txt'); diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index 52bd8a1d8..46a5e9e10 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -61,7 +61,7 @@ function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params) $version = get_version(); $release = get_version(true); - $returnvalue .= sprintf(elgg_echo('diagnostics:report:basic'), $release, $version); + $returnvalue .= elgg_echo('diagnostics:report:basic', array($release, $version)); return $returnvalue; } @@ -76,7 +76,7 @@ function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params) */ function diagnostics_plugins_hook($hook, $entity_type, $returnvalue, $params) { - $returnvalue .= sprintf(elgg_echo('diagnostics:report:plugins'), print_r(get_installed_plugins(), true)); + $returnvalue .= elgg_echo('diagnostics:report:plugins', array(print_r(get_installed_plugins(), true))); return $returnvalue; } @@ -122,7 +122,7 @@ function diagnostics_sigs_hook($hook, $entity_type, $returnvalue, $params) { global $CONFIG; - $returnvalue .= sprintf(elgg_echo('diagnostics:report:md5'), diagnostics_md5_dir($CONFIG->path)); + $returnvalue .= elgg_echo('diagnostics:report:md5', array(diagnostics_md5_dir($CONFIG->path))); return $returnvalue; } @@ -156,7 +156,7 @@ function diagnostics_phpinfo_hook($hook, $entity_type, $returnvalue, $params) } - $returnvalue .= sprintf(elgg_echo('diagnostics:report:php'), print_r($phpinfo, true)); + $returnvalue .= elgg_echo('diagnostics:report:php', array(print_r($phpinfo, true))); return $returnvalue; } @@ -175,7 +175,7 @@ function diagnostics_globals_hook($hook, $entity_type, $returnvalue, $params) global $CONFIG; $output = str_replace($CONFIG->dbpass, '<>', print_r($GLOBALS, true)); - $returnvalue .= sprintf(elgg_echo('diagnostics:report:globals'), $output); + $returnvalue .= elgg_echo('diagnostics:report:globals', array($output)); return $returnvalue; } -- cgit v1.2.3