Changeset 108

Show
Ignore:
Timestamp:
10/01/07 01:21:20 (1 year ago)
Author:
pdingle
Message:

fixed errors from our joomla work, added card trust section to admin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-infocard/wp/admin.pw.php

    r107 r108  
    2323                - createIdentityTable(); 
    2424                - createOptionTable();   
    25                  
    2625 
    2726*/ 
     
    206205                $this->createOption('pw_time_validation', 1); 
    207206                $this->createOption('pw_trust_managed_cards', 0); 
     207                $this->createOption('pw_trust_personal_cards', 0); 
    208208                $this->createOption('pw_trusted_idp_list', ''); 
    209209 
     
    453453                                <?php pw_utils::screenPrint('XHTML'); ?> 
    454454                        </td></tr> 
    455                         <tr><td> 
    456                                 <?php pw_utils::screenPrint('Trust Managed Cards'); ?> 
    457                         </td><td> 
    458                                 <input name="pw_trust_managed_cards" type="radio" id="pw_trust_managed_cards" value="0" <?php echo ($opts['pw_trust_managed_cards'])?"":"checked"; ?> /> 
    459                                 <?php pw_utils::screenPrint('No'); ?> 
    460                                 <input name="pw_trust_managed_cards" type="radio" id="pw_trust_managed_cards" value="1" <?php  echo ($opts['pw_trust_managed_cards'])?"checked":""; ?> /> 
    461                                 <?php pw_utils::screenPrint('Yes'); ?> 
    462                         </td></tr> 
    463455<?php 
    464                         if ( $opts['pw_trust_managed_cards'] ) 
    465                         { 
     456                        print pw_admin::getPWAdminCardOptions( $opts ); 
    466457?> 
    467                         <tr><td/><td> 
    468                                 <?php pw_utils::screenPrint('Managed Card Trust List (values must be full sts URLs, each value is separated by a "|")'); ?> 
    469                                 <textarea cols="60" rows="3" name="pw_trusted_idp_list" id="pw_trusted_idp_list"><?php print $opts['pw_trusted_idp_list']; ?></textarea> 
    470                         </td></tr> 
    471 <?php 
    472  
    473                         } 
    474 ?> 
    475  
    476458                        </table> 
    477459                        <input type="submit" name="infocard_admin_submit" id="infocard_admin_submit" value="<?php pw_utils::screenPrint('Save');?>" /> 
     
    483465        function printInstallData() 
    484466        { 
    485                 return; // no need for extra steps anymore 
     467                return; // no need for extra steps for WordPress, yay! 
    486468        } // end function printInstallData 
    487469 
  • trunk/wp-infocard/wp/login/infocard-login.php

    r98 r108  
    1414        </title> 
    1515        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    16         <link rel="stylesheet" href="<?php pw_utils::printCSSlink(); ?>" type="text/css" /> 
     16        <link rel="stylesheet" href="<?php pw_utils::printCSSlink('ssl'); ?>" type="text/css" /> 
    1717        <script type="text/javascript" src="<?php echo pw_utils::printJqueryLocation(); ?>"></script> 
    1818        <script type="text/javascript"> 
     
    3939                <table id="pw_login_linklist"><tr> 
    4040                        <td id="home"> 
    41                                 <a href="<?php pw_utils::printHomeLink(); ?>"> 
     41                                <a href="<?php print pw_utils::getHomeLink('ssl'); ?>"> 
    4242                                        <?php pw_utils::screenPrint('Home'); ?> 
    4343                                </a> 
     
    6666                <form name="ctl00" id="ctl00" method="post" action="<?php pw_login::printICPostDestination(); ?>"> 
    6767<?php 
    68                         $trigger_debug = pw_login::printIdentitySelectorTrigger(); 
     68                        //$trigger_debug = pw_login::printIdentitySelectorTrigger(); 
    6969                        $cb_debug = pw_clickback::printHiddenClickback($clickback); 
    7070?> 
     
    7272                </form> 
    7373                <div id="showrpobject"> 
    74                         <?php pw_login::printIdentitySelectorTrigger('prettyprint'); ?> 
     74                        <?php //pw_login::printIdentitySelectorTrigger('prettyprint'); ?> 
    7575                </div> 
    7676        </div> 
     
    9494        </div> 
    9595        <div id="pw_login_footer"> 
    96                 <a id="pw_pamelaproject_logo" href="http://pamelaproject.com"><img src='<?php pw_utils::displayPamelaProjectLogo(); ?>' alt="Powered by PamelaWare" /></a> 
     96                <a id="pw_pamelaproject_logo" href="https//pamelaproject.com"><img src='<?php pw_utils::displayPamelaProjectLogo('ssl'); ?>' alt="Powered by PamelaWare" /></a> 
    9797        </div> 
    9898  </div> 
  • trunk/wp-infocard/wp/processing.pw.php

    r102 r108  
    2020                Side Effects:  none 
    2121        */ 
    22         function showProcessingSummary( $status, $error, $validated, $blessed, $datamap )  
     22        function showProcessingSummary( $status, $error, $validated, $blessed, $datamap, $token='' )  
    2323        { 
    2424                pw_utils::printDebugHeader('Final Analysis'); 
     
    4646                        pw_utils::printDebug("Not needed<br/>"); 
    4747 
     48                if ((bool)PW_SHOW_BINARY) 
     49                        pw_utils::printDebug("&nbsp;Token: ".$token." <br/>"); 
     50 
    4851        } // end function showProcessingSummary 
    4952 
  • trunk/wp-infocard/wp/userdata.pw.php

    r106 r108  
    392392                wp_setcookie($user_login, md5($user_pass), TRUE); 
    393393        } // end function setLoginCookies 
     394         
     395        function getIdentityFromCardTable($cardhash) 
     396        { 
     397                global $wpdb, $datamap; 
     398                $card_info['found'] = FALSE; 
     399                $card_info['error'] = ''; 
     400 
     401                if (!$cardhash) 
     402                { 
     403                        $card_info['error'] = 'INTERNALERROR'; 
     404                        pw_utils::printDebug( '<br/>Error in getIdentityFromCardTable function - no cardhash passed!<br/>'); 
     405                } 
     406                pw_utils::printDebug( '<br/>Getting Identity from Card Hash:' . $cardhash . '<br/>'); 
     407 
     408                $query = "SELECT * FROM `" . PW_TABLE_PREFIX 
     409                        . "infocard_identities` WHERE cardhash = '" 
     410                        . $cardhash . "'"; 
     411                $identity_info = $wpdb->get_results( $query, OBJECT ); 
     412                switch (count($identity_info)) 
     413                { 
     414                        case 1: 
     415                                // card is found 
     416                                $datamap['ID']->add_db_value($identity_info[0]->accountid); 
     417                                $datamap['cardhash']->add_db_value($identity_info[0]->cardhash); 
     418                                $datamap['cardhandle']->add_db_value($identity_info[0]->cardhandle); 
     419                                $card_info['found'] = TRUE; 
     420                                pw_utils::printDebug('&nbsp;&nbsp;Card belongs to account #: ' . $identity_info[0]->accountid . "<br/>" ); 
     421                                break; 
     422                        case 0: 
     423                                // Not found: return the defaults 
     424                                pw_utils::printDebug('&nbsp;&nbsp;Card not found.<br />' ); 
     425                                break; 
     426 
     427                        default: 
     428                                pw_utils::printDebug('&nbsp;&nbsp;Multiple cards match the hash, return an error.<br />' ); 
     429                                $card_info['error'] = "CARDNOTUNIQUE"; 
     430                } 
     431 
     432                return $card_info; 
     433        } 
     434 
     435        function getIdentityFromUserTable($accountid) 
     436        { 
     437                global $claimslist, $wpdb, $datamap; 
     438 
     439                $user_info['found'] = FALSE; 
     440                $user_info['error'] = ''; 
     441 
     442                $query = "SELECT * from " . PW_TABLE_PREFIX 
     443                        . "users WHERE email LIKE '" 
     444                        . $claimslist['emailaddress']->token_value . "'"; 
     445 
     446                $identity_info = $wpdb->get_results( $query, ARRAY_A ); 
     447 
     448                switch (count($user_info)) 
     449                { 
     450                        case 1: 
     451                                // 
     452                                pw_utils::printDebug('&nbsp;&nbsp;User Data found & mapped.<br />' ); 
     453                                foreach (array_keys($datamap) as $key) 
     454                                { 
     455                                        if (array_key_exists($datamap[$key]->mappingattribute, $user_info[0])) 
     456                                                $datamap[$key]->add_db_value($user_info[0][$datamap[$key]->mappingattribute]); 
     457                                } 
     458 
     459                                if ( PW_CUSTOM_DATA ) 
     460                                        pw_customdata::evaluateIncomingCustomData( $accountid ); 
     461                                break; 
     462                        break; 
     463 
     464                        case 0: 
     465                                pw_utils::printDebug('&nbsp;&nbsp;Card not found.<br />' ); 
     466                        break; 
     467                         default: 
     468                                pw_utils::printDebug('&nbsp;&nbsp;Multiple user accounts have the same ID.<br />' ); 
     469                                $card_info['error'] = "USERIDNOTUNIQUE"; 
     470                } 
     471        } //end function getIdentityFromUserTable 
    394472 
    395473} // end class pw_userdata 
  • trunk/wp-infocard/wp/utils.pw.php

    r102 r108  
    9090        function printHomeLink() 
    9191        { 
     92                // about to be deprecated 
     93                return "deprecated"; 
     94        } 
     95        function getHomeLink($ssl='') 
     96        { 
    9297                // This is where the "Back to blog" link goes. 
    93                 print get_settings('siteurl'); 
     98                if ($ssl) 
     99                        print get_settings('pw_securesiteurl'); 
     100                else 
     101                        print get_settings('siteurl'); 
    94102        } // end function printHomeLink 
    95103 
    96104        function printOtherLoginOptionsLink() 
    97105        { 
    98                 print get_settings('siteurl') . "/wp-login.php"; 
     106                print get_settings('pw_securesiteurl') . "/wp-login.php"; 
    99107        } // end function printOtherLoginOptionsLink 
    100108 
    101109        function printLearnMoreLink() 
    102110        { 
    103                 print "http://pamelaproject.com"; 
     111                print "https://pamelaproject.com"; 
    104112        } // end function printLearnMoreLink 
    105113