Changeset 29

Show
Ignore:
Timestamp:
04/03/07 22:08:28 (2 years ago)
Author:
pdingle
Message:

Huge rewrite - changed database structure, began to separate component-specific code from common (pwlib) code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-infocard/class.infocard-basic.php

    r24 r29  
    11<?php 
    22        //defined( '_VALID_IC' ) or die( 'Direct Access to this location is not allowed.'); 
    3         require_once( dirname(__FILE__) . '/wp-infocard-settings.php' ); 
     3        include_once( dirname(__FILE__) . '/pw-config.php' ); 
     4        include_once( dirname(__FILE__) . '/' . PW_PLUGIN . '/admin.pw.php' ); 
    45 
    56class InfocardGeneral { 
     
    78        function printCSSlink(){ 
    89                //print "http://wordpress/ic-admin/infocard.css"; 
    9                 print IC_PLUGINURL . "/infocard.css"; 
     10                print PW_PLUGINURL . "/infocard.css"; 
    1011        } 
    1112 
     
    3233 
    3334        function errorPageRedirect( $error_code='', $error_details = '') {  
    34                 $redirect = IC_PLUGINURL . "/error/error.php?error_code=" . $error_code; 
     35                $redirect = PW_PLUGINURL . "/error/error.php?error_code=" . $error_code; 
    3536                if ($error_details)  
    3637                { 
     
    5758                // this sets the link but doesn't actually redirect 
    5859                //$redirect = "/wp-content/plugins/wp-infocard/error/error.php?error_code=" . $error_code; 
    59                 $redirect = IC_PLUGINURL . "/error.php?error_code=" . $error_code; 
     60                $redirect = PW_PLUGINURL . "/error.php?error_code=" . $error_code; 
    6061                print $redirect; 
    6162        } 
    6263 
    6364        function printUserMessageText( $mesg_type, $lang='en-us' ){ 
    64                 $message_file = IC_SITEMESGPATH . "/$lang" . "/$mesg_type.html"; 
     65                $message_file = PW_SITEMESGPATH . "/$lang" . "/$mesg_type.html"; 
    6566 
    6667                if ( file_exists( $message_file ) ) { 
    6768                        include_once($message_file); 
    6869                } else { 
    69                         if (IC_DEBUG_ON) { 
     70                        if (PW_DEBUG_ON) { 
    7071                                print "<p>Problems with this file:  $message_file</p>";  
    7172                        } else { 
     
    116117        } // end function checkDBReturn 
    117118 
    118         function testSSLURL( $sslurl ) { 
    119         // Purpose:  the goal of this is to attempt to open a specified SSL  
    120         //           connection from a possibly non-SSL-protected page.  
    121         // Result:   Returns true if the URL was contacted, false if the URL 
    122         //           was blank or if there was a problem of any kind. 
    123         // 
    124                 if ($sslurl) { 
    125                         $errno = ''; 
    126                         $errstr = ''; 
    127                         //print  "SSLURL: " . $sslurl; 
    128                         $bits = parse_url($sslurl); 
    129                         if ($bits['port']) { 
    130                                 $port = $bits['port']; 
    131                         } else { 
    132                                 $port = 443; 
    133                         } 
    134                         //print_r($bits); 
    135                         // don't show the warnings that may appear if there 
    136                         // is no ssl socket connection available 
    137                         ini_set('display_errors',0); 
    138                         $fp = fsockopen("ssl://$bits[host]", $port); 
    139                         if (!$fp) { 
    140                                 return FALSE; 
    141                         } else { 
    142                                 fclose($fp); 
    143                                 return TRUE; 
    144                         }        
    145  
    146                         // allow warnings to be displayed again 
    147                         ini_set('display_errors',1); 
    148                 } else { 
    149                         return FALSE; 
    150                 } 
    151                  
    152         } // end function testSSLURL 
    153  
    154         function verifyGivenCerts (){ 
    155         // Purpose:  this function grabs the contents of infocard_opener and 
    156         //           infocard_key and runs an openssl check on them. 
    157         // Result:   Returns true if the openssl_pkey_get_private function 
    158         //           gives a valid resource handle back, otherwise returns 
    159         //           FALSE 
    160  
    161                 $private_key_cipher = get_settings('infocard_key'); 
    162                 $private_key_passphrase = get_settings('infocard_opener'); 
    163                 if (function_exists('openssl_pkey_get_private')) { 
    164                         return openssl_pkey_get_private(array($private_key_cipher, $private_key_passphrase)); 
    165                          
    166                 } else { 
    167                         return FALSE; 
    168                 } 
    169         } // end function verifyGivenCerts 
    170  
    171119        function advancedCertTest ( $imagepath="/") { 
    172120        // Purpose:  this function checks the APACHE $_SERVER variable for  
     
    186134                if ($_SERVER['HTTPS'] == 'on') { 
    187135                // page is called via HTTPS - this will work     
    188                     if (InfocardUtils::verifyGivenCerts()) { 
     136                    if (pw_admin::verifyGivenCerts()) { 
    189137                        if ($_SERVER['SSL_SERVER_CERT']) {       
    190138                                $private_key_cipher = get_settings('infocard_key'); 
     
    222170                // Verify that the token is being processed within the time window 
    223171                // specified by the Identity Provider (we could further restrict this) 
    224                 $currentTime = mktime() + IC_VALIDITY_WINDOW; 
     172                $currentTime = mktime() + PW_VALIDITY_WINDOW; 
    225173                $adjustedTimeText = substr(gmdate("c",$currentTime), 0, 19)."Z"; 
    226174                if ($adjustedTimeText < $NotBefore){ 
     
    230178                } 
    231179 
    232                 $currentTime = mktime() - IC_VALIDITY_WINDOW; 
     180                $currentTime = mktime() - PW_VALIDITY_WINDOW; 
    233181                $adjustedTimeText = substr(gmdate("c",$currentTime), 0, 19)."Z"; 
    234182                if ($adjustedTimeText > $NotOnOrAfter){ 
     
    240188 
    241189        function printUserMessage( $mesg_type, $lang='en-us' ){ 
    242                 $message_file = bloginfo('home') . IC_PLUGINPATH . "/site-messages/$lang" . "/$mesg_type.html"; 
     190                $message_file = bloginfo('home') . PW_PLUGINPATH . "/site-messages/$lang" . "/$mesg_type.html"; 
    243191 
    244192                if ( file_exists( $message_file ) ) { 
     
    255203        // or a call to something fancier. 
    256204        // 
    257         // The IC_DEBUG_ON define is set in wp-infocard-settings.php but should 
     205        // The PW_DEBUG_ON define is set in pw-config.php but should 
    258206        // really be set by the GUI one day. 
    259207 
    260                 if (IC_DEBUG_ON) { 
     208                if (PW_DEBUG_ON) { 
    261209                        print $content; 
    262210                }        
     
    267215                // if debugging is on, this pretty-prints the contents of $binary 
    268216                // if debugging is off, printBinary simply returns. 
    269                 if (IC_DEBUG_ON) { 
     217                if (PW_DEBUG_ON) { 
    270218 
    271219                        InfocardUtils::printDebug( $title . " (length: " .strlen($binary) . " octents) <br/>"); 
  • trunk/wp-infocard/login/class.infocard-login.php

    r24 r29  
    11<?php 
    22defined( '_VALID_IC' ) or die( 'Direct Access to this location is not allowed.'); 
    3 //include_once( dirname(__FILE__) . '/../wp-infocard-settings.php' ); 
    43include_once( dirname(__FILE__) . "/../class.infocard-basic.php" ); 
     4 
    55/////////////////////////////////////////////////////////////////////////////// 
    66// class.infocard-login.php 
     
    9595                // up all over the place, including the meta section of the blog 
    9696 
    97                 $path = IC_SECUREPLUGINURL . "/login/infocard-submit.php"; 
     97                $path = PW_SECUREPLUGINURL . "/login/infocard-submit.php"; 
    9898 
    9999                if ($clickback) 
  • trunk/wp-infocard/login/infocard-submit.php

    r26 r29  
    3636        . "View the page source to see the object.<br/>"); 
    3737 
     38InfocardUtils::printDebug("Plugin: " . PW_PLUGIN . "<br/>\n"); 
    3839InfocardUtils::printDebug("Net Agent: $netAgent<br/>\n"); 
    3940InfocardUtils::printDebug("User Agent: $userAgent<br/>\n"); 
     
    5859<?php  
    5960                InfocardLogin::printHiddenClickback($clickback);  
    60                 if (IC_DEBUG_ON) 
     61                if (PW_DEBUG_ON) 
    6162                // replace auto-submit with manual submit in debug mode. 
    6263                { 
     
    7273?> 
    7374<?php 
    74                         if (IC_DEBUG_ON == FALSE) 
     75                        if (PW_DEBUG_ON == FALSE) 
    7576                        { 
    7677?> 
  • trunk/wp-infocard/login/login.php

    r26 r29  
    1010/////////////////////////////////////////////////////// 
    1111define( '_VALID_IC', 1 );  
    12 include_once( dirname(__FILE__) . '/../class.infocard-basic.php'); 
    1312include_once('class.infocard-login.php'); ?> 
    1413 
     
    8281</div> 
    8382<ul> 
    84         <li><a href="<?php InfocardGeneral::printHomeLink(); ?>" title="<?php _e('Are you lost?', 'wp=infocard'); ?>">&laquo; <?php _e('Back to blog', 'wp-infocard'); ?></a></li> 
     83        <li><a href="<?php InfocardGeneral::printHomeLink(); ?>" title="<?php _e('Are you lost?', 'wp-infocard'); ?>">&laquo; <?php _e('Back to blog', 'wp-infocard'); ?></a></li> 
    8584</ul> 
    8685</div> 
  • trunk/wp-infocard/processing/class.infocard-processing.php

    r20 r29  
    132132                //      Message, you would customize this function. 
    133133 
    134                 $clickbackUrl = IC_PLUGINURL   
     134                $clickbackUrl = PW_PLUGINURL   
    135135                        . "/login/infocard-clickback.php?" . $clickbackID; 
    136136 
     
    185185                InfocardUtils::checkDBReturn( $extra_data ) ; 
    186186 
    187                 if (IC_DEBUG_ON)  
     187                if (PW_DEBUG_ON)  
    188188                { 
    189189                        InfocardUtils::printDebug("<br/>Action: Compare & Update User Data<br/>");       
     
    294294class InfocardClickback { 
    295295        // this class details all of the functionality needed to support clickbacks. 
    296         // IC_CLICKBACK_LENGTH is set in wp-infocard-settings.php 
     296        // PW_CLICKBACK_LENGTH is set in pw-config.php 
    297297 
    298298        function createChallenge( $data ) { 
    299                 $clickback_salt = get_settings('clickback_salt'); 
     299                //$clickback_salt = get_settings('clickback_salt'); 
     300                $clickback_salt = pw_attributes::get_attr('pw_clickback_salt'); 
    300301 
    301302                InfocardUtils::printDebug("Clickback: Challenge Created. <br/>" 
    302303                        . "Clickback: salted data is " . (($data)?$data:"empty") . "<br/>" 
    303                         . "Clickback: length is " . IC_CLICKBACK_LENGTH  
     304                        . "Clickback: length is " . PW_CLICKBACK_LENGTH  
    304305                        . "<br/>Clickback: salt is $clickback_salt <br/>"); 
    305306 
    306307                $data = MD5($clickback_salt . $data); 
    307308 
    308                 $chopped = substr($data, 0, IC_CLICKBACK_LENGTH); 
     309                $chopped = substr($data, 0, PW_CLICKBACK_LENGTH); 
    309310 
    310311                InfocardUtils::printDebug("Clickback: Hash of the salted challenge data: $data<br/>" 
     
    322323                InfocardUtils::printDebug("&nbsp;Previous Challenge: " . $previousChallenge . "X<br/>" 
    323324                        . "&nbsp;Current Challenge: " . $currentChallenge . "X<br/>"); 
    324                 // printBinary only prints if IC_DEBUG_ON is on. Otherwise it just falls through. 
     325                // printBinary only prints if PW_DEBUG_ON is on. Otherwise it just falls through. 
    325326                InfocardUtils::printBinary("computed challenge: ", $currentChallenge); 
    326327                InfocardUtils::printBinary("previous challenge:", $previousChallenge); 
  • trunk/wp-infocard/processing/infocard-post-decrypt.php

    r23 r29  
    11<?php  
    2  
     2include_once( dirname(__FILE__) . '/../pw-config.php' ); 
     3include_once( dirname(__FILE__) . '/../' . PW_PLUGIN . '/admin.pw.php' ); 
    34 
    45function strip_namespace($name) 
     
    2021do { 
    2122 
    22     $private_key_cipher = get_settings('infocard_key'); 
    23     $private_key_passphrase = get_settings('infocard_opener'); 
     23    $private_key_cipher = pw_attributes::get_attr('infocard_key'); 
     24    $private_key_passphrase = pw_attributes::get_attr('pw_infocard_opener'); 
    2425    if ($private_key_cipher == NULL) 
    2526    { 
  • trunk/wp-infocard/processing/infocard-post-get-claims.php

    r24 r29  
    142142        $realTimeText = substr(gmdate("c",$realTime), 0, 19)."Z"; 
    143143        InfocardUtils::printDebug("&nbsp;Current RP Server Time: $realTimeText<br/>"  ); 
    144         $currentTime = $realTime + IC_VALIDITY_WINDOW; 
     144        $currentTime = $realTime + PW_VALIDITY_WINDOW; 
    145145        $adjustedTimeText = substr(gmdate("c",$currentTime), 0, 19)."Z"; 
    146146        if ($adjustedTimeText < $NotBefore){ 
    147             $error = "Adjusted current time ($adjustedTimeText) is too far ahead of the start of the validity window ($NotBefore). Margin of error: " . IC_VALIDITY_WINDOW . " seconds."; 
     147            $error = "Adjusted current time ($adjustedTimeText) is too far ahead of the start of the validity window ($NotBefore). Margin of error: " . PW_VALIDITY_WINDOW . " seconds."; 
    148148            break; 
    149149        } 
     
    153153        if ($adjustedTimeText > $NotOnOrAfter){ 
    154154            $error = "Adjusted current time ($adjustedTimeText) is after 
    155 the end of validity window ($NotOnOrAfter). Margin of error: " . IC_VALIDITY_WINDOW . " seconds."; 
     155the end of validity window ($NotOnOrAfter). Margin of error: " . PW_VALIDITY_WINDOW . " seconds."; 
    156156            break; 
    157157        } 
  • trunk/wp-infocard/processing/infocard-post.php

    r26 r29  
    77include_once("infocard-post-decrypt.php"); 
    88include_once("infocard-post-get-claims.php"); 
    9 include_once( dirname(__FILE__) . "/../class.infocard-basic.php"); 
    109include_once("class.infocard-processing.php"); 
    1110if (version_compare($wp_version, '2.1', '>=')) 
     
    2120    $token = ""; 
    2221 
    23     if (IC_DEBUG_ON){ 
     22    if (PW_DEBUG_ON){ 
    2423        // Need to turn on output buffering, otherwise the cookies set later on 
    2524        // will break because the headers have already been sent due to all the debug output. 
     
    7170        } 
    7271 
    73         if (IC_DEBUG_ON){ 
     72        if (PW_DEBUG_ON){ 
    7473                $debug_statement = ""; 
    7574                foreach ($claims as $key => $value){ 
     
    105104                case "new-card": 
    106105                        $accountValidationRequired = TRUE; 
    107                         $relocationUrl = IC_SITEMESGURL . '?new-card';  
     106                        $relocationUrl = PW_SITEMESGURL . '?new-card';  
    108107                break; 
    109108 
    110109                case "new-email": 
    111110                        $accountValidationRequired = TRUE; 
    112                         $relocationUrl = IC_SITEMESGURL . '?new-email';  
     111                        $relocationUrl = PW_SITEMESGURL . '?new-email';  
    113112                         
    114113                        // user_row is empty because the email address couldn't 
     
    141140                        // 
    142141                        $accountValidationRequired = TRUE; 
    143                         $relocationUrl = IC_SITEMESGURL . '?new-user';  
     142                        $relocationUrl = PW_SITEMESGURL . '?new-user';  
    144143 
    145144                        $user_ID = InfocardProcessing::createNewAccount($user_email, $modulusHash, $user_email, $user_nicename, $user_url, $user_firstname, $user_lastname ); 
     
    185184                                $accountValidationRequired = FALSE; 
    186185                                InfocardUtils::printDebug("&nbsp;Account validation has succeeded <br>"); 
    187                                 $relocationUrl = IC_SITEMESGURL . '?clickback-success';  
     186                                $relocationUrl = PW_SITEMESGURL . '?clickback-success';  
    188187                                $incominguser['status'] = 'clickback-success'; 
    189188                        }  
     
    219218        { 
    220219         
    221             if (IC_DEBUG_ON) 
     220            if (PW_DEBUG_ON) 
    222221            { 
    223222                // flush the output buffer to a file 
     
    245244            if (array_key_exists("clickback", $_POST)){ 
    246245                // show confirmation of clickback success 
    247                 $relocationUrl = IC_SITEMESGURL . '?clickback-success'; 
     246                $relocationUrl = PW_SITEMESGURL . '?clickback-success'; 
    248247            } else { 
    249248                $relocationUrl = urldecode($_SERVER['QUERY_STRING']); 
     
    266265    else  
    267266    { 
    268         if (IC_DEBUG_ON) 
     267        if (PW_DEBUG_ON) 
    269268        { 
    270269                $debug_statement = "HTTP Cookie After Authentication:<br/>"; 
  • trunk/wp-infocard/wp-infocard-settings.php

    r27 r29  
    1414define ('IC_TRACINGDIR', '/tmp/tracingdir'); 
    1515define ('IC_USE_WP_THEMES', true); 
    16 define ('IC_DEBUG_ON', false); 
     16define ('IC_DEBUG_ON', true); 
    1717define ('IC_CLICKBACK_LENGTH', 16); 
    1818define ('IC_VALIDITY_WINDOW', 300);  
  • trunk/wp-infocard/wp-infocard.php

    r28 r29  
    88Author URI: http://www.pamelaproject.com/wp-infocard/contributors 
    99*/ 
    10 include_once( 'wp-infocard-settings.php' ); 
    11 include_once( 'class.infocard-basic.php' ); 
     10include_once( dirname(__FILE__) . '/pw-config.php' ); 
     11include_once( dirname(__FILE__) . '/' . PW_PLUGIN . '/admin.pw.php' ); 
    1212 
    1313// Protect the script from direct access 
     
    1717} 
    1818 
    19 class wp_infocard { 
    20  
    21         // Function: wp_infocard 
    22         // Description: Constructor -- Set things up. 
    23         // Input: none 
    24         // Output: none 
    25         // Side effect: initializes some parameters 
    26         function wp_infocard() { 
    27                 global $table_prefix; 
    28                  
    29                 // We use a bunch of tables to store data 
    30                 //$this->table_audit` = $table_prefix . "audit"; 
    31                 $this->table_audit = "infocard_audit"; 
    32                  
    33                 // We also use some tables from Wordpress default set 
    34                 $this->table_options = $table_prefix . "options"; 
    35                 $this->table_users = $table_prefix . "users"; 
    36                 $this->table_usermeta = $table_prefix . "usermeta"; 
    37                  
    38         } 
    39         // end wp_infocard 
    40  
    41         // Function: createAuditTable 
    42         // Description: Create audit table 
    43         // Input: none 
    44         // Output: boolean to detect if table was created 
    45         // Side effect: executes SQL code to create DB tables needed by the plugin       
    46         function _createAuditTable() { 
    47             global $wpdb; 
    48                  
    49                 $myTableAuditQuery =  
    50                         "CREATE TABLE `$this->table_audit` ( 
    51                                 `modulusHash` varchar(40) NOT NULL default '', 
    52                                 `email` varchar(128) NOT NULL default '', 
    53                                 `time` datetime NOT NULL default '0000-00-00 00:00:00', 
    54                                 `IP` varchar(16) NOT NULL default '', 
    55                                 `status` varchar(128) NOT NULL default '' 
    56                         ) ENGINE = MYISAM"; 
    57                          
    58                 // Check if table is already there 
    59             foreach ($wpdb->get_col("SHOW TABLES", 0) as $table ) { 
    60                 if ($table == $this->table_audit) { 
    61                                 return false; 
    62                         } 
    63                 } 
    64                  
    65                 // Ok, let's proceed 
    66                 if ( $wpdb->query( $myTableAuditQuery ) === false ) { 
    67                         return false; 
    68                 } 
    69                          
    70                 // Just to be sure, we check that tables were actually created 
    71                 foreach ( $wpdb->get_col("SHOW TABLES", 0) as $table ) { 
    72                         if ( $table == $this->table_audit ) { 
    73                                 return true; 
    74                         } 
    75                 }        
    76                 return false; 
    77         } 
    78         // end createAuditTable 
    79          
    80  
    81         // Function: setup 
    82         // Description: Create tables, if they aren't already there. 
    83         // Input: none 
    84         // Output: none 
    85         // Side effect: creates tables 
    86         function setup() {  
    87                 global $wpdb; 
    88                  
    89                 $isAuditTableCreated = $this->_createAuditTable(); 
    90  
    91         } 
    92         // end setup 
    93          
    94          
    95          
    96         // Function: getModule 
    97         // Description: renders a module (div wrapper) 
    98         // Input: title of module, titles of table columns, queries (array of),  
    99         //        value format (kind of sprintf style), a boolean to 
    100         //        show a "wide" (CSS) module or not, a boolean to show link to resource, 
    101         //        a boolean to wrap or not table inside a DIV (used for public views) 
    102         // Output: html code to display 
    103         // Side effect: none 
    104         function getModule( $title, $table_titles,  
    105                             $query_array, $descr_link_format,  
    106                                                 $value_format, $filter_clause = '', 
    107                                                 $is_wide = false, $show_link_resource = false,  
    108                                                 $is_public = false ) { 
    109                 return ( ( !$is_public ) ? ' 
    110                 <div class="module'.($is_wide?'wide':'').'"> 
    111                         <h3>'.$title.'</h3> 
    112                         <div>' : '' ) . 
    113                         $this->getDataTable( $query_array, $table_titles,  
    114                                         $show_link_resource, $descr_link_format,  
    115                                         $value_format, $filter_clause ) . 
    116                         ( ( !$is_public ) ? '</div> 
    117                 </div>' : '' ); 
    118         } 
    119         // end getModule 
    120          
    121         // Function: showOptions 
    122         // Description:  setup options for the plugin 
    123         // Input: none 
    124         // Output: none 
    125         // Side effect: prints out the HTML code for the "options" panel 
    126         function showOptions() { 
    127                         __('An old database structure was detected. Please run Config -> Upgrade DB.', 'wp-infocard'); 
    128         } 
    129         // end showOptions 
    130          
    131 
    132 // end of class declaration 
    133  
    134 $wpInfocard = new wp_infocard(); 
     19$wpInfocard = new pw_admin(); 
    13520 
    13621// Define when we want to run the tracking: on shutdown (see wordpress codex) 
     
    14429} 
    14530         
    146                 //if the infocard_opener is already set, don't overwrite it. 
    147                 //otherwise, set the value. 
    148                 $options = get_option('infocard_opener'); 
    149                 if ( !$options ) 
    150                         $options = ''; 
    151                 update_option('infocard_opener', $options); 
    152  
    153                 //if the infocard_key is already set, don't overwrite it. 
    154                 //otherwise, set the value. 
    155                 $options = get_option('infocard_key'); 
    156                 if ( !$options ) 
    157                         $options = 'insert private SSL key here'; 
    158                 update_option('infocard_key', $options); 
    159  
    160                 // add a 'securesiteurl' option.  This is added because  
    161                 // otherwise we need to replace "http" with "https" in the  
    162                 // siteurl a million times each time we log in, and this  
    163                 // seems to be more performant. 
    164                 $regular_url = get_option('siteurl'); 
    165                 $https_url = get_option('securesiteurl'); 
    166                 if ( !$https_url )  { 
    167                         $https_url = "https" . substr($regular_url, 4); 
    168                 } 
    169                 update_option('securesiteurl', $https_url); 
    17031 
    17132                function infocard_admin_menu() 
     
    18748                } 
    18849 
    189                 function create_clickback_salt() { 
    190                         // this functionality was originally in infocard-post.php 
    191                         // but Pam moved it here    
    192                         list($usec, $sec) = explode(' ', microtime()); 
    193                         srand((float) $sec + ((float) $usec * 100000)); 
    194  
    195                         $binary = ""; 
    196                         for ($count=0; $count < 256; $count++){ 
    197                                 $binary = $binary.pack('S', rand()); 
    198                         } 
    199                         return bin2hex($binary); 
    200                 } 
    20150 
    20251                function infocard_options() { 
    20352                        // Content shown in the Options page is constructed here 
    204                         $ic_opener = $new_opener = get_option('infocard_opener'); 
    205                         $ic_key = $new_key = get_option('infocard_key'); 
    206                         $secureurl = $new_secureurl = get_option('securesiteurl'); 
    207                         $clickback_salt = get_option('clickback_salt'); 
     53                        $ic_opener = $new_opener = get_option('pw_infocard_opener'); 
     54                        $ic_key = $new_key = get_option('pw_infocard_key'); 
     55                        $secureurl = $new_secureurl = get_option('pw_securesiteurl'); 
    20856                        $ic_secret = get_option('secret'); 
    20957 
     
    21563                        } 
    21664                        if ( $ic_opener != $new_opener ){ 
    217                                 update_option('infocard_opener', $new_opener); 
     65                                update_option('pw_infocard_opener', $new_opener); 
    21866                        } 
    21967 
    22068                        if ( $ic_key != $new_key ){ 
    221                                 update_option('infocard_key', $new_key); 
     69                                update_option('pw_infocard_key', $new_key); 
    22270                        } 
    22371 
    22472                        if ( $secureurl != $new_secureurl ){ 
    225                                 update_option('securesiteurl', $new_secureurl ); 
     73                                update_option('pw_securesiteurl', $new_secureurl ); 
    22674                        } 
    22775 
    228                         if (!$clickback_salt) { 
    229                                 // this should only happen once 
    230                                 $salt = create_clickback_salt(); 
    231                                 update_option('clickback_salt', $salt );         
    232                         } 
    233                                  
    23476                         
    23577                        $openssl_loaded = extension_loaded("openssl");   
    23678                        $mcrypt_loaded = extension_loaded("mcrypt"); 
    23779                        if ($openssl_loaded) { 
    238                                 $key_works = InfocardUtils::verifyGivenCerts();  
     80                                $key_works = pw_admin::verifyGivenCerts();  
    23981                        } 
    24082                        ?> 
     
    274116                                <?php _e('SSL Connection to Secure Site URL Works', 'wp-infocard'); ?> 
    275117                        </td><td valign="bottom">&nbsp; 
    276                                 <img src="<?php print checklist_icon(InfocardUtils::testSSLURL($new_secureurl)); ?>"/>         
     118                                <img src="<?php print checklist_icon(pw_admin::verifySSLURL($new_secureurl)); ?>"/>    
    277119                                <a href="help/help.php?topic=cert"><?php _e('More Information', 'wp-infocard');?></a> 
    278120                        </td></tr> 
     
    330172                                <?php _e('Advanced Certificate Check', 'wp-infocard'); ?> 
    331173                        </td><td valign="bottom">&nbsp; 
    332                                 <?php InfocardUtils::advancedCertTest(IC_IMGURL); ?> 
     174                                <?php //pw_admin::advancedCertTest(IC_IMGURL); ?> 
    333175                                <br/>&nbsp;<a href="help/help.php?topic=advancedcerttest"><?php _e('More Information', 'wp-infocard');?></a> 
    334176                        </td></tr>