Commit ad8e1a4a authored by Richard Mansfield's avatar Richard Mansfield
Browse files
parents da42551f ac4db857
......@@ -26,8 +26,8 @@
define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
define('TITLE', get_string('about'));
$smarty = smarty();
$smarty->assign('page_content', get_site_page_content('about'));
......
......@@ -26,9 +26,9 @@
define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('contactus'));
if ($USER->is_logged_in()) {
$userid = $USER->get('id');
......
......@@ -28,6 +28,7 @@ define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('forgotpassword'));
if (!session_id()) {
session_start();
......
......@@ -27,8 +27,8 @@
define('INTERNAL', 1);
define('PUBLIC', 1);
define('MENUITEM', 'home');
require('init.php');
define('TITLE', get_string('home'));
// Check for whether the user is logged in, before processing the page. After
// this, we can guarantee whether the user is logged in or not for this page.
......
......@@ -54,6 +54,12 @@ function TableRenderer(target, source, columns, options) {
}
if(!self.pager || self.pager.options.lastPage != Math.floor( (count-1) / limit ) + 1 ) {
if (self.pager) {
if (self.headRow) {
removeElement(self.headRow);
}
if (self.footRow) {
removeElement(self.footRow);
}
self.pager.removeAllInstances();
}
self.pager = new Pager(count, limit, {
......@@ -65,16 +71,22 @@ function TableRenderer(target, source, columns, options) {
'firstPageString': get_string('firstpage')
});
var headRow = TR(null, TD({'colspan': self.linkspan }, self.pager.newDisplayInstance()));
var footRow = TR(null, TD({'colspan': self.linkspan }, self.pager.newDisplayInstance()));
if (self.pager.options.lastPage == 1) {
self.headRow = null;
self.footRow = null;
return;
}
self.headRow = TR(null, TD({'colspan': self.linkspan }, self.pager.newDisplayInstance()));
self.footRow = TR(null, TD({'colspan': self.linkspan }, self.pager.newDisplayInstance()));
if ( self.thead.firstChild ) {
insertSiblingNodesBefore(self.thead.firstChild, headRow);
insertSiblingNodesBefore(self.thead.firstChild, self.headRow);
}
else {
appendChildNodes(self.thead, headRow);
appendChildNodes(self.thead, self.headRow);
}
appendChildNodes(self.tfoot, footRow);
appendChildNodes(self.tfoot, self.footRow);
}
}
......
......@@ -180,6 +180,13 @@ EOF;
$smarty->assign('THEMEURL', get_config('themeurl'));
$smarty->assign('WWWROOT', $wwwroot);
if (defined('TITLE')) {
$smarty->assign('PAGETITLE', TITLE . ' - ' . get_config('sitename'));
}
else {
$smarty->assign('PAGETITLE', get_config('sitename'));
}
$sitename = get_config('sitename');
$smarty->assign('title', $sitename);
......
......@@ -26,8 +26,8 @@
define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
define('TITLE', get_string('privacystatement'));
$smarty = smarty();
$smarty->assign('page_content', get_site_page_content('privacy'));
......
......@@ -28,6 +28,7 @@ define('INTERNAL', 1);
define('PUBLIC', 1);
define('MENUITEM', 'home');
require('init.php');
define('TITLE', get_string('register'));
/*
* This page handles three different tasks:
......
......@@ -26,8 +26,8 @@
define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
define('TITLE', get_string('termsandconditions'));
$smarty = smarty();
$smarty->assign('page_content', get_site_page_content('termsandconditions'));
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>{$title|default:"Mahara"|escape}</title>
<title>{$PAGETITLE|escape}</title>
<script type="text/javascript">
var config = {literal}{{/literal}
'themeurl': '{$THEMEURL}',
......
......@@ -26,7 +26,6 @@
define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
require_once('file.php');
......
......@@ -157,7 +157,10 @@ sub process {
print "($author) ", $directory, $filename, " has call to get_string that doesn't exist: get_string('$tag', '$section')\n";
}
}
}
print "\n";
# check for page titles
if ( $file_data =~ m{define.*\(.*INTERNAL.*1.*\)} and $file_data !~ m{define.*\(.*JSON.*1.*\)} and $file_data !~ m{define.*\(.*TITLE.*\)} ) {
print "($author) ", $directory, $filename, " is missing page title [ define('TITLE', get_string(...)); ]\n";
}
}
Supports Markdown
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