Camen Design Forum


(Leave this as-is, it’s a trap!)

To delete this thread, and all replies to it, you must be either the original author or a designated moderator.

(NNF) Sticky function missing $url variable


Sticky function missing $url variable, php gives error:

Notice: Undefined variable: url in thread.php on line 61

if (    (isset ($_POST['stick']) || isset ($_POST['unstick'])) &&
        //the site admin, or the first mod of the sub-forum have stick / unstick rights
        (IS_ADMIN || strtolower (NAME) === strtolower ((string) @$MODS['LOCAL'][0]))
) {
        //add or remove the filename from "sticky.txt"
        if (in_array ("$FILE.rss", $stickies = getStickies ())) {
                $stickies = array_diff ($stickies, array ("$FILE.rss"));
        } else {
                $stickies[] = "$FILE.rss";
        file_put_contents ('sticky.txt', implode ("\r\n", $stickies), LOCK_EX);
        //regenerate the folder's RSS file
        indexRSS ();
        //redirect to eat the form submission
        header ("Location: $url", true, 303);

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn