Advanced search  

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

Pages: [1]   Go Down

Author Topic: some small errors in calendar.php  (Read 5383 times)

0 Members and 1 Guest are viewing this topic.

Andi

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
some small errors in calendar.php
« 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"  ;)
« Last Edit: February 20, 2005, 05:55:47 pm by GauGau »
Logged
hope, I could help you... :)

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: some small errors in calendar.php
« Reply #1 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" />';
Logged
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

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
Re: some small errors in calendar.php
« Reply #2 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']);
}
Logged
hope, I could help you... :)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: some small errors in calendar.php
« Reply #3 on: February 18, 2005, 05:20:11 pm »

self-assign, will commit shortly.

Joachim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: some small errors in calendar.php
« Reply #4 on: February 19, 2005, 07:46:24 am »

done, please confirm.

Joachim
Logged

Andi

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
Re: some small errors in calendar.php
« Reply #5 on: February 19, 2005, 01:22:33 pm »

Ok, it works fine :)

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: some small errors in calendar.php
« Reply #6 on: February 20, 2005, 05:55:13 pm »

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

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.