Plugin Directory

Changeset 225895


Ignore:
Timestamp:
04/06/2010 09:40:54 PM (16 years ago)
Author:
onigoetz
Message:

Committed changes : 0.6.3

Location:
phpbb-single-sign-on
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • phpbb-single-sign-on/trunk/common-functions.php

    r203362 r225895  
    3232        'folder' => ABSPATH.PHPBBPATH
    3333        ),
    34     'common.orig' => array(
    35         'destin' => ABSPATH.PHPBBPATH.'common.orig.php',
     34    'common-orig' => array(
     35        'destin' => ABSPATH.PHPBBPATH.'common-orig.php',
    3636        )
    3737    );
     
    100100            'destin' => wpbb_get_file_version($config_files['common']['destin'])
    101101            ),
    102         'common.orig' => array(
    103             'destin' => wpbb_get_file_version($config_files['common.orig']['destin']),
     102        'common-orig' => array(
     103            'destin' => wpbb_get_file_version($config_files['common-orig']['destin']),
    104104            )
    105105        );
     
    134134        return 0;
    135135    }
    136 
    137 
    138 
    139     //TODO :: MAKE IT REALLY WORK
    140     return 'phpbb_';
    141136}
    142137
     
    148143        'auth_wpbb.php' => true,
    149144        'common.php' => true,
    150         'common.orig.php' => true,
     145        'common-orig.php' => true,
    151146        'auth_method' => true,
    152147        'path_var' => true
     
    166161    }
    167162
    168     //common.orig.php
    169     if($file_versions['common.orig']['destin'] != 'Original'){
     163    //common-orig.php
     164    if($file_versions['common-orig']['destin'] != 'Original'){
    170165        $error = true ;
    171         $test['common.orig.php'] = false;
     166        $test['common-orig.php'] = false;
    172167    }
    173168
     
    212207            </tr>
    213208            <tr>
    214                 <td>common.orig.php</td>
     209                <td>common-orig.php</td>
    215210                <td>-</td>
    216                 <td>'.$file_versions['common.orig']['destin'].'</td>
    217                 <td>'.wpbb_passed_test($test['common.orig.php']).'</td>
     211                <td>'.$file_versions['common-orig']['destin'].'</td>
     212                <td>'.wpbb_passed_test($test['common-orig.php']).'</td>
    218213            </tr>
    219214            <tr>
     
    301296                wpbb_get_files_list($directory.'/'.$name, &$list, $base.$name.'/');
    302297            } else {
    303                 if(strpos($name, '.php') !== false && $name != 'auth_wpbb.php' && $name != 'common.orig.php'){
     298                if(strpos($name, '.php') !== false && $name != 'auth_wpbb.php' && $name != 'common-orig.php'){
    304299                    $list[] = $base.$name;
    305300                }
  • phpbb-single-sign-on/trunk/connect-phpbb.php

    r210404 r225895  
    22/*
    33Plugin Name: PHPBB Single Sign On
    4 Version: 0.6.2
     4Version: 0.6.3
    55Plugin URI: http://www.onigoetz.ch/plugins/wordpress-phpbb-plugin/
    66Description: Connecte un site wordpress à PHPBB
  • phpbb-single-sign-on/trunk/files/auth_wpbb.php

    r210404 r225895  
    66*
    77* @package login
    8 * @version 0.6.2
     8* @version 0.6.3
    99* @license http://opensource.org/licenses/gpl-license.php GNU Public License
    1010*
     
    7676        $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
    7777            FROM ' . USERS_TABLE . "
    78             WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
     78            WHERE username = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
    7979        $result = $db->sql_query($sql);
    8080        $phpBB_user = $db->sql_fetchrow($result);
  • phpbb-single-sign-on/trunk/files/common.php

    r210404 r225895  
    66*
    77* @package login
    8 * @version 0.6.2
     8* @version 0.6.3
    99* @license http://opensource.org/licenses/gpl-license.php GNU Public License
    1010*
     
    2828    //includes/constants.php
    2929
    30 $include_common_contents = include_for_eval($phpbb_root_path . 'common.orig.' . $phpEx);
     30$include_common_contents = include_for_eval($phpbb_root_path . 'common-orig.' . $phpEx);
    3131
    3232//called on line 127 of common.php //require($phpbb_root_path . 'config.' . $phpEx);
     
    5555$include_common_contents = str_replace('make_clickable','wpbb_make_clickable',$include_common_contents);
    5656
     57
     58/*
     59 * COOKIE
     60 */
     61
    5762//corrige le get_cookie
    5863$original_get_cookie = array(
     
    7075$include_common_contents = str_replace($original_get_cookie,$new_get_cookie,$include_common_contents);
    7176
    72 //Include de la version modifie de common.php
     77//Include de la version modifiée de common.php
    7378eval($include_common_contents);
    7479
  • phpbb-single-sign-on/trunk/module.phpbb.php

    r194075 r225895  
    2525        // Hack to fix declaration of make_clickable
    2626        //do not include the function_content, there is a depedency in auth_op to check if it's opened from within phpbb or within wordpress
    27         $include_contents = file_get_contents($phpbb_root_path . 'common.orig.' . $phpEx);
     27
     28                if(file_exists($phpbb_root_path . 'common-orig.' . $phpEx)){
     29                    $common_file = $phpbb_root_path . 'common-orig.' . $phpEx;
     30                } else {
     31                    $common_file = $phpbb_root_path . 'common.orig.' . $phpEx;
     32                }
     33
     34
     35        $include_contents = file_get_contents($common_file);
    2836        $include_contents = str_replace('<?php','',$include_contents);
    2937        $include_contents = str_replace('?>','',$include_contents);
  • phpbb-single-sign-on/trunk/module.wp.php

    r194075 r225895  
    1010        }
    1111        else{
    12             $include_registration_contents = file_get_contents(ABSPATH . WPINC . '/registration.php');
    13             $include_registration_contents = preg_replace('/^\<\?php/','',$include_registration_contents);
    14             $include_registration_contents = preg_replace('/\?\>$/','',$include_registration_contents);
    15             $include_registration_contents = str_replace('validate_username','op_validate_username',$include_registration_contents);
    16 
    17             $include_admin_contents = file_get_contents(ABSPATH . '/wp-admin/includes/admin.php');
    18             $include_admin_contents = preg_replace('/^\<\?php/','',$include_admin_contents);
    19             $include_admin_contents = preg_replace('/\?\>$/','',$include_admin_contents);
    20             $include_admin_contents = str_replace('require_once(ABSPATH . WPINC . \'/registration.php\');',$include_registration_contents,$include_admin_contents);
    21 
    22             eval($include_admin_contents);
     12                    $include_registration_contents = file_get_contents(ABSPATH . WPINC . '/registration.php');
     13                    $include_registration_contents = preg_replace('/^\<\?php/','',$include_registration_contents);
     14                    $include_registration_contents = preg_replace('/\?\>$/','',$include_registration_contents);
     15                    $include_registration_contents = str_replace('validate_username','op_validate_username',$include_registration_contents);
     16
     17                    $include_admin_contents = file_get_contents(ABSPATH . '/wp-admin/includes/admin.php');
     18                    $include_admin_contents = preg_replace('/^\<\?php/','',$include_admin_contents);
     19                    $include_admin_contents = preg_replace('/\?\>$/','',$include_admin_contents);
     20                    $include_admin_contents = str_replace('require_once(ABSPATH . WPINC . \'/registration.php\');',$include_registration_contents,$include_admin_contents);
     21
     22                    eval($include_admin_contents);
    2323        }
    2424    }
  • phpbb-single-sign-on/trunk/options.php

    r203362 r225895  
    3333}
    3434
     35//Version compatibility before 0.6.3
     36if(file_exists(ABSPATH.PHPBBPATH.'common.orig.php')){
     37    copy(ABSPATH.PHPBBPATH.'common.orig.php',$config_files['common-orig']['destin']);
     38    unlink(ABSPATH.PHPBBPATH.'common.orig.php');
     39}
    3540
    3641//POST : Install the plugin
     
    5459            if(wpbb_get_file_version($config_files['common']['destin']) == 'Original') {
    5560                    //is original file there ?
    56                     if(file_exists($config_files['common.orig']['destin'])){
    57                             unlink($config_files['common.orig']['destin']);
     61                    if(file_exists($config_files['common-orig']['destin'])){
     62                            unlink($config_files['common-orig']['destin']);
    5863                    }
    5964                    //put the original file there
    60                     copy($config_files['common']['destin'],$config_files['common.orig']['destin']);
     65                    copy($config_files['common']['destin'],$config_files['common-orig']['destin']);
    6166            }
    6267
     
    147152            <?php if(wpbb_get_file_version($config_files['common']['destin']) == 'Original'){ ?>
    148153            <p>It seems that this file is the original common.php file.<br />
    149             you will have to rename this file from <strong>common.php</strong> to <strong>common.orig.php</strong><br />
     154            you will have to rename this file from <strong>common.php</strong> to <strong>common-orig.php</strong><br />
    150155            the file is in the folder <strong><?php echo $config_files['common']['folder'] ?></strong></p>
    151156            <?php } ?>
    152157            <p>This file must be copied from <strong><?php echo $config_files['common']['source']; ?></strong> to <strong><?php echo $config_files['common']['destin']; ?></strong></p>
    153158
    154             <p><strong>common.orig.php</strong></p>
     159            <p><strong>common-orig.php</strong></p>
    155160            <p>You already did this on the previous step, this file doesn't exist by default, it's the original common.php file, because this script needs another one in place to load some libraries</p>
    156161
  • phpbb-single-sign-on/trunk/readme.txt

    r210404 r225895  
    3232* Make it work on multiple db's
    3333* Ability to put wordpress in a child folder of phpbb or at the same level
     34
     35= 0.6.3 =
     36* Bugfix : Changed common.orig.php to common-orig.php to solve some problems
     37* Change : Changed the match from username_clean to username, should solve some problems with the double usernames
    3438
    3539= 0.6.2 =
Note: See TracChangeset for help on using the changeset viewer.