Plugin Directory

Changeset 338121


Ignore:
Timestamp:
01/28/2011 10:38:11 AM (15 years ago)
Author:
dlo
Message:

v 1.2 RC1

Location:
sabre/tags/1.2.0
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • sabre/tags/1.2.0/classes/sabre_class.php

    r271734 r338121  
    3232
    3333/***********************************************************************/
    34 
    3534/* Handling of Sabre in the Admin/Manage menu                          */
    3635/***********************************************************************/
     
    9594    // Choose the sequence of tests
    9695    if ($sabre_seq == 'Random') {
    97         $dice = mt_rand(1,3);
    98         switch ($dice) {
    99             case 1 :
    100                 $enable_math = 'false';
    101                 $enable_captcha = 'true';
    102                 $enable_text = 'false';
    103                 break;
    104             case 2 :
    105                 $enable_math = 'true';
    106                 $enable_captcha = 'false';
    107                 $enable_text = 'false';
    108                 break;
    109             case 3 :
    110                 $enable_math = 'false';
    111                 $enable_captcha = 'false';
    112                 $enable_text = 'true';
    113                 break;
    114         }
     96        $arr1 = array();
     97        $arr2 = array(  'enable_captcha' => 'false',
     98                'enable_math' => 'false',
     99                'enable_text' => 'false' );
     100        if ($enable_captcha == 'true')
     101            $arr1[] = 'enable_captcha';
     102        if ($enable_math == 'true')
     103            $arr1[] = 'enable_math';
     104        if ($enable_text == 'true')
     105            $arr1[] = 'enable_text';
     106        $dice = mt_rand(0,(count($arr1) - 1));
     107        $arr2[$arr1[$dice]] = 'true';
     108        extract ($arr2, EXTR_OVERWRITE);
    115109    }
    116110
     
    175169        echo '<input type="password" name="user_pwd1" id="user_pwd1" class="input" value="" size="20" tabindex="25" /></label>';
    176170        echo '<input type="password" name="user_pwd2" id="user_pwd2" class="input" value="" size="20" tabindex="26" /></label><br />';
    177         // echo '<strong>' . __('Strength indicator') . '</strong><br />';
    178         // echo '<label id="pass-strength-result">' . __('Too short', 'sabre') . '</label><br />' . __('Hint: Your password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).');
     171        echo '<strong>' . __('Strength indicator', 'sabre') . '</strong>';
     172        echo '<label id="pass-strength-result">' . __('Too short', 'sabre') . '</label><br />' . __('Hint: Your password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).', 'sabre');
    179173        echo '</p>';
    180174    }
     
    217211        if ( $errmsg = $errors->get_error_message('sabre_no_policy') )
    218212            echo '<p class="error">' .$errmsg .'</p>';
    219         echo '</label><input type="checkbox" name="policy" id="policy" class="input" value="yes" tabindex="45" /></label>';
     213        echo '<input type="checkbox" name="policy" id="policy" value="yes" tabindex="43" />';
    220214        _e('I agree', 'sabre');
    221         echo '</p>';
     215        echo '</label></p>';
    222216    }
    223217    if ($enable_invite == 'true') {
     
    921915        $sabre_opt['enable_text'] = (isset($form_values['sabre_enable_text']) ? 'true' : 'false');
    922916
    923         $sabre_opt['enable_confirm'] = $form_values['sabre_enable_confirm'];
     917        $sabre_opt['enable_confirm'] = (isset($form_values['sabre_enable_confirm']) ? $form_values['sabre_enable_confirm'] : 'none');
    924918        $sabre_opt['period'] = (1 > (int)$form_values['sabre_confirm_period'] ? 1 : (int)$form_values['sabre_confirm_period']);
    925919        $sabre_opt['no_entry'] = (isset($form_values['sabre_no_entry']) ? 'true' : 'false');
     
    962956function sabre_css ()
    963957{
    964     if ($_REQUEST['page'] == 'sabre')
     958    if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'sabre')
    965959        include_once(SABREPATH . 'sabre_css.php');
    966960}
     
    972966function login_css ()
    973967{
    974     /*
    975     if ($_REQUEST['action'] == 'register' || is_multisite()) {
     968    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'register' && !is_multisite()) {
    976969        wp_register_script('password-strength-meter', '/wp-admin/js/password-strength-meter.js', array('jquery'), '20070405');
    977970        wp_localize_script( 'password-strength-meter', 'pwsL10n', array(
     
    979972                'bad' => __('Bad', 'sabre'),
    980973                'good' => __('Good', 'sabre'),
    981                 'strong' => __('Strong', 'sabre')
     974                'strong' => __('Strong', 'sabre'),
     975                'mismatch' => __('Mismatch', 'sabre')
    982976            ) );
    983977        wp_print_scripts('password-strength-meter');
     
    988982        var pass = jQuery('#user_pwd1').val();
    989983        var user = jQuery('#user_login').val();
     984        var pass2 = jQuery('#user_pwd2').val();
    990985
    991986        // get the result as an object, i'm tired of typing it
    992987        var res = jQuery('#pass-strength-result');
    993988
    994         var strength = passwordStrength(pass, user);
     989        var strength = passwordStrength(pass, user, pass2);
    995990
    996991        jQuery(res).removeClass('short bad good strong');
     
    10071002            jQuery(res).addClass('strong');
    10081003            jQuery(res).html( pwsL10n.strong );
     1004        }
     1005        else if ( strength == 5 ) {
     1006            jQuery(res).addClass('short');
     1007            jQuery(res).html( pwsL10n.mismatch );
    10091008        }
    10101009        else {
     
    10161015        }
    10171016
    1018         jQuery(function($) {
    1019             $('#user_pwd1').keyup( check_pass_strength )
    1020             $('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
     1017        jQuery(document).ready(function($) {
     1018            $('#user_pwd1').keyup( check_pass_strength );
     1019            $('#user_pwd2').keyup( check_pass_strength );
     1020        $('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
    10211021        } );
    10221022
     
    10281028
    10291029    }
    1030     */
     1030   
    10311031    echo "<link rel=\"stylesheet\" href=\"" . SABREURL . "sabre_login.css" . "\" type=\"text/css\" />\r\n\r\n";
    10321032
     
    15241524    global $wp_version;
    15251525
    1526 
    15271526    if (version_compare($wp_version, '3.0', '<')) {
    15281527        deactivate_plugins('sabre'); // Deactivate ourself
  • sabre/tags/1.2.0/classes/sabre_class_admin.php

    r271734 r338121  
    304304            echo '<option value="All" ' . $this->selected($sabre_seq, 'All') . ' >' . __('All', 'sabre') . '</option>';
    305305            echo '<option value="Random" ' . $this->selected($sabre_seq, 'Random') . ' >' . __('Randomly', 'sabre') . '</option>';
    306 
    307306            echo '</select></td><td>' . __('(How do we use the above tests?)', 'sabre') . '</td></tr>';
    308307            echo '</table>';
  • sabre/tags/1.2.0/languages/sabre-fr_FR.po

    r271734 r338121  
    33"Project-Id-Version: \n"
    44"POT-Creation-Date: \n"
    5 "PO-Revision-Date: 2010-08-03 15:09+0100\n"
     5"PO-Revision-Date: 2011-01-06 18:30+0100\n"
    66"Last-Translator: DLO <DLO@DLO.com>\n"
    77"Language-Team: \n"
     
    4141msgstr "Code invit&eacute; utilis&eacute;."
    4242
     43msgid "Strength indicator"
     44msgstr "Indicateur de s&ucirc;ret&eacute;"
     45
     46msgid "Hint: Your password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! \" ? $ % ^ &amp; )."
     47msgstr "Conseil: Votre mot de passe doit comporter au moins sept caract&egrave;res. Pour le rendre plus s&ucirc;r, utilisez des majuscules, des minuscules, des chiffres et des symboles tels que ! \" ? $ % ^ &amp; )."
     48
    4349msgid "Too short"
    4450msgstr "Tr&egrave;s faible"
     
    5258msgid "Strong"
    5359msgstr "Forte"
     60
     61msgid "Mismatch"
     62msgstr "Non identique"
    5463
    5564msgid "Please enter your invitation code:"
     
    484493msgstr "Mot de passe: %s"
    485494
    486 msgid "[%s] Your username and password"
    487 msgstr "[%s] Votre identifiant et mot de passe"
     495msgid "Use the password defined during your registration"
     496msgstr "Utilisez le mot de passe choisi pendant l'enregistrement"
     497
     498msgid "[%s] - Your registration information"
     499msgstr "[%s] - Vos informations d'enregistrement"
    488500
    489501msgid "You must confirm your registration within %s day by following the link below"
  • sabre/tags/1.2.0/languages/sabre.pot

    r271734 r338121  
    4141msgstr ""
    4242
     43msgid "Strength indicator"
     44msgstr ""
     45
     46msgid "Hint: Your password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! \" ? $ % ^ &amp; )."
     47msgstr ""
     48
    4349msgid "Too short"
    4450msgstr ""
     
    5157
    5258msgid "Strong"
     59msgstr ""
     60
     61msgid "Mismatch"
    5362msgstr ""
    5463
     
    484493msgstr ""
    485494
    486 msgid "[%s] Your username and password"
     495msgid "Use the password defined during your registration"
     496msgstr ""
     497
     498msgid "[%s] - Your registration information"
    487499msgstr ""
    488500
  • sabre/tags/1.2.0/readme.txt

    r271734 r338121  
    44Tags: spam, admin, registration, register, security, antispam, anti-spam, authentication
    55Requires at least: 3.0
    6 Tested up to: 3.0.1
     6Tested up to: 3.1.0
    77Stable tag: 1.2.0
    88
     
    86861. [Spanish](http://www.faltantornillos.net/proyectos/gnu/otros/sabre-es_ES.tar.gz) (thanks to Daniel)
    87871. [Finnish](http://systemshed.com/sabre/sabre_fi_FI.zip) (thanks to Kimmo Sinkko)
    88 1. [German](http://matthiaskoch.net/?p=37) (thanks to Matthias Koch)
     881. [German](http://www.inbegriff.de/wp-content/uploads/languages.rar) (thanks to Andreas Schulz)
     891. [German - old version](http://matthiaskoch.net/?p=37) (thanks to Matthias Koch)
    89901. [Polish](http://dev.m1chu.eu/index.php?title=Polska_translacja_Sabre) (thanks to m1chu)
    90911. [Portuguese - Brazil](http://www.tudoparawordpress.com.br/download/plugins/sabre.0.8.1-pt-BR.zip) (thanks to Gustavo)
     
    275276= v1.2.0 =
    276277
    277 * Compliant with WordPress 3.0 or higher in mono and multisite mode.
    278 * CAUTION: This version won't run with WordPress prior to 3.0. See the NOTE 1 of the Description paragraph if you want to use Sabre with an older version of WordPress.
     278* CAUTION: This version won't run with WordPress versions prior to 3.0. See the NOTE 1 of the Description paragraph if you want to use Sabre with an older version of WordPress.
     279* Compliant with WordPress 3.0 or higher.
     280* (NEW) Usable in multisite mode. See list of features for restrictions.
     281* (ENHANCED) Random security test now choose among active tests only.
     282* (ENHANCED) Password no longer included in the registration mail if the custom password option is activated. 
     283* (FIXED) Few bugs fixed like Password strength indicator and missing HTML tags.
    279284
    280285= v1.1.2 =
  • sabre/tags/1.2.0/sabre.php

    r271734 r338121  
    7979        $plaintext_pass = $_POST['user_pwd1'];
    8080        wp_set_password($plaintext_pass, $user_id);
     81        delete_user_setting('default_password_nag', $user_id);
     82        update_user_option($user_id, 'default_password_nag', false, true);
    8183        }
    8284
    8385    $message  = sprintf(__('Thank you for registering on %s', 'sabre'), get_option('blogname')) . "\r\n\r\n";
    8486    $message .= sprintf(__('Username: %s', 'sabre'), $user_login) . "\r\n";
    85     $message .= sprintf(__('Password: %s', 'sabre'), $plaintext_pass) . "\r\n\r\n";
     87    if ($sabre_opt['user_pwd'] == 'true')
     88        $message .= __('Use the password defined during your registration', 'sabre') . "\r\n\r\n";
     89    else $message .= sprintf(__('Password: %s', 'sabre'), $plaintext_pass) . "\r\n\r\n";
    8690    if ($sabre_opt['enable_confirm'] == 'user') {
    8791        $message .= sprintf(__ngettext('You must confirm your registration within %s day by following the link below', 'You must confirm your registration within %s days by following the link below', $sabre_opt['period'], 'sabre'), $sabre_opt['period']) . "\r\n\r\n";
     
    96100    }
    97101
    98     wp_mail($user_email, sprintf(__('[%s] Your username and password', 'sabre'), get_option('blogname')), $message, $mail_from);
     102    wp_mail($user_email, sprintf(__('[%s] - Your registration information', 'sabre'), get_option('blogname')), $message, $mail_from);
    99103
    100104}
Note: See TracChangeset for help on using the changeset viewer.