some small errors in calendar.php some small errors in calendar.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

some small errors in calendar.php

Started by Andi, February 07, 2005, 01:51:07 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Andi

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:
<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:
<link href="themes/<?= $CONFIG['theme'] ?>/style.css" rel="stylesheet" type="text/css">


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


And html-Validator says "missing doctype declaration"  ;)
hope, I could help you... :)

kegobeer

Doesn't your change completely remove the user theme option?  Wouldn't it be more appropriate to use this:

echo '<link rel="stylesheet" href="themes/' . ($USER['theme'] ? $USER['theme'] : $CONFIG['theme']) . '/style.css" />';
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Andi

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:

// 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']);
}
hope, I could help you... :)

Joachim Müller

self-assign, will commit shortly.

Joachim

Joachim Müller


Andi

Ok, it works fine :)

one small thing:
the <html> End-Tag is missing in this file
hope, I could help you... :)

Joachim Müller

added missing </html>-tag. Marking as fixed. Thanks for your great bug reports!

Joachim