IntegraMOD / IntegraMOD151

The most complete premodded forum software
http://integramod.com
4 stars 4 forks source link

Backward/Forward buttons on the index calendar don't seem to work #60

Closed vendethiel closed 5 years ago

vendethiel commented 5 years ago

image

Here, we see that the calendar has two arrows: previous and next month. They generate ?month=1 and ?month=-1 in the URL, but they don't seem to do anything.

MWE001 commented 5 years ago

Correct. Neither does mine.

MWE001 commented 5 years ago

Oops, 1 second on this one. I think I know why.

MWE001 commented 5 years ago

Something screwy is going on with the java or what ever it is. It just worked a couple days ago. I can no longer set a date and time. The calendar jumps up in the text box and when I click a date it sends it without allowing me to chose a time.

I do know without a doubt, once you get a time and date for a calendar event scheduled into the next month or of there was was a past event, it does work just fine (the arrows). I just tried it on the site I tore down a few days ago.

MWE001 commented 5 years ago

Well, I got a time and date set (that calendar sucks) and a post made and yeah, them arrow are not working. All it does is a page refresh.

MWE001 commented 5 years ago

Ok so I was partially right.

The other day my testing did work, but it was not the arrows. If you click the month in between the arrows, it will open the big calendar. Form there, if you click the arrows, it will move forwards and backwards by the month. Maybe we can figure out how it works by viewing the arrow keys on the big calendar and comparing to them on the portal block arrows.

vendethiel commented 5 years ago

OK, so i'll take a look

MWE001 commented 5 years ago

Helter has a test website and it works on a default IM 141 install. It also works on a old file 150 install. I think we talked about this already (??) and decided it got broke along the way somewhere. I am 100% positive I have an old 141 install not so sure how old of a 150 install I have after my brilliant Hard drive reformat fiasco a month or 2 back.

vendethiel commented 5 years ago

Yes, we talked about it on the im.com board already.

I have been busy with other stuff. I won’t forget tho

vendethiel commented 5 years ago

OK So I found the fix. It's when we moved from $HTTP_GET_VARS to $_GET. Some replacements weren't done yet. Now it's fixed.

IntegraMOD commented 5 years ago

I see a problem in common.php

this

// PHP5 with register_long_arrays off?
if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off'))
{
    $_POST = $_POST;
    $_GET = $_GET;
    $_SERVER = $_SERVER;
    $_COOKIE = $_COOKIE;
    $_ENV = $_ENV;
    $_FILES = $_FILES;

    // _SESSION is the only superglobal which is conditionally set
    if (isset($_SESSION))
    {
        $_SESSION = $_SESSION;
    }
}

should be this

// PHP5 with register_long_arrays off?
if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off'))
{
    $HTTP_POST_VARS = $_POST;
    $HTTP_GET_VARS = $_GET;
    $HTTP_SERVER_VARS = $_SERVER;
    $HTTP_COOKIE = $_COOKIE;
    $HTTP_ENV_VARS = $_ENV;
    $HTTP_POST_FILES = $_FILES;

    // _SESSION is the only superglobal which is conditionally set
    if (isset($_SESSION))
    {
        $HTTP_SESSION_VARS = $_SESSION;
    }
}
vendethiel commented 5 years ago

Yeah seems to be the crux of all the issues... oops

IntegraMOD commented 5 years ago

Had i been a little more forward thinking i would have made similar rules for ereg/eregi. It would have made adding old mods to IM151 much easier. Only problem is I don’t know how to make a rule for

$tmp = ereg_replace(“.”.$phpEx,””,$file);

Its just been way too long since i dealt with php

vendethiel commented 5 years ago

You can take a look at the admin_blocks file in last GIT version. Since there is no dynamic match, a simple str_replace('.'.$phpEx, '', $file); is enough (and more efficient).

vendethiel commented 5 years ago

Fixed in a96aa4b722e717d13c182922efbf1dbedf057a07, then Helter's fix was applied in c39acb0b0ba9f3a2d77bd3ac01b9dccb6f67eb0b. That commit message is wrong, I thought I had it the other way around.

Anyway it works now and such bugs shouldn't occur anymore.

IntegraMOD commented 5 years ago

I made a typo $HTTP_COOKIE = $_COOKIE; should be $HTTP_COOKIE_VARS = $_COOKIE;

vendethiel commented 5 years ago

will be fixed in the next commit