forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Andi on February 07, 2005, 01:51:07 am

Title: some small errors in calendar.php
Post by: Andi on February 07, 2005, 01:51:07 am
Hello :)

in file
  Coppermine version: 1.4.1
  $Source: /cvsroot/coppermine/devel/calendar.php,v $
  $Revision: 1.7 $
  $Author: nibbler999 $
  $Date: 2005/01/14 14:11:01 $

this code:
Code: [Select]
<link rel="stylesheet" href="themes/
<?php
if ($USER['theme']) {
    print 
$USER['theme'];
} else {
    print 
$CONFIG['theme'];
}
?>

/style.css" />
makes a linebreak after themes/ and the stylesheet does not load.

I've change this Lines to:
Code: [Select]
<link href="themes/<?= $CONFIG['theme'] ?>/style.css" rel="stylesheet" type="text/css">

And in line #74, this code:
Code: [Select]
        return "$s?action=".$_REQUEST['action']."&month=$month&year=$year";should be:
Code: [Select]
        return "$s?action=".$_REQUEST['action']."&amp;month=$month&amp;year=$year";

And html-Validator says "missing doctype declaration"  ;)
Title: Re: some small errors in calendar.php
Post by: kegobeer on February 07, 2005, 02:39:13 am
Doesn't your change completely remove the user theme option?  Wouldn't it be more appropriate to use this:

Code: [Select]
echo '<link rel="stylesheet" href="themes/' . ($USER['theme'] ? $USER['theme'] : $CONFIG['theme']) . '/style.css" />';
Title: Re: some small errors in calendar.php
Post by: Andi on February 07, 2005, 08:46:33 am
Hi :)

no, i think in cpg 1.4.x it's no problem.
The setting $CONFIG['theme'] is redeclared in init.inc.php, in dependence of the user attitude:

Code: [Select]
// Load theme file
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir(UDB_CPG_DIR.'themes/' . $USER['theme'])) {
    $CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________');
} else {
    unset($USER['theme']);
}
Title: Re: some small errors in calendar.php
Post by: Joachim Müller on February 18, 2005, 05:20:11 pm
self-assign, will commit shortly.

Joachim
Title: Re: some small errors in calendar.php
Post by: Joachim Müller on February 19, 2005, 07:46:24 am
done, please confirm.

Joachim
Title: Re: some small errors in calendar.php
Post by: Andi on February 19, 2005, 01:22:33 pm
Ok, it works fine :)

one small thing:
the <html> End-Tag is missing in this file
Title: Re: some small errors in calendar.php
Post by: Joachim Müller on February 20, 2005, 05:55:13 pm
added missing </html>-tag. Marking as fixed. Thanks for your great bug reports!

Joachim