pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uploading demos to the level comment tool


From: Björn Fischer
Subject: Re: Uploading demos to the level comment tool
Date: Sat, 17 Apr 2004 13:46:24 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113

Rune Zedeler wrote:

I have uploaded a demo for crystal-10-rz, but it does not appear.


I tried to upload one too. An I saw the same... didn't work in any way...
That's bad because on my local apache this works...

It seems like the condition in
---------------------------
if ( isset($_POST["adddemo"]))
---------------------------

does never become true... I don't know how this can be, because
---------------------------
if ( isset($_POST["addcomment"]))
---------------------------

works the same way.
I would like to try to replace the condition by '$_POST["adddemo"] == 1' maybe that works...

I attached a patch for this. I can't say if it works afterwards but I think it's worth a try.

Greetings

Björn

P.S.: David, what PHP editor do you use? I use proton. But I just found that proton changes quite a lot in the file even if I change only one line... The first patch I made was quite huge for just this one line, so I used notepad for this change. Does anybody know a good editor that is better in such cases?
Index: Pingus/contrib/level_comment_tool/index.php
===================================================================
--- Pingus/contrib/level_comment_tool/index.php (revision 2292)
+++ Pingus/contrib/level_comment_tool/index.php (working copy)
@@ -412,7 +412,7 @@
        // ==================================================================
     // Save uploaded Demofile
     // ==================================================================
-    if ( isset($_POST["adddemo"]))
+    if ( $_POST["adddemo"] == 1)
     {
       //create directory if necessary
       if ( !is_dir("comments/$c/$l/demos") &&

reply via email to

[Prev in Thread] Current Thread [Next in Thread]