Plugin Directory

Changeset 442393


Ignore:
Timestamp:
09/23/2011 01:00:41 AM (15 years ago)
Author:
jaredh123
Message:

convert contact log dbname, back-import p3 log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • prophoto-beta-tester/trunk/pp-beta-tester.php

    r442378 r442393  
    5656           
    5757        } else {
    58             $updatedContactLog = array();
     58            $updatedContactLog = (array) get_option( 'prophoto_theme_contact_log' );
    5959        }
    6060       
    6161        if ( $p3ContactLog = get_option( 'p3theme_contact_log' ) ) {
    62             $updatedContactLog = array_merge( $updatedContactLog, $p3ContactLog );
    63         }
    64        
     62            foreach ( $p3ContactLog as $entry ) {
     63                if ( !in_array( $entry, $updatedContactLog ) ) {
     64                    $updatedContactLog[] = $entry;
     65                }
     66            }
     67        }
     68
     69        if ( false == get_option( 'prophoto_theme_contact_log' ) ) {
     70            add_option( 'prophoto_theme_contact_log', '', '', 'no'  );
     71        }
    6572        $success = update_option( 'prophoto_theme_contact_log', $updatedContactLog );
    66         if ( $success ) {
    67             ppOpt::update( 'converted_log_format', 'true' );
    68         }
     73        delete_option( 'p4theme_contact_log' );
     74        ppOpt::update( 'converted_log_format', 'true' );
    6975    }
    7076   
Note: See TracChangeset for help on using the changeset viewer.