[ewiki] Re: ewiki_eventually_initialize()

I only got a few minute; to work on this today so I re-wrote the flags
check, could you tell me if this code correctly handles EWIKI_DB_F_DISABLED
and EWIKI_DB_F_SYSTEM?  When I have longer to work on it I'll look somewhat
closer at what is really going on here, perhaps consolidate all the
ewiki_auth calls in ewiki_page.

    #-- stop here if disabled page
    if (   !empty($data["flags"])) {
        switch($data["flags"] & EWIKI_DB_F_TYPE){
            case EWIKI_DB_F_DISABLED:
            case EWIKI_DB_F_SYSTEM:
                if(!EWIKI_PROTECTED_MODE || !ewiki_auth($id, $data, $action,
0, 1) ){
                    return(ewiki_t("DISABLEDPAGE")); 
                }
                break;
            case EWIKI_DB_F_BINARY:
                if ($pf = $ewiki_plugins["action_binary"][$action]){
                    if(EWIKI_PROTECTED_MODE && ewiki_auth($id, $data,
$action, false, 1) ){
                        return($pf($id, $data, $action));

                    }else{
                        return($ewiki_errmsg);
                    }                
                }else{
                    return(ewiki_t("DISABLEDPAGE")); 
                }
        }
    }

Andy

> > Just an early report that I'm seeing a bug in the new binary hook, I
> added
> > $ewiki_plugins["action_binary"]["info"] = "ewiki_page_info"; to my
> config
> > file and now all actions are allowed to run on the page.  I have to
> leave
> 
> Haven't seen this happen. Have you forgotten to logout (if you were admin
> during page flag setting).




Other related posts: