WordPress.org

Plugin Directory


Ignore:
Timestamp:
03/09/09 01:20:27 (8 years ago)
Author:
mark8barnes
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tng-wordpress-plugin/trunk/tng.php

    r100300 r100550  
    55Description: Integrates TNG (The Next Generation of Genealogy) with Wordpress. 
    66Author: Mark Barnes 
    7 Version: 0.22 
     7Version: 0.23 
    88Author URI: http://www.4-14.org.uk/ 
    99Copyright (c) 2008 Mark Barnes 
     
    9999            die(); 
    100100        } 
    101         else { 
    102             add_action('init', 'mbtng_initialise'); 
    103         } 
    104     } 
     101    } 
     102    add_action('init', 'mbtng_initialise'); 
    105103    add_action('widgets_init', 'mbtng_widget_init');                        // Initialise the widgets 
    106104    add_action('admin_menu', 'mbtng_add_admin_page');                       // Adds TNG menu to Wordpress admin 
     
    350348// Handles unsuccesful Wordpress login (checks to see if log-in would be successful in TNG) 
    351349function mbtng_intercept_login($username) { 
    352     global $wpdb; 
     350    global $wpdb, $users_table; 
    353351    if ($username) { 
    354352        $userdata = get_userdatabylogin($username); 
     
    397395// Replicates the functionality of processlogin.php 
    398396function mbtng_login() { 
    399     global $current_user, $rootpath; 
     397    global $current_user, $rootpath, $users_table; 
    400398    get_currentuserinfo(); 
    401399    $tng_user_name = mbtng_check_user($current_user->ID); 
     
    491489// Adds a new TNG user and returns the username 
    492490function mbtng_create_user($user_ID, $realname='', $tree='') { 
     491    global $users_table; 
    493492    $tng_folder = get_option('mbtng_path'); 
    494493    chdir($tng_folder); 
     
    565564// Deletes TNG users when deleted from Wordpress 
    566565function mbtng_delete_user($user_ID) { 
     566    global $users_table; 
    567567    $tng_user_id = get_usermeta($user_ID, 'tng_user_id'); 
    568568    if ($tng_user_id != '') { 
     
    715715        ob_start(); 
    716716        $code = file_get_contents(trailingslashit($tng_folder).$filename); 
    717         if ($admin) 
     717        if ($admin | $filename == 'pdfform.php') 
    718718            chdir($tng_folder); 
    719719        else { 
Note: See TracChangeset for help on using the changeset viewer.