Re: 1 cset was pushed to modules/xarpages: Minor bug fix. Now using the themes osdi...

Brian McGilligan <brian-4Y3+cfMDcQXD0D/[email protected]>
Newsgroups gmane.comp.cms.xaraya.bk-notices
Organization Xaraya
Message-ID <[email protected]>
Jason Judge wrote:

> Nope. If xarTplSetThemeName() is not setting the theme by its *name* then it
> is that which needs fixing. Bug 3876 is tracking this problem. We should fix
> it from that end.
> 
> -- JJ


So

function xarTplSetThemeName($themeName)
{
     assert('$themeName != "" && $themeName{0} != "/"');
     if (!file_exists($GLOBALS['xarTpl_themesBaseDir'].'/'.$themeName)) {
         return false;
     }

     xarTpl__SetThemeNameAndDir($themeName);
     return true;
}


should be

function xarTplSetThemeName($themeName)
{
     $themeInfo = xarModInfo(xarModGetIDFromName($themeName, 'theme'), 
'theme');
     $themeDir = $themeInfo['osdirectory'];
     assert('$themeDir != "" && $themeDir{0} != "/"');
     if (!file_exists($GLOBALS['xarTpl_themesBaseDir'].'/'.$themeDir)) {
         return false;
     }

     xarTpl__SetThemeNameAndDir($themeName);
     return true;
}

or something like it, right?

I'll go ahead and undo my commit to xarPages. Sorry about messing with 
xarPages.

Brian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.