Changeset 84
- Timestamp:
- 06/26/07 14:29:33 (2 years ago)
- Files:
-
- trunk/wp-infocard/pw-config.php (modified) (2 diffs)
- trunk/wp-infocard/wp/admin.pw.php (modified) (5 diffs)
- trunk/wp-infocard/wp/pw-claimtypes.php (modified) (2 diffs)
- trunk/wp-infocard/wp/userdata.pw.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-infocard/pw-config.php
r78 r84 7 7 define ('PW_SHOW_BINARY', false); 8 8 define ('PW_PLUGINPATH', '/wp-content/plugins/wp-infocard'); 9 define ('PW_SELECTORTRIGGER', 'html' ); // this can also be set to XHTML10 9 define ('PW_MANAGEDONLY', false ); 11 10 define ('PW_VERSION', 'b3'); 12 11 define ('PW_VERSION_DATE', '20June07'); 13 define ('PW_SELECTORTRIGGER', 'html');14 12 define ('PW_USECAPTCHAS', false ); 15 define ('PW_CUSTOMDATAPATH', dirname(__FILE__) . '/' . PW_PLUGIN. '/customdata.pw.php');16 //define ('PW_CUSTOMDATAPATH', dirname(__FILE__) . '/custom/customdata.pw.php');17 18 include_once( PW_CUSTOMDATAPATH );19 20 include_once( dirname(__FILE__) . '/' . PW_PLUGIN. '/pw-claimtypes.php');21 13 define ('PW_DEBUG_ON', get_settings('pw_debug_on')); 22 define ('PW_TIMEVALIDATION_ON', false); 14 define ('PW_SELECTOR_TRIGGER', get_settings('pw_selector_trigger')); 15 define ('PW_CUSTOM_DATA', get_settings('pw_custom_data')); 16 define ('PW_MANAGEDONLY', get_settings('pw_trust_managed_cards')); 17 define ('PW_TRUST_MANAGED_CARDS', get_settings('pw_trust_managed_cards')); 18 define ('PW_CUSTOMDATAPATH', dirname(__FILE__) . '/custom/customdata.pw.php'); 19 define ('PW_TIMEVALIDATION_ON', get_settings('pw_time_validation')); 23 20 define ('PW_PATH', ABSPATH . PW_PLUGINPATH); 24 21 define ('PW_IMGPATH', PW_PATH . '/pwlib/images'); … … 29 26 define ('PW_SITEMESGURL', PW_PLUGINURL . '/site-messages/infocard-usermessage.php'); 30 27 define ('PW_SECURESITEURL', get_settings('securesiteurl') ); 31 define ('PW_FP_ICON', 'infocard_60x42.png' ); // icon must be in /pwlib/images/ic-logo 28 29 if ( PW_CUSTOM_DATA) 30 include_once( PW_CUSTOMDATAPATH ); 31 include_once( dirname(__FILE__) . '/' . PW_PLUGIN. '/pw-claimtypes.php'); 32 define ('PW_FP_ICON', 'infocard_60x42.png' ); // icon must be in /pwlib/images 32 33 ?> trunk/wp-infocard/wp/admin.pw.php
r81 r84 169 169 $this->createOption('pw_debug_on', 0); 170 170 $this->createOption('pw_enable_pass', 0); 171 172 171 $this->createOption('pw_selector_trigger', 'html'); 172 $this->createOption('pw_custom_data', 0); 173 $this->createOption('pw_time_validation', 1); 174 $this->createOption('pw_trust_managed_cards', 0); 175 $this->createOption('pw_trusted_idp_list', ''); 173 176 174 177 } // end function setup … … 326 329 $ic_debug = $new_debug = pw_admin::getOption('pw_debug_on'); 327 330 $ic_pass = $new_pass = pw_admin::getOption('pw_enable_pass'); 331 $ic_trigger = $new_trigger = pw_admin::getOption('pw_selector_trigger'); 332 $ic_customdata = $new_customdata = pw_admin::getOption('pw_custom_data'); 333 $ic_timeval = $new_timeval = pw_admin::getOption('pw_time_validation'); 334 $ic_managed = $new_managed = pw_admin::getOption('pw_trust_managed_cards'); 335 $ic_idplist = $new_idplist = pw_admin::getOption('pw_trusted_idp_list'); 328 336 329 337 // write submitted changes if this page reload shows a submit … … 335 343 $new_debug = $_POST['pw_debug_on']; 336 344 $new_pass = $_POST['pw_enable_pass']; 345 $new_trigger = $_POST['pw_selector_trigger']; 346 $new_customdata = $_POST['pw_custom_data']; 347 $new_timeval = $_POST['pw_time_validation']; 348 $new_managed = $_POST['pw_trust_managed_cards']; 349 $new_idplist = $_POST['pw_trusted_idp_list']; 337 350 } 338 351 … … 357 370 } 358 371 372 if ( $ic_trigger != $new_trigger ){ 373 update_option('pw_selector_trigger', $new_trigger ); 374 } 375 376 if ( $ic_customdata != $new_customdata ){ 377 update_option('pw_custom_data', $new_customdata ); 378 } 379 380 if ( $ic_timeval != $new_timeval ){ 381 update_option('pw_time_validation', $new_timeval ); 382 } 383 384 if ( $ic_managed != $new_managed ){ 385 update_option('pw_trust_managed_cards', $new_managed ); 386 } 387 388 if ( $ic_idplist != $new_idplist ){ 389 update_option('pw_trusted_idp_list', $new_idplist ); 390 } 391 359 392 pw_admin::printSystemCheck($new_secureurl); 360 393 ?> … … 405 438 ?> 406 439 </td></tr> 407 <tr><td> </td><td/></tr> 408 <tr><th colspan="2" align="left">Advanced TroubleShooting</td></tr> 409 <tr><td> </td><td/></tr> 410 <tr><td colspan="2"> 411 <input name="pw_debug_on" type="checkbox" id="pw_debug_on" value="1" <?php checked('1', ($new_debug)); ?> /> 412 <?php _e('Debug Mode', 'wp-infocard'); ?> 440 <tr><td> </td><td/></tr> 441 <tr><th colspan="2" align="left"> 442 <?php pw_utils::ScreenPrint('Advanced Settings'); ?> 443 </td></tr> 444 <tr><td colspan="2"> 445 <?php pw_utils::screenPrint('Don\'t mess with these unless you understand and accept the consequences. Security breaches or errors could occur if you change these settings under the wrong circumstances.'); ?> 446 </td></tr> 447 <tr><td colspan="2"> </td></tr> 448 <tr><td> 449 <?php pw_utils::screenPrint('Debug Mode'); ?> 450 </td><td> 451 <input name="pw_debug_on" type="radio" id="pw_debug_on" value="1" <?php checked('1', ($new_debug)); ?> /> 452 <?php pw_utils::screenPrint('On'); ?> 453 454 <input name="pw_debug_on" type="radio" id="pw_debug_on" value="0" <?php checked('0', ($new_debug)); ?> /> 455 <?php pw_utils::screenPrint('Off'); ?> 456 </td></tr> 457 <tr><td> 458 <?php pw_utils::screenPrint('Time Validation'); ?> 459 </td><td> 460 <input name="pw_time_validation" type="radio" id="pw_time_validation" value="1" <?php checked('1', ($new_timeval)); ?> /> 461 <?php pw_utils::screenPrint('On'); ?> 462 463 <input name="pw_time_validation" type="radio" id="pw_time_validation" value="0" <?php checked('0', ($new_timeval)); ?> /> 464 <?php pw_utils::screenPrint('Off'); ?> 465 <tr><td> 466 <?php pw_utils::screenPrint('Use Custom Data'); ?> 467 </td><td> 468 <input name="pw_custom_data" type="radio" id="pw_custom_data" value="1" <?php checked('1', ($new_customdata)); ?> /> 469 <?php pw_utils::screenPrint('On'); ?> 470 471 <input name="pw_custom_data" type="radio" id="pw_custom_data" value="0" <?php checked('0', ($new_customdata)); ?> /> 472 <?php pw_utils::screenPrint('Off'); ?> 473 </td></tr> 474 <tr><td> 475 <?php pw_utils::screenPrint('Trust Managed Cards'); ?> 476 </td><td> 477 <input name="pw_trust_managed_cards" type="radio" id="pw_trust_managed_cards" value="0" <?php checked('0', ($new_managed)); ?> /> 478 <?php pw_utils::screenPrint('No'); ?> 479 480 <input name="pw_trust_managed_cards" type="radio" id="pw_trust_managed_cards" value="1" <?php checked('1', ($new_managed)); ?> /> 481 <?php pw_utils::screenPrint('Yes'); ?> 482 </td></tr> 483 <?php 484 if ( $new_managed ) 485 { 486 ?> 487 <tr><td/><td> 488 <?php pw_utils::screenPrint('Managed Card Trust List (values must be full sts URLs, each value is separated by a "|")'); ?> 489 <textarea cols="60" rows="3" name="pw_trusted_idp_list" id="pw_trusted_idp_list"><?php print $new_idplist; ?></textarea> 490 </td><tr> 491 492 <?php 493 494 } 495 ?> 496 497 <tr><td> 498 <?php pw_utils::screenPrint('Selector Trigger'); ?> 499 </td><td> 500 <input name="pw_selector_trigger" type="radio" id="pw_selector_trigger" value="html" <?php checked('html', ($new_trigger)); ?> /> 501 <?php pw_utils::screenPrint('HTML'); ?> 502 <input name="pw_selector_trigger" type="radio" id="pw_selector_trigger" value="xhtml" <?php checked('xhtml', ($new_trigger)); ?> /> 503 <?php pw_utils::screenPrint('XHTML'); ?> 413 504 </td></tr> 414 505 <tr><td> </td><td/></tr> trunk/wp-infocard/wp/pw-claimtypes.php
r66 r84 38 38 39 39 // Add any custom claims 40 // (note - custom claims come from PW_CUSTOMDATAPATH in pw-config.php) 41 pw_customdata::addCustomClaims(); 40 // (note - if PW_CUSTOM_DATA is set, the file in PW_CUSTOMDATAPATH 41 // is included in pw-config.php) 42 if ( PW_CUSTOM_DATA ) 43 pw_customdata::addCustomClaims(); 42 44 43 45 $datamap['display_name'] = new pw_mapping( … … 94 96 95 97 // Map any custom claims 96 // (note - custom claims come from PW_CUSTOMDATAPATH in pw-config.php)97 pw_customdata::addCustomDataMap ();98 if ( PW_CUSTOM_DATA ) 99 pw_customdata::addCustomDataMap (); 98 100 ?> trunk/wp-infocard/wp/userdata.pw.php
r76 r84 129 129 $datamap['last_name']->add_db_value( $last ); 130 130 } 131 pw_customdata::evaluateIncomingCustomData( $mail_user_id ); 131 132 if ( PW_CUSTOM_DATA ) 133 pw_customdata::evaluateIncomingCustomData( $mail_user_id ); 132 134 break; 133 135 … … 262 264 $userdata = compact('ID', 'user_login', 'user_email', 'user_nicename', 'user_url', 'display_name', 'first_name', 'last_name'); 263 265 264 pw_customdata::updateNewCustomData( $ID ); 266 if ( PW_CUSTOM_DATA ) 267 pw_customdata::updateNewCustomData( $ID ); 265 268 266 269 if (wp_update_user($userdata))
