Ignore:
Timestamp:
Feb 21, 2010, 4:44:14 PM (14 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager] Pre-2.13.4 for testing only:

  • Bug 1303 and 1387 fixed : There is a bug in Piwigo 2.0.8 about switch_lang() function. This may be fixed in the next Piwigo release. These UAM fix are available only for Piwigo 2.0.8 and have to be recoded for the next Piwigo release. (Thx to Rub and cljosse for their usefull help).
  • Bug 1444 fixed
  • Bug 1445 pre-fixed : Begining of plugin's admin panel improvement. Add of new help language files (FR for the moment), deletion of ConfirmMail tab, mix all config in one tab, add of cuetips. This is for testing !
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/main.inc.php

    r4458 r4927  
    22/*
    33Plugin Name: NBC UserAdvManager
    4 Version: 2.13.3
     4Version: 2.13.4
    55Description: Renforcer les possibilités de gestion des utilisateurs - Enforce users management
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
     
    99*/
    1010
    11 /* History:  NBC_UserAdvManager_PATH.'Changelog.txt.php' */
     11/* History:  NBC_UAM_PATH.'Changelog.txt.php' */
    1212
    1313/*
     
    3737*/
    3838
    39 
    40 if (!defined('PHPWG_ROOT_PATH'))
    41 {
    42   die('Hacking attempt!');
    43 }
    44 
    45 define('NBC_UserAdvManager_DIR' , basename(dirname(__FILE__)));
    46 define('NBC_UserAdvManager_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
    47 
    48 include_once (NBC_UserAdvManager_PATH.'include/constants.php');
    49 include_once (NBC_UserAdvManager_PATH.'include/functions_UserAdvManager.inc.php');
    50 
    51 load_language('plugin.lang', NBC_UserAdvManager_PATH);
     39if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     40if (!defined('NBC_UAM_DIR')) define('NBC_UAM_DIR' , basename(dirname(__FILE__)));
     41if (!defined('NBC_UAM_PATH')) define('NBC_UAM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
     42
     43include_once (NBC_UAM_PATH.'include/constants.php');
     44include_once (NBC_UAM_PATH.'include/functions_UserAdvManager.inc.php');
     45
     46load_language('plugin.lang', NBC_UAM_PATH);
    5247
    5348
     
    6055    array(
    6156      'NAME' => 'UserAdvManager',
    62       'URL'  => get_admin_plugin_menu_link(NBC_UserAdvManager_PATH.'/admin/UserAdvManager_admin.php')
     57      'URL'  => get_admin_plugin_menu_link(NBC_UAM_PATH.'/admin/UserAdvManager_admin.php')
    6358    )
    6459  );
     
    6762}
    6863
    69 
     64/* Lastvisit table feed for Ghost Tracker */
    7065add_event_handler('loc_begin_index', 'UserAdvManager_GhostTracker');
    7166
     
    124119 
    125120  /* Sending registration confirmation by email */
    126   if ((isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true') or (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true'))
     121  if ((isset($conf_nbc_UserAdvManager[0]) and $conf_nbc_UserAdvManager[0] == 'true' and !is_admin()) or (isset($conf_nbc_UserAdvManager[2]) and $conf_nbc_UserAdvManager[2] == 'true' and !is_admin()))
    127122  {
    128123    $passwd = (isset($_POST['password'])) ? $_POST['password'] : '';
     
    267262
    268263  /* Username without forbidden keys */
    269   if (isset($conf_nbc_UserAdvManager[7]) and $conf_nbc_UserAdvManager[7] == 'true' and !empty($_POST['login']) and ValidateUsername($_POST['login']))
     264  if (isset($conf_nbc_UserAdvManager[7]) and $conf_nbc_UserAdvManager[7] == 'true' and !empty($_POST['login']) and ValidateUsername($_POST['login']) and !is_admin())
    270265  {
    271266    $_POST['login'] = '';
     
    274269
    275270  /* Email without forbidden domains */
    276   if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']) and ValidateEmailProvider($_POST['mail_address']))
     271  if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']) and ValidateEmailProvider($_POST['mail_address']) and !is_admin())
    277272  {
    278273    $_POST['mail_address'] = '';
     
    292287    $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();
    293288
    294     if (isset($_POST['validate']))
     289    if (isset($_POST['validate']) and !is_admin())
    295290    {
    296291      /* Email without forbidden domains */
     
    367362function UserAdvManager_InitPage()
    368363{
    369   load_language('plugin.lang', NBC_UserAdvManager_PATH);
     364  load_language('plugin.lang', NBC_UAM_PATH);
    370365  global $conf, $template, $page, $lang, $errors;
    371366
     
    392387function UserAdvManager_CheckEmptyCommentAuthor($comment_action, $comm)
    393388{
    394   load_language('plugin.lang', NBC_UserAdvManager_PATH);
     389  load_language('plugin.lang', NBC_UAM_PATH);
    395390  global $infos, $conf, $template;
    396391
Note: See TracChangeset for help on using the changeset viewer.