Menu

I need a little help to modify dumpstats.php

Help
Emiya
2005-07-18
2013-04-29
  • Emiya

    Emiya - 2005-07-18

    I'm trying to modify dumpstats.php to be able to use a variable (supplied by either a url or another include) to select what catagory the torrents are sorted by. I changed the folowing in the ds_DUMPTORRENTSTATS function

    131    function ds_DumpTorrentStats($dsConnectToDB = true,
    132            $dsCategory = "main",
    133            $dsOrder = $sort,
    134            $dsSortDescending = false,

    but I get the following error: Parse error: parse error, unexpected T_VARIABLE in /home/animeno/public_html/includes/torrent/dumpstats.php on line 133

    I'm still pretty new to php but I've tried every combination of brackets and quotes I could find but all produce some error. I would really appreciate any help on this I can get.

     
    • Dan

      Dan - 2005-07-19

      What you are trying to do is illegal. At the function declaration, those values are specified and used if a variable does not exist (i.e. you didn't specify it when calling the function.) These are static values and cannot be variables. This is why it is saying there is an unexpected variable in the error message.

      When using the dumpstats module you need to figure out what to sort by etc *prior* to calling one of the functions. Have your script decide how to sort and what category to use, then call the appropriate function.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.