Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Extracting variables
  • Posted: 19.01.2007, 20:06
     
    mbuna
    rank:
    Helper Helper
    registered:
     July 2002
    Status:
    offline
    last visit:
    27.10.08
    Posts:
    166
    Ok, I upgraded from .762 to .764 yesterday and now one of my custom modules is no longer working.

    It appears that none of the variables are being passed to the script. The vars are passed via the URL. For example:

    http://www.aquaria.info/modules.php?op=modload&file=fishspecies_query&name=database&txtstext=tetra&Submit.x=6&Submit.y=6

    Should pass the var named txtstext with a value of "tetra".

    The script has:

    $varName = array("criteria","txtstext","op","file","name");

    However nothing is getting put into var 'txtstext'.

    So, what has changed in .764 and what do I need to do to fix things.

    Thanks!

    Sean


    --
    http://www.Aquaria.info --> 30k user PostNuke site
    http://www.EngineSubmittal.com -- Free search engine submission
  • Posted: 20.01.2007, 19:21
     
    ZarToXidE
    rank:
    Helper Helper
    registered:
     January 2005
    Status:
    offline
    last visit:
    09.02.08
    Posts:
    455
    You should use $_GET'[txtstext'] and not $txtstext.

    Adding a few lines to your code should work:
    $txtstext = $_GET['txtstext'];

    Do that for each variable, and you'll be fine. I think

    --
    Doe Maar Freak
  • Posted: 20.01.2007, 22:29
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    offline
    last visit:
    09.11.08
    Posts:
    13413
    At least use the API intended for such tasks - $var = pnVarCleanFromInput('var');

    It seems like your code depended on register_globals = On, which in .764 is disabled to improve security.

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula