custom css does not avoid standard css in some plugins!

Found a bug? Tell us!!
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

custom css does not avoid standard css in some plugins!

Post by stm999999999 »

some plugins have no or wrong code to detect wether the style.css has already a user defined css code for this plugin!

Here a list:

event_entrypaging:

line 142

Code: Select all

if (stristr('.serendipity_entrypaging', $addData)) {
wrong order! First the haystack and then the needle is correct! And it must be $eventData and not $addData!

Code: Select all

if (stristr($eventData,'.serendipity_entrypaging')) {

event_linklist.php

line 137 new code for css:

Code: Select all

                case 'css':
                    if ($this->get_config('style') == "dtree") {
                        if (stristr($eventData, '.dtree')) {
                            // class exists in CSS, so a user has customized it and we don't need default
                            return true;
                            break;
                        }                    
                        $filename = "serendipity_event_dtree.css";
                    } else {
                        if (stristr($eventData, '.linklist')) {
                            // class exists in CSS, so a user has customized it and we don't need default
                            return true;
                            break;
                        }
                        $filename = "serendipity_event_linklist.css";
                    }
                    $out = serendipity_getTemplateFile($filename, 'serendipityPath');
                    if ($out && $out != $filename) {
                        $eventData .= file_get_contents($out);
                    } else {
                        $eventData .= file_get_contents(dirname(__FILE__) . '/'.$filename);
                    }

                    return true;

                    break;
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Both plugins patched to reflect Stephan's fixes.
Post Reply