Skip to content

Commit bac1731

Browse files
author
David Monllao
committed
Merge branch 'MDL-61573-master' of https://github.com/Kathrin84/moodle
2 parents 6ef7752 + df8eec5 commit bac1731

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

admin/settings/appearance.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
'customusermenuitems',
3333
new lang_string('customusermenuitems', 'admin'),
3434
new lang_string('configcustomusermenuitems', 'admin'),
35-
'grades,grades|/grade/report/mygrades.php|grades
36-
messages,message|/message/index.php|message
37-
preferences,moodle|/user/preferences.php|preferences',
35+
'grades,grades|/grade/report/mygrades.php|t/grades
36+
messages,message|/message/index.php|t/message
37+
preferences,moodle|/user/preferences.php|t/preferences',
3838
PARAM_RAW,
3939
'50',
4040
'10'

lang/en/admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
-Moodle development|https://moodle.org/development
193193
Moodle.com|http://moodle.com/
194194
</pre>';
195-
$string['configcustomusermenuitems'] = 'You can configure the contents of the user menu (with the exception of the log out link, which is automatically added). Each line is separated by pipe characters and consists of 1) a string in "langstringname, componentname" form or as plain text, 2) a URL, and 3) an icon either as a pix icon (in the folder pix/t, or prefix the icon name with ../ if icon is in another pix folder) or as a URL. Dividers can be used by adding a line of one or more # characters where desired.';
195+
$string['configcustomusermenuitems'] = 'You can configure the contents of the user menu (with the exception of the log out link, which is automatically added). Each line is separated by pipe characters and consists of 1) a string in "langstringname, componentname" form or as plain text, 2) a URL, and 3) an icon either as a pix icon (in the folder pix with the structure [subfoldername]/[iconname], e.g. i/publish) or as a URL. Dividers can be used by adding a line of one or more # characters where desired.';
196196
$string['configdbsessions'] = 'If enabled, this setting will use the database to store information about current sessions. Note that changing this setting now will log out all current users (including you). If you are using MySQL please make sure that \'max_allowed_packet\' in my.cnf (or my.ini) is at least 4M. Other session drivers can be configured directly in config.php, see config-dist.php for more information. This option disappears if you specify session driver in config.php file.';
197197
$string['configdebug'] = 'If you turn this on, then PHP\'s error_reporting will be increased so that more warnings are printed. This is only useful for developers.';
198198
$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.';

user/lib.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,17 @@ function user_convert_text_to_menu_items($text, $page) {
753753
$child->pix = $pixpath;
754754
} else {
755755
// Check for the specified image existing.
756-
$pixpath = "t/" . $bits[2];
756+
if (strpos($bits[2], '../') === 0) {
757+
// The string starts with '../'.
758+
// Strip off the first three characters - this should be the pix path.
759+
$pixpath = substr($bits[2], 3);
760+
} else if (strpos($bits[2], '/') === false) {
761+
// There is no / in the path. Prefix it with 't/', which is the default path.
762+
$pixpath = "t/{$bits[2]}";
763+
} else {
764+
// There is a '/' in the path - this is either a URL, or a standard pix path with no changes required.
765+
$pixpath = $bits[2];
766+
}
757767
if ($page->theme->resolve_image_location($pixpath, 'moodle', true)) {
758768
// Use the image.
759769
$child->pix = $pixpath;

0 commit comments

Comments
 (0)