mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-29768 debugstringids option did not do anything
This commit is contained in:
parent
6731a04d93
commit
2e98ae02ec
@ -168,7 +168,6 @@ $string['configdebug'] = 'If you turn this on, then PHP\'s error_reporting will
|
||||
$string['configdebugdisplay'] = 'Set to on, the error reporting will go to the HTML page. This is practical, but breaks XHTML, JS, cookies and HTTP headers in general. Set to off, it will send the output to your server logs, allowing better debugging. The PHP setting error_log controls which log this goes to.';
|
||||
$string['configdebugpageinfo'] = 'Enable if you want page information printed in page footer.';
|
||||
$string['configdebugsmtp'] = 'Enable verbose debug information during sending of email messages to SMTP server.';
|
||||
$string['configdebugstringids'] = 'This option is designed to help translators. It shows the language file and string id beside each string that is output. (Changing this setting will only take effect on the next page load.)';
|
||||
$string['configdebugvalidators'] = 'Enable if you want to have links to external validator servers in page footer. You may need to create new user with username <em>w3cvalidator</em>, and enable guest access. These changes may allow unauthorized access to server, do not enable on production sites!';
|
||||
$string['configdefaultallowedmodules'] = 'For the courses which fall into the above category, which modules do you want to allow by default <b>when the course is created</b>?';
|
||||
$string['configdefaulthomepage'] = 'This determines the home page for logged in users';
|
||||
@ -403,6 +402,7 @@ $string['debugnormal'] = 'NORMAL: Show errors, warnings and notices';
|
||||
$string['debugpageinfo'] = 'Show page information';
|
||||
$string['debugsmtp'] = 'Debug email sending';
|
||||
$string['debugstringids'] = 'Show origin of languages strings';
|
||||
$string['debugstringids_desc'] = 'This option is designed to help translators. When this option is enabled, if you add the parameter strings=1 to a request URL, it will show the language file and string id beside each string that is output.';
|
||||
$string['debugvalidators'] = 'Show validator links';
|
||||
$string['defaultallowedmodules'] = 'Default allowed modules';
|
||||
$string['defaultcity'] = 'Default city';
|
||||
|
@ -6695,6 +6695,7 @@ class install_string_manager implements string_manager {
|
||||
* @return string The localized string.
|
||||
*/
|
||||
function get_string($identifier, $component = '', $a = NULL) {
|
||||
global $CFG;
|
||||
|
||||
$identifier = clean_param($identifier, PARAM_STRINGID);
|
||||
if (empty($identifier)) {
|
||||
@ -6730,7 +6731,13 @@ function get_string($identifier, $component = '', $a = NULL) {
|
||||
}
|
||||
}
|
||||
|
||||
return get_string_manager()->get_string($identifier, $component, $a);
|
||||
$result = get_string_manager()->get_string($identifier, $component, $a);
|
||||
|
||||
// Debugging feature lets you display string identifier and component
|
||||
if ($CFG->debugstringids && optional_param('strings', 0, PARAM_INT)) {
|
||||
$result .= ' {' . $identifier . '/' . $component . '}';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user