1

Topic: Redirecting question

Is there any quick hack to disable redirecting screen wherever it's called by punbb?

Thanks

Sakis is my name, ssb just a nick.

Re: Redirecting question

You can set the redirect time to 0 in admin/options. The redirect screens will still be used, but they will only be shown for a very, very short time.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3 (edited by ssb 2004-03-07 13:06)

Re: Redirecting question

Yeah i know that, although i prefer to totaly disable redirecting. So i change redirect function as follows. It checks o_redirect_delay and disables redirecting screen if has been configured to empty ('') value.
Do you thing i will have any problem with that ? It works just fine here.

function redirect($destination, $message)
{
    global $pun_root, $pun_config, $lang_common, $cur_user;

    if ($destination == '')
        $destination = 'index.php';
   
    if ($pun_config['o_redirect_delay'] == ''){
        header('Location: '.$destination);
        exit;
    }

    ......

Btw i was trying the above mod, when i noticed that punbb halts on redirecting screen if setting a delay of null. I believe that's a bug. (Of course it works fine after the above hack)
Afaik you had similar issues when topics/posts per page fields were left empty. Do you have any idea about a validation routine in admin_options.php ?
For now i'm thinking a per key validation inside loop while (list($key, $input) = @each($form))
Unfortunately i don't know the exact min/max and default values for all fields to write such a function.

PS: You really write smart clean and self commented code, well done Rick

Sakis is my name, ssb just a nick.

Re: Redirecting question

The redirect screens are there for a reason. To give the user feedback on what is happening.

The issue with null values in admin/options and admin/permissions has been fixed and will appear in the next release. Have a look at the entry made on 2004-02-23 in http://punbb.org/changelogs/1.1.2_to_1.1.3.txt

"Programming is like sex: one mistake and you have to support it for the rest of your life."