Ignore:
Timestamp:
Nov 20, 2009, 10:56:32 PM (14 years ago)
Author:
LucMorizur
Message:

[Event Cats] Finish duplication management, configuration management, code cleaning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/duplication.inc.php

    r4276 r4329  
    11<?php
     2// +-----------------------------------------------------------------------+
     3// | Plugin Name : Event Cats                                              |
     4// | Plugin Version : 1.0                                                  |
     5// | File Version : 1.0                                                    |
     6// | Plugin Version author : LucMorizur                                    |
     7// | Plugin description : (plugin for Piwigo, http://piwigo.org )          |
     8// | This plugin allows an account to be automatically logged in ; and to  |
     9// | let users duplicate the account they are logged with, to get benefits |
     10// | of the groups of the previous account, immediately on their new acc.  |
     11// | Ce plugin permet d'identifier automatiquement un compte ; et permet à |
     12// | un utilisateur de dupliquer un compte, pour que le nouveau compte     |
     13// | bénéficie immédiatement de l'affectation aux groupes de l'ancien cpte |
     14// +-----------------------------------------------------------------------+
    215
     16// +-----------------------------------------------------------------------+
     17// | Piwigo - a PHP based picture gallery                                  |
     18// +-----------------------------------------------------------------------+
     19// | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
     20// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
     21// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     22// +-----------------------------------------------------------------------+
     23// | This program is free software; you can redistribute it and/or modify  |
     24// | it under the terms of the GNU General Public License as published by  |
     25// | the Free Software Foundation                                          |
     26// |                                                                       |
     27// | This program is distributed in the hope that it will be useful, but   |
     28// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
     29// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
     30// | General Public License for more details.                              |
     31// |                                                                       |
     32// | You should have received a copy of the GNU General Public License     |
     33// | along with this program; if not, write to the Free Software           |
     34// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
     35// | USA.                                                                  |
     36// +-----------------------------------------------------------------------+
    337
     38if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    439
     40global $ec_conf_default;
    541
     42// +-----------------------------------------------------------------------+
     43// | Duplication granted per groups/types/users management                 |
     44// +-----------------------------------------------------------------------+
    645
    7 
    8 /* */
    9 
    10 
    11 
    12 
    13 
    14 
    15 
    16 
     46// In evntcats_main_funcs.inc.php ; determines all granted groups/types/users
     47// Thanks to "true" parameter, assigns to the template all needed variables
    1748build_dup_arrays(true);
    1849
     50// Gets $lang['Register'] and $lang['Duplicate']
     51load_language('common.lang');
     52load_language('duplic.lang', EVNTCATS_PATH);
    1953
     54$template->assign(
     55  'ec_dup_link_conf',
     56  sprintf(
     57    l10n('Register replacement'),
     58    '&nbsp;&nbsp;<br />', // nicer line feed
     59    $lang['Register'],
     60    $lang['Duplicate']
     61  )
     62);
    2063
     64// In case some $lang have the same index, overwrites them to have the ones
     65// needed here
     66load_language('plugin.lang', EVNTCATS_PATH);
    2167
    22 
    23 
    24 
    25 
    26 
    27 
    28 
     68$ec_conf2 = array();
     69$ec_conf2['dup_allow'] = read_ec_conf('dup_allow');
     70$ec_conf2['duplic_display'] = read_ec_conf('duplic_display');
     71$template->assign('ec_conf', $ec_conf2);
    2972
    3073?>
Note: See TracChangeset for help on using the changeset viewer.