Changeset 108
- Timestamp:
- 10/01/07 01:21:20 (1 year ago)
- Files:
-
- trunk/wp-infocard/wp/admin.pw.php (modified) (4 diffs)
- trunk/wp-infocard/wp/login/infocard-login.php (modified) (5 diffs)
- trunk/wp-infocard/wp/processing.pw.php (modified) (2 diffs)
- trunk/wp-infocard/wp/userdata.pw.php (modified) (1 diff)
- trunk/wp-infocard/wp/utils.pw.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-infocard/wp/admin.pw.php
r107 r108 23 23 - createIdentityTable(); 24 24 - createOptionTable(); 25 26 25 27 26 */ … … 206 205 $this->createOption('pw_time_validation', 1); 207 206 $this->createOption('pw_trust_managed_cards', 0); 207 $this->createOption('pw_trust_personal_cards', 0); 208 208 $this->createOption('pw_trusted_idp_list', ''); 209 209 … … 453 453 <?php pw_utils::screenPrint('XHTML'); ?> 454 454 </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>463 455 <?php 464 if ( $opts['pw_trust_managed_cards'] ) 465 { 456 print pw_admin::getPWAdminCardOptions( $opts ); 466 457 ?> 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 <?php472 473 }474 ?>475 476 458 </table> 477 459 <input type="submit" name="infocard_admin_submit" id="infocard_admin_submit" value="<?php pw_utils::screenPrint('Save');?>" /> … … 483 465 function printInstallData() 484 466 { 485 return; // no need for extra steps anymore467 return; // no need for extra steps for WordPress, yay! 486 468 } // end function printInstallData 487 469 trunk/wp-infocard/wp/login/infocard-login.php
r98 r108 14 14 </title> 15 15 <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" /> 17 17 <script type="text/javascript" src="<?php echo pw_utils::printJqueryLocation(); ?>"></script> 18 18 <script type="text/javascript"> … … 39 39 <table id="pw_login_linklist"><tr> 40 40 <td id="home"> 41 <a href="<?php p w_utils::printHomeLink(); ?>">41 <a href="<?php print pw_utils::getHomeLink('ssl'); ?>"> 42 42 <?php pw_utils::screenPrint('Home'); ?> 43 43 </a> … … 66 66 <form name="ctl00" id="ctl00" method="post" action="<?php pw_login::printICPostDestination(); ?>"> 67 67 <?php 68 $trigger_debug = pw_login::printIdentitySelectorTrigger();68 //$trigger_debug = pw_login::printIdentitySelectorTrigger(); 69 69 $cb_debug = pw_clickback::printHiddenClickback($clickback); 70 70 ?> … … 72 72 </form> 73 73 <div id="showrpobject"> 74 <?php pw_login::printIdentitySelectorTrigger('prettyprint'); ?>74 <?php //pw_login::printIdentitySelectorTrigger('prettyprint'); ?> 75 75 </div> 76 76 </div> … … 94 94 </div> 95 95 <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> 97 97 </div> 98 98 </div> trunk/wp-infocard/wp/processing.pw.php
r102 r108 20 20 Side Effects: none 21 21 */ 22 function showProcessingSummary( $status, $error, $validated, $blessed, $datamap )22 function showProcessingSummary( $status, $error, $validated, $blessed, $datamap, $token='' ) 23 23 { 24 24 pw_utils::printDebugHeader('Final Analysis'); … … 46 46 pw_utils::printDebug("Not needed<br/>"); 47 47 48 if ((bool)PW_SHOW_BINARY) 49 pw_utils::printDebug(" Token: ".$token." <br/>"); 50 48 51 } // end function showProcessingSummary 49 52 trunk/wp-infocard/wp/userdata.pw.php
r106 r108 392 392 wp_setcookie($user_login, md5($user_pass), TRUE); 393 393 } // 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(' Card belongs to account #: ' . $identity_info[0]->accountid . "<br/>" ); 421 break; 422 case 0: 423 // Not found: return the defaults 424 pw_utils::printDebug(' Card not found.<br />' ); 425 break; 426 427 default: 428 pw_utils::printDebug(' 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(' 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(' Card not found.<br />' ); 466 break; 467 default: 468 pw_utils::printDebug(' Multiple user accounts have the same ID.<br />' ); 469 $card_info['error'] = "USERIDNOTUNIQUE"; 470 } 471 } //end function getIdentityFromUserTable 394 472 395 473 } // end class pw_userdata trunk/wp-infocard/wp/utils.pw.php
r102 r108 90 90 function printHomeLink() 91 91 { 92 // about to be deprecated 93 return "deprecated"; 94 } 95 function getHomeLink($ssl='') 96 { 92 97 // 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'); 94 102 } // end function printHomeLink 95 103 96 104 function printOtherLoginOptionsLink() 97 105 { 98 print get_settings(' siteurl') . "/wp-login.php";106 print get_settings('pw_securesiteurl') . "/wp-login.php"; 99 107 } // end function printOtherLoginOptionsLink 100 108 101 109 function printLearnMoreLink() 102 110 { 103 print "http ://pamelaproject.com";111 print "https://pamelaproject.com"; 104 112 } // end function printLearnMoreLink 105 113
