Changeset 25774


Ignore:
Timestamp:
Dec 1, 2013, 11:01:27 PM (7 years ago)
Author:
LucMorizur
Message:

Compatibility with Piwigo version 2.6

Location:
extensions/LCAS
Files:
71 added
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/LCAS/branch/2.2/CHANGELOG.txt

    r10692 r25774  
     12011-27-04 2.2.4
     2                  Compatibility with version 2.6 of Piwigo: remove usage of
     3                  get_email_address_as_display_text() which is removed from
     4                  functions_user.inc.php
     5
     62012-10-01 2.2.3
     7                  Bug 2757 fixed : Notice when LCAS set to option 0 and admin
     8                  tries to create a user already present,
     9                  and cosmetic changes on language keys
     10
    1112011-27-04 2.2.2
    212                  Bug 2285 fixed : Compliance with Piwigo 2.1 and 2.2
  • extensions/LCAS/branch/2.2/admin/LCAS_admin.php

    r10549 r25774  
    2222
    2323load_language('plugin.lang', LCAS_PATH);
    24 load_language('help/plugin.lang', LCAS_PATH);
     24load_language('help.lang', LCAS_PATH);
    2525
    2626$error = array();
     
    4646    $_POST['LCAS_MailText']);
    4747
    48   $conf['LoginCaseAccentsSensitivity'] = serialize($newconf_LCAS);
    49 
    50   $query = '
    51     UPDATE '.CONFIG_TABLE.'
    52     SET value="'.addslashes($conf['LoginCaseAccentsSensitivity']).'"
    53     WHERE param="LoginCaseAccentsSensitivity"
    54     LIMIT 1
    55     ;';
    56  
    57   pwg_query($query);
     48  conf_update_param('LoginCaseAccentsSensitivity', pwg_db_real_escape_string(serialize($newconf_LCAS)));
    5849
    5950  array_push($page['infos'], l10n('LCAS_save_config'));
     
    123114          $query = '
    124115            UPDATE '.USERS_TABLE.'
    125             SET username="'.addslashes($_POST['user-'.$lcas_UserToUpdate]).'"
     116            SET username="'.pwg_db_real_escape_string($_POST['user-'.$lcas_UserToUpdate]).'"
    126117            WHERE id='.$lcas_UserToUpdate.'
    127118            LIMIT 1
     
    180171          'USERNAME'    => stripslashes($local_user['username']),
    181172          'COMPARE'     => stripslashes($local_user['transformed']),
    182           'EMAIL'       =>
    183            get_email_address_as_display_text($local_user['email']),
     173          'EMAIL'       => $local_user['email'],
    184174          'DISPLAY'     => $display,
    185175        )
  • extensions/LCAS/branch/2.2/include/admin_search.inc.php

    r10549 r25774  
    281281          ? '<br>['.l10n('default values').']' : ''),
    282282      'STATUS' => l10n('user_status_'.$local_user['status']),
    283       'EMAIL' => get_email_address_as_display_text($local_user['email']),
     283      'EMAIL' => $local_user['email'],
    284284      'GROUPS' => $groups_string,
    285285      'PROPERTIES' => implode( ', ', $properties),
  • extensions/LCAS/branch/2.2/main.inc.php

    r10692 r25774  
    22/*
    33Plugin Name: LCAS
    4 Version: 2.2.2
     4Version: 2.2.4
    55Description: Allow to disable login/register name to be sensible to the case/accents
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=513
  • extensions/LCAS/trunk/CHANGELOG.txt

    r18391 r25774  
     12011-27-04 2.2.4
     2                  Compatibility with version 2.6 of Piwigo: remove usage of
     3                  get_email_address_as_display_text() which is removed from
     4                  functions_user.inc.php
     5
    162012-10-01 2.2.3
    27                  Bug 2757 fixed : Notice when LCAS set to option 0 and admin
  • extensions/LCAS/trunk/admin/LCAS_admin.php

    r12206 r25774  
    171171          'USERNAME'    => stripslashes($local_user['username']),
    172172          'COMPARE'     => stripslashes($local_user['transformed']),
    173           'EMAIL'       =>
    174            get_email_address_as_display_text($local_user['email']),
     173          'EMAIL'       => $local_user['email'],
    175174          'DISPLAY'     => $display,
    176175        )
  • extensions/LCAS/trunk/include/admin_search.inc.php

    r10549 r25774  
    281281          ? '<br>['.l10n('default values').']' : ''),
    282282      'STATUS' => l10n('user_status_'.$local_user['status']),
    283       'EMAIL' => get_email_address_as_display_text($local_user['email']),
     283      'EMAIL' => $local_user['email'],
    284284      'GROUPS' => $groups_string,
    285285      'PROPERTIES' => implode( ', ', $properties),
  • extensions/LCAS/trunk/main.inc.php

    r18391 r25774  
    22/*
    33Plugin Name: LCAS
    4 Version: 2.2.3
     4Version: 2.2.4
    55Description: Allow to disable login/register name to be sensible to the case/accents
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=513
     
    8080    if (isset($_POST['username']) and isset($conf_LCAS[0]))
    8181    {
    82       $new_username =
    83        LCAS_SearchCaseUsername($_POST['username'], $conf_LCAS[0]);
    84       $_POST['username'] = ($new_username == '') ?
    85        $_POST['username'] : $new_username;
     82      $new_username = LCAS_SearchCaseUsername($_POST['username'],$conf_LCAS[0]);
     83      $_POST['username'] = $new_username == '' ? $_POST['username'] : $new_username;
    8684    }
    8785  }
    8886 
    89   // Add tooltips on register and identification page
    90   $sb = script_basename(); $fn = '';
    91   if ($sb == 'register' or $sb == 'identification')
    92    $fn = ($sb == 'register') ?
    93     'LCAS_add_tooltips_prefilter_register' :
    94     'LCAS_add_tooltips_prefilter_identification';
    95   if ($fn != '') {
     87  // Add tooltips on register page
     88  if (script_basename() == 'register') {
    9689    $template->assign(array(
    97       'LCAS_username_tooltip' =>
    98        $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])],
    99       'LCAS_password_tooltip' =>
    100        $lang['LCAS_tooltip_password_register'],
     90      'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])],
     91      'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_register'],
    10192    ));
    102     $template->set_prefilter($sb, $fn);
     93    $template->set_prefilter('register', 'LCAS_add_tooltips_prefilter_register');
    10394  }
    10495}
     
    126117}
    127118
    128 function LCAS_add_tooltips_prefilter_identification($content, &$smarty) {
    129   $search = 'for="username"';
    130   $replacement = 'for="username" title="{$LCAS_username_tooltip}"';
    131   $content = str_replace($search, $replacement, $content);
    132   $search = 'name="username"';
    133   $replacement = 'name="username" title="{$LCAS_username_tooltip}"';
    134   $content = str_replace($search, $replacement, $content);
    135   $search = 'for="password"';
    136   $replacement = 'for="password" title="{$LCAS_password_tooltip}"';
    137   $content = str_replace($search, $replacement, $content);
    138   $search = 'name="password"';
    139   $replacement = 'name="password" title="{$LCAS_password_tooltip}"';
    140   $content = str_replace($search, $replacement, $content);
    141   return $content;
    142 }
    143 
    144119// Check users registration
    145120// Returns error
     
    157132   $NewPostLogin = LCAS_SearchCaseUsername($_POST['login'], $conf_LCAS[0]);
    158133 
    159   if (isset($NewPostLogin) and get_userid($NewPostLogin) and (intval($conf_LCAS[0]) != 0))
     134  if (isset($NewPostLogin) and get_userid($NewPostLogin))
    160135   $errors[] = $lang['LCAS_error'][intval($conf_LCAS[0])];
    161136 
Note: See TracChangeset for help on using the changeset viewer.