Commit da3420bf authored by Richard Mansfield's avatar Richard Mansfield

Add 'custom' theme with raw parent, hidden in the interface (bug #814354)

Change-Id: I17c441f10b40152a314284205d45ef9b92babfc0
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent b2b7cd97
......@@ -40,6 +40,8 @@ define('TITLE', get_string('siteoptions', 'admin'));
$langoptions = get_languages();
$themeoptions = get_all_themes();
unset($themeoptions['custom']); // Only available for institution configurable themes
$yesno = array(true => get_string('yes'),
false => get_string('no'));
......
......@@ -614,6 +614,8 @@ function get_user_accessible_themes() {
}
$themes = array_merge(array('sitedefault' => '- ' . get_string('sitedefault', 'admin') . ' (' . $themes[get_config('theme')] . ') -'), $themes);
unset($themes['custom']);
return $themes;
}
......
......@@ -337,7 +337,7 @@ class View {
$owner->find_by_id($viewdata['owner']);
}
$ownertheme = $owner->get('theme');
if ($ownertheme && $ownertheme != get_config('theme')) {
if ($ownertheme && $ownertheme != get_config('theme') && $ownertheme != 'custom') {
$viewdata['theme'] = $ownertheme;
}
}
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2009 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage core
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2009 Catalyst IT Ltd http://catalyst.net.nz
*/
$theme = new StdClass;
$theme->displayname = 'Configurable Theme';
$theme->parent = 'raw';
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