Changeset 1587

Show
Ignore:
Timestamp:
05/13/08 09:02:59 (2 months ago)
Author:
misja
Message:

Misja Hoebe <misja@curverider.co.uk> Fixes #329, thanks rho

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/elggadmin/lib/elggadmin.inc.php

    r1571 r1587  
    500500function elggadmin_loadtpl($tplname) { 
    501501    global $CFG; 
    502     $tpl = $CFG->templatesroot . 'Default_Template/' . $tplname; 
     502    $tpl = $CFG->templatesroot . $CFG->default_template . '/' . $tplname; 
    503503    if (!is_writable($tpl)) { 
    504504        elgg_messages_add(__gettext("Please specify that <code>$tpl</code> is world-writable in order to use this administration panel.")); 
     
    509509function elggadmin_savetpl($tplname, $content) { 
    510510    global $CFG; 
    511     $tpl = $CFG->templatesroot . 'Default_Template/' . $tplname; 
     511    $tpl = $CFG->templatesroot . $CFG->default_template . '/' . $tplname; 
    512512    if (elggadmin_writefile($tpl, $content)) { 
    513513        return true; 
  • devel/mod/template/lib/default_template.php

    r1571 r1587  
    33    global $template; 
    44    global $template_definition; 
     5    global $messages; 
     6 
    57    $sitename = $CFG->sitename; 
    68     
     
    3234    templates_add_context('pageshell', $CFG->templatesroot . $CFG->default_template . '/pageshell'); 
    3335     
    34     templates_add_context('frontpage_loggedout', $CFG->templatesroot . $CFG->default_template . '/frontpage_loggedout'); 
    35     templates_add_context('frontpage_loggedin', $CFG->templatesroot . $CFG->default_template . '/frontpage_loggedin'); 
     36    if (file_exists($CFG->templatesroot . $CFG->default_template . '/frontpage_loggedout')) { 
     37        templates_add_context('frontpage_loggedout', $CFG->templatesroot . $CFG->default_template . '/frontpage_loggedout'); 
     38    } else { 
     39        templates_add_context('frontpage_loggedout', $CFG->templatesroot . 'Default_Template/frontpage_loggedout'); 
     40        if (isadmin()) { 
     41            $messages[] = sprintf(__gettext('The default theme selected (%s) does not have <code>frontpage_loggedout</code> template. Using default template.'), $CFG->default_template); 
     42        } 
     43    }  
     44 
     45    if (file_exists($CFG->templatesroot . $CFG->default_template . '/frontpage_loggedin')) { 
     46        templates_add_context('frontpage_loggedin', $CFG->templatesroot . $CFG->default_template . '/frontpage_loggedin'); 
     47    } else { 
     48        templates_add_context('frontpage_loggedin', $CFG->templatesroot . 'Default_Template/frontpage_loggedin'); 
     49        if (isadmin()) { 
     50            $messages[] = sprintf(__gettext('The default theme selected (%s) does not have <code>frontpage_loggedin</code> template. Using default template.'), $CFG->default_template); 
     51        } 
     52 
     53    } 
    3654 
    3755    $template_definition[] = array(