Changeset 125

Show
Ignore:
Timestamp:
12/02/07 16:55:01 (1 year ago)
Author:
pdingle
Message:

added debug levels to printDebug! Fixed Wordpress clickback protocol mismatch. Added PW_DEBUG_LEVEL to pw_config.php

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/RB-0.9/wp-infocard/pw-config.php

    r123 r125  
    1111define ('PW_USECAPTCHAS', false ); 
    1212define ('PW_DEBUG_ON', get_settings('pw_debug_on')); 
     13define ('PW_DEBUG_LEVEL', '0'); 
    1314define ('PW_SELECTOR_TRIGGER', get_settings('pw_selector_trigger')); 
    1415define ('PW_CUSTOM_DATA', get_settings('pw_custom_data')); 
  • branches/RB-0.9/wp-infocard/wp/clickback.pw.php

    r106 r125  
    4242                } 
    4343 
    44         pw_utils::printDebug("Clickback: Challenge Created. <br/>" 
    45                         . "Clickback: salted data is " . (($data)?$data:"empty") . "<br/>" 
    46                         . "Clickback: length is " . PW_CLICKBACK_LENGTH  
    47                         . "<br/>Clickback: salt is $clickback_salt <br/>"); 
     44        pw_utils::printDebug("Clickback: Challenge Created (" . PW_CLICKBACK_LENGTH . " characters)<br/>"); 
     45        pw_utils::printDebug("<ul><li>salted data is " . (($data)?$data:"empty") . "</li>" 
     46                        . "<li>Clickback: salt is $clickback_salt </li>", 2); 
    4847 
    4948                $data = MD5($clickback_salt . $data); 
     
    5150                $chopped = substr($data, 0, PW_CLICKBACK_LENGTH); 
    5251 
    53         pw_utils::printDebug("Clickback: Hash of the salted challenge data: $data<br/>" 
    54                         . "Clickback: Chopped challenge data: $chopped <br/>"); 
     52        pw_utils::printDebug("<li>Hash of the salted challenge data: $data</li>" 
     53                        . "<li>Chopped challenge data: $chopped</li></ul>", 2); 
    5554 
    5655                return ($chopped); 
  • branches/RB-0.9/wp-infocard/wp/login/infocard-clickback.php

    r98 r125  
    2121        </title> 
    2222        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    23         <link rel="stylesheet" href="<?php pw_utils::printCSSlink(); ?>" type="text/css" /> 
     23        <link rel="stylesheet" href="<?php pw_utils::printCSSlink('ssl'); ?>" type="text/css" /> 
    2424        <script type="text/javascript" src="<?php echo pw_utils::printJqueryLocation(); ?>"></script> 
    2525        <script> 
     
    101101        </div> 
    102102        <div id="pw_login_footer"> 
    103                 <a id="pw_pamelaproject_logo" href="http://pamelaproject.com" alt="Powered by PamelaWare"><img src='<?php pw_utils::displayPamelaProjectLogo(); ?>' /></a> 
     103                <a id="pw_pamelaproject_logo" href="https://pamelaproject.com" alt="Powered by PamelaWare"><img src='<?php pw_utils::displayPamelaProjectLogo('ssl'); ?>' /></a> 
    104104        </div> 
    105105  </div> 
  • branches/RB-0.9/wp-infocard/wp/userdata.pw.php

    r124 r125  
    215215                $userdata = compact('user_login', 'user_pass', 'user_email', 'user_nicename', 'user_url', 'display_name', 'first_name', 'last_name'); 
    216216 
    217                 pw_utils::printDebug("<br/>Action: createNewAccount<br>"); 
    218217                $user_ID = wp_insert_user($userdata); 
    219218 
    220219                if ($user_ID) 
    221220                { 
    222                         pw_utils::printDebug("&nbsp;Inserted record # $user_ID<br>"); 
    223221                        $datamap['user_login']->add_db_value($datamap['user_login']->new_value); 
     222                        pw_utils::printDebug("<br />Created New Account with ID: " . $user_ID . "<br />"); 
    224223                        return $user_ID; 
    225224                }  
    226225                else  
    227226                { 
    228                         pw_utils::printDebug("&nbsp;Error - new user not created<br/>"); 
     227                        pw_utils::printDebug("<br />Error: New Account Not created.<br />"); 
    229228                        return FALSE; 
    230229                } 
  • branches/RB-0.9/wp-infocard/wp/utils.pw.php

    r122 r125  
    4242        { 
    4343                if (PW_DEBUG_ON) 
    44                 { 
    4544                        echo "<h3>$content</h3>\n"; 
    46                 } 
    4745        } // end function printDebugHeader 
    4846 
    49         function printDebug( $content
     47        function printDebug( $content, $level=0
    5048        { 
    5149                // 
     
    5856 
    5957                if (PW_DEBUG_ON) 
    60                 { 
    61                         print $content; 
    62                 } 
     58                        if ((int)$level <= (int)PW_DEBUG_LEVEL) 
     59                                print $content; 
    6360        } // end function printDebug 
    6461