Changeset 44
- Timestamp:
- 05/22/07 15:45:15 (2 years ago)
- Files:
-
- trunk/wp-infocard/processing/class.infocard-processing.php (deleted)
- trunk/wp-infocard/processing/infocard-print-binary.php (deleted)
- trunk/wp-infocard/pw-claimtypes.php (modified) (3 diffs)
- trunk/wp-infocard/pw-config.php (modified) (2 diffs)
- trunk/wp-infocard/pwlib/processing/infocard-post.php (modified) (5 diffs)
- trunk/wp-infocard/wp-infocard-settings.php (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-infocard/pw-claimtypes.php
r42 r44 1 1 <?php 2 include_once( dirname(__FILE__) . '/pwlib/claimtypes.pwlib.php'); 2 3 3 4 $claimslist['privatepersonalidentifier'] = new pw_claimtype( … … 41 42 'user_email', 42 43 'Email Address', 43 PW_TABLE_PREFIX . ' _users',44 PW_TABLE_PREFIX . 'users', 44 45 'return $claimslist[\'emailaddress\']->token_value;' ); 45 46 … … 56 57 'return $' . 'claimslist[\'privatepersonalidentifier\']->token_value;' ); 57 58 59 <<<<<<< .mine 60 $datamap['user_login'] = new pw_mapping( 61 'user_login', 62 'Login ID', 63 PW_TABLE_PREFIX . 'users', 64 ======= 58 65 $datamap['user_login'] = new pw_mapping( 59 66 'user_login', 60 67 'Login ID', 61 68 PW_TABLE_PREFIX . '_users', 69 >>>>>>> .r42 62 70 'return pw_userdata::getLoginID();', 63 71 'Calls out to the getLoginID function in pw_userdata' ); 64 65 class pw_claimtype66 {67 var $schemaURI = '';68 var $handle = '';69 var $required = FALSE;70 var $displayname = '';71 var $token_value;72 73 function pw_claimtype( $sch, $han, $req, $dn )74 {75 $this->schemaURI = $sch;76 $this->handle = $han;77 $this->required = $req;78 $this->displayname = $dn;79 } //end function pw_claimtype80 81 function add_token_value( $val )82 {83 $this->token_value = $val;84 } // end function add_token_value;85 } // end class pw_claimtype86 87 class pw_mapping88 {89 var $handle;90 var $displayname;91 var $mappingattribute;92 var $mappingtable;93 var $mappingfunction;94 var $new_value;95 var $db_value;96 var $description = ''; //to describe the mapping for others97 98 function pw_mapping( $dn, $ma, $mt, $mf, $desc='' )99 {100 $this->handle = $dn;101 $this->displayname = $dn;102 $this->mappingattribute = $ma;103 $this->mappingtable = $mt;104 $this->mappingfunction = $mf;105 $this->description = $desc;106 } // end function pw_mapping107 108 function add_new_value( $val )109 {110 $this->new_value = $val;111 } // end function add_new_value112 113 function add_db_value( $val )114 {115 $this->db_value = $val;116 }117 118 function compare( $nodebug='' )119 {120 if (strcmp($this->db_value, $this->new_value) == 0)121 {122 // sometimes we just want the value, even when123 // in debug mode124 if (!$nodebug)125 {126 pw_utils::printDebug(" $this->displayname: matches ($this->db_value)<br/>");127 }128 return (TRUE);129 }130 else131 {132 // sometimes we just want the value, even when133 // in debug mode134 if (!$nodebug)135 {136 pw_utils::printDebug(" $this->displayname: DB: $this->db_value TOKEN: $this->new_value<br/>");137 }138 return (FALSE);139 }140 141 }142 143 } // end class pw_mapping144 72 ?> trunk/wp-infocard/pw-config.php
r42 r44 1 1 <?php 2 2 define ('PW_PLUGIN', 'wp'); 3 require( dirname(__FILE__) . '/../../../wp-config.php' ); 4 define ('PW_TABLE_PREFIX', $table_prefix); 3 5 define ('PW_VALIDITY_WINDOW', 300); 4 6 define ('PW_CLICKBACK_LENGTH', 16); 5 define ('PW_PLUGINPATH', 'wp-content/plugins/wp-infocard'); 7 define ('PW_SHOW_BINARY', false); 8 define ('PW_PLUGINPATH', '/wp-content/plugins/wp-infocard'); 9 define ('PW_SELECTORTRIGGER', 'html' ); 10 define ('PW_MANAGEDONLY', true ); 6 11 define ('PW_VERSION', 'b2'); 7 12 define ('PW_VERSION_DATE', '17May07'); 8 13 define ('PW_SELECTORTRIGGER', 'html'); 9 14 10 require( dirname(__FILE__) . '/../../../wp-config.php' ); 11 define ('PW_TABLE_PREFIX', $table_prefix); 12 include_once( dirname(__FILE__) . '/pw-claimtypes.php'); // this file uses the TABLE_PREFIX define. 15 include_once( dirname(__FILE__) . '/' . PW_PLUGIN. '/pw-claimtypes.php'); 13 16 define ('PW_DEBUG_ON', get_settings('pw_debug_on')); 14 17 define ('PW_TIMEVALIDATION_ON', false); … … 16 19 define ('PW_IMGPATH', PW_PATH . '/pwlib/images'); 17 20 define ('PW_SITEMESGPATH', PW_PATH . '/site-messages'); 18 define ('PW_PLUGINURL', get_settings('siteurl') . '/' .PW_PLUGINPATH );21 define ('PW_PLUGINURL', get_settings('siteurl') . PW_PLUGINPATH ); 19 22 define ('PW_IMGURL', PW_PLUGINURL . '/pwlib/images'); 20 23 define ('PW_SECUREPLUGINURL', get_settings('pw_securesiteurl') . '/' . PW_PLUGINPATH ); 21 24 define ('PW_SITEMESGURL', PW_PLUGINURL . '/site-messages/infocard-usermessage.php'); 25 /////Temporary 26 define ('PW_SECURESITEURL', get_settings('securesiteurl') ); 22 27 ?> trunk/wp-infocard/pwlib/processing/infocard-post.php
r39 r44 93 93 } 94 94 95 $incominguser = pw_userdata::evaluateIncomingRequest(); 95 96 pw_userdata::mapTokenData(); 96 97 $user_email = trim($claims['emailaddress']); … … 103 104 $modulusHash = $claims['modulusHash']; 104 105 $pass2rounds = MD5($modulusHash); 105 106 $incominguser = pw_userdata::evaluateIncomingRequest(); 106 107 // changed order of token mapping & request evaluation 108 //$incominguser = pw_userdata::evaluateIncomingRequest(); 107 109 108 110 if (!$incominguser) … … 265 267 pw_utils::printDebug(" Error: $error <br/>"); 266 268 pw_utils::printDebug(" Status: ".$incominguser['status']." <br/>"); 267 //$relocationUrl = "error";268 $relocationUrl='http://pamelaproject.com/hotornot/index.php?option=pwjos&task=error&error_code='.$error;269 pw_utils::redirectToURL($relocationUrl);269 $relocationUrl = "error"; 270 //$relocationUrl='http://pamelaproject.com/hotornot/index.php?option=pwjos&task=error&error_code='.$error; 271 //pw_utils::redirectToURL($relocationUrl); 270 272 } 271 273 else … … 306 308 else 307 309 { 308 $relocationUrl = "index.php ?option=com_hotornot2";310 $relocationUrl = "index.php"; 309 311 } 310 312 … … 340 342 } 341 343 } else { 342 //pw_utils::errorPageRedirect($error);344 pw_utils::errorPageRedirect($error); 343 345 344 $error_redirect='http://pamelaproject.com/hotornot/index.php?option=pwjos&task=error&error_code='.$error;345 pw_utils::printDebug('<br/>Error url: '. $error_redirect);346 echo '<br/>Error url: '. $error_redirect;346 //$error_redirect='http://pamelaproject.com/hotornot/index.php?option=pwjos&task=error&error_code='.$error; 347 //pw_utils::printDebug('<br/>Error url: '. $error_redirect); 348 //echo '<br/>Error url: '. $error_redirect; 347 349 //pw_utils::redirectToURL('http://pamelaproject.com/hotornot/index.php?option=pwjos&task=error&error_code='.$error); 348 350 }
