mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
MDL-78806 core: Remove redundant site name
MDL-78806 core: Remove redundant site name on page titles * With the site name now being appended to the page titles, there is no need to manually append the page titles.
This commit is contained in:
parent
ff553e5cf4
commit
1eb8ee32bb
43 changed files with 62 additions and 63 deletions
|
@ -143,7 +143,7 @@ if ($action === 'delete') {
|
|||
'sesskey' => sesskey(),
|
||||
'courseid' => $courseid);
|
||||
$optionsno = array('userid' => $entry->userid, 'courseid' => $courseid);
|
||||
$PAGE->set_title("$SITE->shortname: $strblogs");
|
||||
$PAGE->set_title($strblogs);
|
||||
$PAGE->set_heading($SITE->fullname);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
|
@ -164,11 +164,11 @@ if ($action === 'delete') {
|
|||
}
|
||||
} else if ($action == 'add') {
|
||||
$editmodetitle = $strblogs . ': ' . get_string('addnewentry', 'blog');
|
||||
$PAGE->set_title("$SITE->shortname: $editmodetitle");
|
||||
$PAGE->set_title($editmodetitle);
|
||||
$PAGE->set_heading(fullname($USER));
|
||||
} else if ($action == 'edit') {
|
||||
$editmodetitle = $strblogs . ': ' . get_string('editentry', 'blog');
|
||||
$PAGE->set_title("$SITE->shortname: $editmodetitle");
|
||||
$PAGE->set_title($editmodetitle);
|
||||
$PAGE->set_heading(fullname($USER));
|
||||
}
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ navigation_node::override_active_url(new moodle_url('/blog/external_blogs.php'))
|
|||
$PAGE->navbar->add(get_string('addnewexternalblog', 'blog'));
|
||||
|
||||
$PAGE->set_heading(fullname($USER));
|
||||
$PAGE->set_title("$SITE->shortname: $strblogs: $strexternalblogs");
|
||||
$PAGE->set_title("$strblogs: $strexternalblogs");
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($strformheading, 2);
|
||||
|
|
|
@ -67,7 +67,7 @@ if ($delete && confirm_sesskey()) {
|
|||
$blogs = $DB->get_records('blog_external', array('userid' => $USER->id));
|
||||
|
||||
$PAGE->set_heading(fullname($USER));
|
||||
$PAGE->set_title("$SITE->shortname: $strblogs: $strexternalblogs");
|
||||
$PAGE->set_title("$strblogs: $strexternalblogs");
|
||||
$PAGE->set_pagelayout('standard');
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
|
19
blog/lib.php
19
blog/lib.php
|
@ -716,9 +716,10 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
|
|||
// Note: if action is set to 'add' or 'edit', we do this at the end.
|
||||
if (empty($entryid) && empty($modid) && empty($courseid) && empty($userid) && !in_array($action, array('edit', 'add'))) {
|
||||
$PAGE->navbar->add($strblogentries, $blogurl);
|
||||
$PAGE->set_title($site->fullname);
|
||||
$strsiteblog = get_string('siteblogheading', 'blog');
|
||||
$PAGE->set_title($strsiteblog);
|
||||
$PAGE->set_heading($site->fullname);
|
||||
$headers['heading'] = get_string('siteblogheading', 'blog');
|
||||
$headers['heading'] = $strsiteblog;
|
||||
}
|
||||
|
||||
// Case 2: only entryid is requested, ignore all other filters. courseid is used to give more contextual information.
|
||||
|
@ -742,9 +743,10 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
|
|||
|
||||
$blogurl->remove_params('userid');
|
||||
$PAGE->navbar->add($entry->subject, $blogurl);
|
||||
$PAGE->set_title("$shortname: " . fullname($user) . ": $entry->subject");
|
||||
$blogentryby = get_string('blogentrybyuser', 'blog', fullname($user));
|
||||
$PAGE->set_title($entry->subject . moodle_page::TITLE_SEPARATOR . $blogentryby);
|
||||
$PAGE->set_heading("$shortname: " . fullname($user) . ": $entry->subject");
|
||||
$headers['heading'] = get_string('blogentrybyuser', 'blog', fullname($user));
|
||||
$headers['heading'] = $blogentryby;
|
||||
|
||||
// We ignore tag and search params.
|
||||
if (empty($action) || !$CFG->useblogassociations) {
|
||||
|
@ -758,7 +760,7 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
|
|||
|
||||
$shortname = format_string($site->shortname, true, array('context' => context_course::instance(SITEID)));
|
||||
$blogurl->param('userid', $userid);
|
||||
$PAGE->set_title("$shortname: " . fullname($user) . ": " . get_string('blog', 'blog'));
|
||||
$PAGE->set_title(fullname($user) . ": " . get_string('blog', 'blog'));
|
||||
$PAGE->set_heading("$shortname: " . fullname($user) . ": " . get_string('blog', 'blog'));
|
||||
$headers['heading'] = get_string('userblog', 'blog', fullname($user));
|
||||
$headers['strview'] = get_string('viewuserentries', 'blog', fullname($user));
|
||||
|
@ -766,9 +768,10 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
|
|||
} else if (!$CFG->useblogassociations && empty($userid) && !in_array($action, array('edit', 'add'))) {
|
||||
// Case 4: No blog associations, no userid.
|
||||
|
||||
$PAGE->set_title($site->fullname);
|
||||
$strsiteblog = get_string('siteblogheading', 'blog');
|
||||
$PAGE->set_title($strsiteblog);
|
||||
$PAGE->set_heading($site->fullname);
|
||||
$headers['heading'] = get_string('siteblogheading', 'blog');
|
||||
$headers['heading'] = $strsiteblog;
|
||||
} else if (!empty($userid) && !empty($modid) && empty($entryid)) {
|
||||
// Case 5: Blog entries associated with an activity by a specific user (courseid ignored).
|
||||
|
||||
|
@ -781,7 +784,7 @@ function blog_get_headers($courseid=null, $groupid=null, $userid=null, $tagid=nu
|
|||
$PAGE->navbar->add(fullname($user), "$CFG->wwwroot/user/view.php?id=$user->id");
|
||||
$PAGE->navbar->add($strblogentries, $blogurl);
|
||||
|
||||
$PAGE->set_title("$shortname: $cm->name: " . fullname($user) . ': ' . get_string('blogentries', 'blog'));
|
||||
$PAGE->set_title(fullname($user) . ': ' . get_string('blogentries', 'blog') . moodle_page::TITLE_SEPARATOR . $cm->name);
|
||||
$PAGE->set_heading("$shortname: $cm->name: " . fullname($user) . ': ' . get_string('blogentries', 'blog'));
|
||||
|
||||
$a = new stdClass();
|
||||
|
|
|
@ -95,7 +95,7 @@ $site = get_site();
|
|||
$strpreferences = get_string('preferences');
|
||||
$strblogs = get_string('blogs', 'blog');
|
||||
|
||||
$title = "$site->shortname: $strblogs : $strpreferences";
|
||||
$title = "$strblogs : $strpreferences";
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_heading(fullname($USER));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue