Commit e82c0fcb authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1539262: Removing unnecessary $smarty PAGEHEADING lines



As they are set to TITLE we can just assign TITLE to PAGEHEADING in
the smarty function call.

We can later override the PAGEHRADING with
$smarty->assign('PAGEHEADING', string); if we need to.

Have also updated a few files where TITLE was not defined.

behatnotneeded - everything should work as before

Change-Id: I3ea592cd37344e68c6e90a3c64947cf99db59471
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 0280a4ce
......@@ -152,7 +152,6 @@ $smarty = smarty(array('paginator'));
$smarty->assign('options', $options);
$smarty->assign('type', $type);
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('deleteall', $deleteall);
$smarty->assign('activitylist', $activitylist);
$smarty->display('account/activity/index.tpl');
......@@ -320,5 +320,4 @@ function clearPasswords(form, data) {
}
}
");
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('account/index.tpl');
......@@ -235,5 +235,4 @@ $smarty->assign('memberform', $memberform);
$smarty->assign('requestedform', $requestedform);
$smarty->assign('invitedform', $invitedform);
$smarty->assign('joinform', $joinform);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('account/institutions.tpl');
......@@ -47,7 +47,6 @@ setpageicon($smarty, 'icon-puzzle-piece');
$smarty->assign('cleanurls', get_config('cleanurls'));
$smarty->assign('cleanurlconfig', $cleanurlconfig);
$smarty->assign('regenerateform', $regenerateform);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/extensions/cleanurls.tpl');
// Regenerates urlids for users, groups, and portfolio pages.
......
......@@ -53,5 +53,4 @@ setpageicon($smarty, 'icon-puzzle-piece');
$smarty->assign('reloadform', $reloadform);
$smarty->assign('newfiltersdescription', get_string('newfiltersdescription', 'admin', get_config('libroot') . 'htmlpurifiercustom'));
$smarty->assign('filters', $filters);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/extensions/filters.tpl');
......@@ -263,7 +263,6 @@ EOF;
$smarty = smarty();
setpageicon($smarty, 'icon-puzzle-piece');
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('editurls', $editurls);
$smarty->assign('newform', $newform);
......
......@@ -192,5 +192,4 @@ setpageicon($smarty, 'icon-puzzle-piece');
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('plugins', $plugins);
$smarty->assign('installlink', 'installplugin');
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/extensions/plugins.tpl');
......@@ -68,5 +68,4 @@ $smarty->assign('searchurl', $search['url']);
$smarty->assign('sortby', $search['sortby']);
$smarty->assign('sortdir', $search['sortdir']);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/groups/archives.tpl');
......@@ -78,7 +78,6 @@ EOF;
$smarty = smarty(array('paginator'));
setpageicon($smarty, 'icon-users');
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('searchform', $searchform);
$smarty->assign('results', $data);
......
......@@ -129,7 +129,6 @@ function groupadminsform_submit(Pieform $form, $values) {
$smarty = smarty();
setpageicon($smarty, 'icon-users');
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('quotasform', $quotasform);
$smarty->assign('groupname', $group->name);
$smarty->assign('managegroupform', $groupadminsform);
......
......@@ -381,5 +381,4 @@ $smarty = smarty(array('adminuploadcsv'));
setpageicon($smarty, 'icon-users');
$smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription);
$smarty->assign('uploadcsvform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/groups/uploadcsv.tpl');
......@@ -243,5 +243,4 @@ setpageicon($smarty, 'icon-users');
$smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription);
$smarty->assign('uploadcsvform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/groups/uploadcsv.tpl');
......@@ -210,5 +210,4 @@ $smarty->assign('introtext4', get_string('cookieconsentintro4', 'cookieconsent')
$smarty->assign('introtext5', get_string('cookieconsentintro51', 'cookieconsent', '<a href="http://sitebeam.net/cookieconsent/" target="_blank">', '</a>'));
// Official EU languages
$smarty->assign('languages', array('BG','CS','DA','DE','EL','EN','ES','ET','FI','FR','HU','IT','LT','LV','MT','NL','PL','PT','RO','SK','SL','SV'));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/site/cookieconsent.tpl');
......@@ -198,5 +198,4 @@ $data = array(
$smarty = smarty();
$smarty->assign('modifications', get_string('additionalmodifications','cookieconsent'));
$smarty->assign('data', $data);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/site/cookieconsent2.tpl');
......@@ -114,8 +114,6 @@ function license_submit(Pieform $form, $values) {
}
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('form', $form);
$smarty->assign('enabled', get_config('licensemetadata'));
$smarty->display('admin/site/license-edit.tpl');
......@@ -44,7 +44,6 @@ $extralicenses = get_column_sql("
$smarty = smarty();
setpageicon($smarty, 'icon-legal');
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('licenses', $licenses);
$smarty->assign('extralicenses', $extralicenses);
$smarty->assign('allowextralicenses', get_config('licenseallowcustom'));
......
......@@ -333,6 +333,5 @@ setpageicon($smarty, 'icon-bars');
$smarty->assign('INLINEJAVASCRIPT', $ijs);
$smarty->assign('MENUS', $menulist);
$smarty->assign('descriptionstrargs', array('<a href="' . get_config('wwwroot') . 'artefact/file/sitefiles.php">', '</a>'));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('footerform', $footerform);
$smarty->display('admin/site/menu.tpl');
......@@ -30,7 +30,6 @@ if (!$opensslext || !$curlext || !$xmlrpcext) {
$smarty = smarty();
setpageicon($smarty, 'icon-exchange');
$smarty->assign('PAGEHEADING', TITLE);
$missingextensions = array();
!$opensslext && $missingextensions[] = 'openssl';
!$curlext && $missingextensions[] = 'curl';
......@@ -172,5 +171,4 @@ function networkingform_submit(Pieform $form, $values) {
$smarty = smarty();
setpageicon($smarty, 'icon-exchange');
$smarty->assign('networkingform', $networkingform);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/site/networking.tpl');
......@@ -977,6 +977,5 @@ $thispage = json_encode(get_config('wwwroot') . 'admin/site/options.php');
$smarty = smarty(array('adminsiteoptions'));
setpageicon($smarty, 'icon-cogs');
$smarty->assign('siteoptionform', $siteoptionform);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->display('admin/site/options.tpl');
......@@ -93,5 +93,4 @@ $smarty = smarty(array('adminsitepages'), array(), array('admin' => array('disca
setpageicon($smarty, 'icon-pencil');
$smarty->assign('pageeditform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/site/pages.tpl');
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