Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: File preview_info. How can a post be null ?

    Hi
    I'm still struggling here cause I'm not understanding the logic in this files.

    PHP Code:
    if (zen_not_null($_POST)) {
      
    $pInfo = new objectInfo($_POST);
      
    $products_name $_POST['products_name']; 
    If the POST was passed to $pInfo , why use $products_name ?
    Cause latter on it's again passed to $pInfo IF some $_GET['read'] is not set and not "only"

    PHP Code:
    for ($i 0$n sizeof($languages); $i $n$i++) {
          if (isset(
    $_GET['read']) && ($_GET['read'] == 'only')) {
            
    $pInfo->products_name zen_get_products_name($pInfo->products_id$languages[$i]['id']);
            
    $pInfo->products_description zen_get_products_description($pInfo->products_id$languages[$i]['id']);
            
    $pInfo->products_url zen_get_products_url($pInfo->products_id$languages[$i]['id']);
          } else {
            
    $pInfo->products_name zen_db_prepare_input($products_name[$languages[$i]['id']]);
            
    $pInfo->products_description zen_db_prepare_input($products_description[$languages[$i]['id']]);
            
    $pInfo->products_url zen_db_prepare_input($products_url[$languages[$i]['id']]);
          } 
    This makes sense if I could find that state "read = only" in the preview_info ... but I can't....
    When does it occur ?

    Thanks
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  2. #12
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: File preview_info. How can a post be null ?

    Until now I can only see this in GET

    Code:
    (
        [cPath] => 4
        [pID] => 56
        [action] => new_product_preview
    )
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  3. #13
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: File preview_info. How can a post be null ?

    You understand that $_GET variables are the parameters on the uri, correct? So, if the uri had &read=only in it, then the sub-logic you were asking about would obtain the related information from the database only and not allow changes to be incorporated.

    Also understand that some of the changes that have been made to version 1.5.6 have been to build/rebuild the software to the level of usage from their own perspective. I haven't seen discussion of an on-purpose removal, but there has been code in the store that allowed a sort of access without permissions condition. Like a way for someone to see at least some portions of the admin while in a restricted state. Some of that has been removed (for now). I suspect though that if there are those that will miss the feature that either a plugin will be added or the code reincorporated. For the moment, while I'd like to resubmit those sections, it seems that it needs to be more cohesive than just a few lines here or there.

    It's been a minute since I've looked at the structure of say the objectInfo result from setting the $_POST data to it, but what I see is that the fields of concern are those controlled by language selections. It almost appears as if there is some desire to ensure/force that the appropriate language designator(s) were used on the page posting to the preview_info page. Basically not trusting that the posted data was formatted as expected.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #14
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: File preview_info. How can a post be null ?

    thanks.
    The issue for me, is that I'm updating a code that I didn't made to work with other that I didn't made either.
    Trying to do things the best way, but I guess it's not possible, but it's not wise to ignore it, especially when a lot has change in 156.
    I have around 60 lines of fields verifications, that I can't see the use of it. But they are working where I can see then....

    Well.... ->MoveNext();

    Thanks
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  5. #15
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: File preview_info. How can a post be null ?

    Quote Originally Posted by mesnitu View Post
    I have around 60 lines of fields verifications, that I can't see the use of it. But they are working where I can see then....

    Well.... ->MoveNext();

    Thanks
    Are these field verifications performing sanitization? Like making sure that the data entered is an integer or clean text to support entry into the database?

    If so, then the sanization class should be better used which processes posted data before getting to any of these pages.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #16
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: File preview_info. How can a post be null ?

    Thanks.
    I guess that's it. And that's something that I need to learn also. Sanitize.
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  7. #17
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,489
    Plugin Contributions
    88

    Default Re: File preview_info. How can a post be null ?

    Quote Originally Posted by mesnitu View Post
    I was wondering something like that, but... you never know, because there's a lot of zencart stuff that I never used. Didn't need it to.
    It's somehow a very poetic ELSE, there's live in there, trap in a kind of aldous huxley lost world.
    ok! Less code. I like it

    Thanks
    Thanks for the reminder, @mesnitu, it's been a couple of years since I last read "A Brave New World". I'll need to hunt that up ...

  8. #18
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: File preview_info. How can a post be null ?

    Ups! Please don't do that!
    Don't know why I mentioned Aldous Huxley! I wanted to say Conan Doyle
    Anyway, author's apart, a very good book!
    I've been catching up, books that I've should've read and didn't! That was one!
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 7
    Last Post: 4 May 2016, 01:59 AM
  2. How to POST php file via jQuery?
    By tiffbrink in forum General Questions
    Replies: 0
    Last Post: 29 Mar 2011, 05:37 PM
  3. Replies: 0
    Last Post: 16 Oct 2010, 10:16 PM
  4. How do I post a PDF file here?
    By janissaire in forum General Questions
    Replies: 2
    Last Post: 13 Aug 2010, 09:27 PM
  5. Replies: 11
    Last Post: 15 Jan 2010, 04:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR