Index: /extensions/Piwecard/admin.php
===================================================================
--- /extensions/Piwecard/admin.php	(revision 20087)
+++ /extensions/Piwecard/admin.php	(revision 20088)
@@ -11,14 +11,16 @@
 // |                            Tabsheet
 // +-----------------------------------------------------------------------+
-if (empty($conf['Ecard_tabs'])) {
-  $conf['Ecard_tabs'] = array('authorizations', 'configuration', 'management');
-}
+$piwecard_tabs = array('permissions', 'configuration', 'management');
 
-$page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : $conf['Ecard_tabs'][0];
+if (isset($_GET['tab']))
+	$page['tab'] = $_GET['tab'];
+else
+	$page['tab'] = $piwecard_tabs[0];
 
-if (!in_array($page['tab'], $conf['Ecard_tabs'])) die('Hacking attempt!');	
+if (!in_array($page['tab'], $piwecard_tabs)
+	die('Hacking attempt!');
 
 $tabsheet = new tabsheet();
-foreach ($conf['Ecard_tabs'] as $tab) {
+foreach ($piwecard_tabs as $tab) {
 	$tabsheet->add($tab, l10n('piwecard_admin_'.$tab), PIWECARD_ADMIN.'-'.$tab);
 }
Index: tensions/Piwecard/admin/admin_authorizations.php
===================================================================
--- /extensions/Piwecard/admin/admin_authorizations.php	(revision 20087)
+++ 	(revision )
@@ -1,97 +1,0 @@
-<?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-global $template, $page;
- 
-$piwecard = get_plugin_data($plugin_id);
-
-$template->set_filenames(array(
-	'plugin_admin_content' 	=> PIWECARD_ROOT.'/admin/template/admin_authorizations.tpl',
-	'double_select' 		=> 'double_select.tpl'
-));
-
-// Switch on right side (=>)	
-if (isset($_POST['falsify']) and isset($_POST['cat_true']) and count($_POST['cat_true']) > 0) {
-	$piwecard->my_config['authorized_cats'] = 'selected';
-	
-	foreach ($_POST['cat_true'] as $cat)
-		unset($piwecard->my_config['selected_cats'][array_search($cat, $piwecard->my_config['selected_cats'])]);
-	$piwecard->set_config();
-}
-
-// Switch on left side (<=)
-if (isset($_POST['trueify']) and isset($_POST['cat_false']) and count($_POST['cat_false']) > 0) {
-	$query = 'SELECT id, name, uppercats, global_rank FROM '.CATEGORIES_TABLE.' WHERE id IN ("'.implode('","', $_POST['cat_false']).'");';
-	$result = pwg_query($query);
-
-	$piwecard->my_config['authorized_cats'] = 'selected';
-	
-	if (!empty($result)) {
-		while ($cat = pwg_db_fetch_assoc($result))
-			array_push($piwecard->my_config['selected_cats'], $cat['id']);			
-	}
-	usort($piwecard->my_config['selected_cats'], 'global_rank_compare');
-
-	$piwecard->set_config();
-}
-
-if (isset($_POST['submit'])) { 
-	$piwecard->my_config['authorized_cats'] = $_POST['ecard_authorized_cats'];
-	$piwecard->set_config();
-	array_push($page['infos'], l10n('Information data registered in database'));
-}
-
-//Populate double_select
-$query = 'SELECT id, name, uppercats, global_rank FROM '.CATEGORIES_TABLE.' WHERE id not IN ("'.implode('","', $piwecard->my_config['selected_cats']).'");';
-$result = pwg_query($query);
-$categories = array();
-if (!empty($result)) {
-	while ($row = pwg_db_fetch_assoc($result))
-		array_push($categories, $row);
-}
-usort($categories, 'global_rank_compare');
-
-$tpl = array();
-if (!empty($result)) {
-	foreach ($categories as $cat) {
-      	$tpl[$cat['id']] = get_cat_display_name_cache($cat['uppercats'], null, false);
-	}
-}
-$template->assign('category_option_false', $tpl);
-$template->assign('category_option_false_selected', array());
-
-$query = 'SELECT id, name, uppercats, global_rank FROM '.CATEGORIES_TABLE.' WHERE id IN ("'.implode('","', $piwecard->my_config['selected_cats']).'");';
-$result = pwg_query($query);
-$categories = array();
-if (!empty($result)) {
-	while ($row = pwg_db_fetch_assoc($result))
-		array_push($categories, $row);
-}
-usort($categories, 'global_rank_compare');
-
-$tpl2 = array();
-if (!empty($result)) {
-	foreach ($categories as $cat) {
-      	$tpl2[$cat['id']] = get_cat_display_name_cache($cat['uppercats'], null, false);
-	}
-}
-$template->assign('category_option_true', $tpl2);
-$template->assign('category_option_true_selected', array());
-
-$template->assign('ecard', array(
-								'all_cats_checked' => (($piwecard->my_config['authorized_cats'] == 'all') ? 'checked="checked"' : ''),
-								'selected_cats_checked' => (($piwecard->my_config['authorized_cats'] == 'selected') ? 'checked="checked"' : ''),
-								'user_cats_checked' => (($piwecard->my_config['authorized_cats'] == 'user') ? 'checked="checked"' : ''),
-							)
-);
-
-$template->assign(array(
-						'F_ACTION' => '',
-						'L_CAT_OPTIONS_TRUE' => l10n('piwecard_selected_cats'),
-						'L_CAT_OPTIONS_FALSE' => l10n('piwecard_non_selected_cats'),
-					)
-);
-
-$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
-$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
-?>
Index: /extensions/Piwecard/admin/admin_configuration.php
===================================================================
--- /extensions/Piwecard/admin/admin_configuration.php	(revision 20087)
+++ /extensions/Piwecard/admin/admin_configuration.php	(revision 20088)
@@ -52,5 +52,5 @@
 	foreach ($configuration as $key => $item) {
 		if (!array_key_exists($key, $errors)) {
-			$piwecard->my_config[$key] = $configuration[$key];
+			$piwecard->config[$key] = $configuration[$key];
 		}
 	}
@@ -65,20 +65,20 @@
 }
 
-foreach($piwecard->my_config['validity'] as $validity) {
+foreach($piwecard->config['validity'] as $validity) {
 	$template->append('ecard_validity', array(
 											'id' => $validity,
 											'name' => ($validity == 0) ? l10n('piwecard_nolimit') : $validity.' '.l10n('piwecard_days'),
-											'selected' => (($piwecard->my_config['validity_default'] == $validity) ? 'selected' : ''),
+											'selected' => (($piwecard->config['validity_default'] == $validity) ? 'selected' : ''),
 										)
 	);
 }
-$template->assign('ecard_sender_copy', $piwecard->my_config['sender_copy'] ? 'checked="checked"' : '');
-$template->assign('ecard_sender_email_change', $piwecard->my_config['sender_email_change'] ? 'checked="checked"' : '');
+$template->assign('ecard_sender_copy', $piwecard->config['sender_copy'] ? 'checked="checked"' : '');
+$template->assign('ecard_sender_email_change', $piwecard->config['sender_email_change'] ? 'checked="checked"' : '');
 $email_format_array = array();
-foreach($piwecard->my_config['email_format'] as $email_format) {
+foreach($piwecard->config['email_format'] as $email_format) {
 	array_push($email_format_array, array(
 											'id' => $email_format,
-											'selected' => (in_array($email_format, $piwecard->my_config['email_format_authorized']) ? 'checked="checked"' : ''),
-											'selected_default' => (($piwecard->my_config['email_format_default'] == $email_format) ? 'checked="checked"' : ''),
+											'selected' => (in_array($email_format, $piwecard->config['email_format_authorized']) ? 'checked="checked"' : ''),
+											'selected_default' => (($piwecard->config['email_format_default'] == $email_format) ? 'checked="checked"' : ''),
 											'language_string' => 'piwecard_email_format_'.$email_format,
 										)
@@ -87,9 +87,9 @@
 $template->assign('ecard_email_format', $email_format_array);
 $template->assign('ecard_email_format_default', $email_format_array);
-$template->assign('ecard_show_image_infos', $piwecard->my_config['show_image_infos'] ? 'checked="checked"' : '');
-$template->assign('ecard_default_guest_email', ((isset($configuration['default_guest_email'])) ? $configuration['default_guest_email'] : $piwecard->my_config['default_guest_email']));
-$template->assign('ecard_email_subject', ((isset($configuration['email_subject'])) ? $configuration['email_subject'] : htmlspecialchars_decode($piwecard->my_config['email_subject'])));
-$template->assign('ecard_email_message_text', ((isset($configuration['email_message']['text'])) ? $configuration['email_message']['text'] : htmlspecialchars_decode($piwecard->my_config['email_message']['text'])));
-$template->assign('ecard_email_message_html', ((isset($configuration['email_message']['html'])) ? $configuration['email_message']['html'] : htmlspecialchars_decode($piwecard->my_config['email_message']['html'])));
+$template->assign('ecard_show_image_infos', $piwecard->config['show_image_infos'] ? 'checked="checked"' : '');
+$template->assign('ecard_default_guest_email', ((isset($configuration['default_guest_email'])) ? $configuration['default_guest_email'] : $piwecard->config['default_guest_email']));
+$template->assign('ecard_email_subject', ((isset($configuration['email_subject'])) ? $configuration['email_subject'] : htmlspecialchars_decode($piwecard->config['email_subject'])));
+$template->assign('ecard_email_message_text', ((isset($configuration['email_message']['text'])) ? $configuration['email_message']['text'] : htmlspecialchars_decode($piwecard->config['email_message']['text'])));
+$template->assign('ecard_email_message_html', ((isset($configuration['email_message']['html'])) ? $configuration['email_message']['html'] : htmlspecialchars_decode($piwecard->config['email_message']['html'])));
     
 $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/admin_configuration.tpl');
Index: /extensions/Piwecard/admin/admin_management.php
===================================================================
--- /extensions/Piwecard/admin/admin_management.php	(revision 20087)
+++ /extensions/Piwecard/admin/admin_management.php	(revision 20088)
@@ -8,7 +8,7 @@
 if (isset($_POST['nb_ecard_page_submit'])) {
 	if (intval($_POST['ecard_nb_ecard_page']) == 0)
-		$piwecard->my_config['nb_ecard_page'] = 1;
+		$piwecard->config['nb_ecard_page'] = 1;
 	else
-		$piwecard->my_config['nb_ecard_page'] = intval($_POST['ecard_nb_ecard_page']);
+		$piwecard->config['nb_ecard_page'] = intval($_POST['ecard_nb_ecard_page']);
 	$piwecard->set_config();
 }
@@ -32,5 +32,5 @@
 
 $start =  (isset($_GET['start']) ? $_GET['start'] : 0);
-if ($start != 0 and $piwecard->get_nb_ecard() == $piwecard->my_config['nb_ecard_page'])
+if ($start != 0 and $piwecard->get_nb_ecard() == $piwecard->config['nb_ecard_page'])
 	$start = 0;
 
@@ -38,7 +38,7 @@
 $management_url = PIWECARD_ADMIN.'-management';
 $ecard_navbar = array();
-$ecard_navbar = create_navigation_bar($management_url, $piwecard->get_nb_ecard(), $start, $piwecard->my_config['nb_ecard_page']);
+$ecard_navbar = create_navigation_bar($management_url, $piwecard->get_nb_ecard(), $start, $piwecard->config['nb_ecard_page']);
 
-$query = 'SELECT * FROM '.PIWECARD_TABLE.' ORDER BY date_creation DESC LIMIT '.$start.','.$piwecard->my_config['nb_ecard_page'].';';
+$query = 'SELECT * FROM '.PIWECARD_TABLE.' ORDER BY date_creation DESC LIMIT '.$start.','.$piwecard->config['nb_ecard_page'].';';
 $result = pwg_query($query);
 
@@ -66,5 +66,5 @@
 
 $template->assign('nb_ecard_valid_total', $nb_ecard_valid_total);
-$template->assign('ecard_nb_ecard_page', $piwecard->my_config['nb_ecard_page']);
+$template->assign('ecard_nb_ecard_page', $piwecard->config['nb_ecard_page']);
 $template->assign('navbar', $ecard_navbar);
 
Index: /extensions/Piwecard/admin/admin_permissions.php
===================================================================
--- /extensions/Piwecard/admin/admin_permissions.php	(revision 20088)
+++ /extensions/Piwecard/admin/admin_permissions.php	(revision 20088)
@@ -0,0 +1,97 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $template, $page;
+ 
+$piwecard = get_plugin_data($plugin_id);
+
+$template->set_filenames(array(
+	'plugin_admin_content' 	=> PIWECARD_ROOT.'/admin/template/admin_permissions.tpl',
+	'double_select' 		=> 'double_select.tpl'
+));
+
+// Switch on right side (=>)	
+if (isset($_POST['falsify']) and isset($_POST['cat_true']) and count($_POST['cat_true']) > 0) {
+	$piwecard->config['authorized_cats'] = 'selected';
+	
+	foreach ($_POST['cat_true'] as $cat)
+		unset($piwecard->config['selected_cats'][array_search($cat, $piwecard->config['selected_cats'])]);
+	$piwecard->set_config();
+}
+
+// Switch on left side (<=)
+if (isset($_POST['trueify']) and isset($_POST['cat_false']) and count($_POST['cat_false']) > 0) {
+	$query = 'SELECT id, name, uppercats, global_rank FROM '.CATEGORIES_TABLE.' WHERE id IN ("'.implode('","', $_POST['cat_false']).'");';
+	$result = pwg_query($query);
+
+	$piwecard->config['authorized_cats'] = 'selected';
+	
+	if (!empty($result)) {
+		while ($cat = pwg_db_fetch_assoc($result))
+			array_push($piwecard->config['selected_cats'], $cat['id']);			
+	}
+	usort($piwecard->config['selected_cats'], 'global_rank_compare');
+
+	$piwecard->set_config();
+}
+
+if (isset($_POST['submit'])) { 
+	$piwecard->config['authorized_cats'] = $_POST['ecard_authorized_cats'];
+	$piwecard->set_config();
+	array_push($page['infos'], l10n('Information data registered in database'));
+}
+
+//Populate double_select
+$query = 'SELECT id, name, uppercats, global_rank FROM '.CATEGORIES_TABLE.' WHERE id not IN ("'.implode('","', $piwecard->config['selected_cats']).'");';
+$result = pwg_query($query);
+$categories = array();
+if (!empty($result)) {
+	while ($row = pwg_db_fetch_assoc($result))
+		array_push($categories, $row);
+}
+usort($categories, 'global_rank_compare');
+
+$tpl = array();
+if (!empty($result)) {
+	foreach ($categories as $cat) {
+      	$tpl[$cat['id']] = get_cat_display_name_cache($cat['uppercats'], null, false);
+	}
+}
+$template->assign('category_option_false', $tpl);
+$template->assign('category_option_false_selected', array());
+
+$query = 'SELECT id, name, uppercats, global_rank FROM '.CATEGORIES_TABLE.' WHERE id IN ("'.implode('","', $piwecard->config['selected_cats']).'");';
+$result = pwg_query($query);
+$categories = array();
+if (!empty($result)) {
+	while ($row = pwg_db_fetch_assoc($result))
+		array_push($categories, $row);
+}
+usort($categories, 'global_rank_compare');
+
+$tpl2 = array();
+if (!empty($result)) {
+	foreach ($categories as $cat) {
+      	$tpl2[$cat['id']] = get_cat_display_name_cache($cat['uppercats'], null, false);
+	}
+}
+$template->assign('category_option_true', $tpl2);
+$template->assign('category_option_true_selected', array());
+
+$template->assign('ecard', array(
+								'all_cats_checked' => (($piwecard->config['authorized_cats'] == 'all') ? 'checked="checked"' : ''),
+								'selected_cats_checked' => (($piwecard->config['authorized_cats'] == 'selected') ? 'checked="checked"' : ''),
+								'user_cats_checked' => (($piwecard->config['authorized_cats'] == 'user') ? 'checked="checked"' : ''),
+							)
+);
+
+$template->assign(array(
+						'F_ACTION' => '',
+						'L_CAT_OPTIONS_TRUE' => l10n('piwecard_selected_cats'),
+						'L_CAT_OPTIONS_FALSE' => l10n('piwecard_non_selected_cats'),
+					)
+);
+
+$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: tensions/Piwecard/admin/template/admin_authorizations.tpl
===================================================================
--- /extensions/Piwecard/admin/template/admin_authorizations.tpl	(revision 20087)
+++ 	(revision )
@@ -1,47 +1,0 @@
-{footer_script}
-{literal}
-$(document).ready(function(){
-	if ($("#ecard_selected_cats").prop('checked') == true) {
-		$("#ecard_selected_cats_options").css("display","block");
-	} else {
-		$("#ecard_selected_cats_options").css("display","none");
-	}
-
-	$("#ECardAdminAuthorizations").click(function(){
-		if ($("#ecard_selected_cats").prop('checked') == true) {
-			$("#ecard_selected_cats_options").show("fast");
-		} else {
-			$("#ecard_selected_cats_options").hide("fast");
-		}
-	});
-});
-{/literal}
-{/footer_script}
-
-<div class="titrePage">
-	<h2>{'piwecard_plugin'|@translate}</h2>
-</div>
-<form method="post" action="" class="properties">
-	<div id="ECardAdminAuthorizations">
-		<fieldset>
-			<legend>{'piwecard_authorizations_cat'|@translate}</legend>
-			<div class="ecard_radio">
-				<input type="radio" name="ecard_authorized_cats" id="ecard_all_cats" value="all" {$ecard.all_cats_checked} /><label for="ecard_all_cats"> {'piwecard_authorizations_all_cats'|@translate}</label>
-			</div>
-			<div class="ecard_radio">
-				<input type="radio" name="ecard_authorized_cats" id="ecard_selected_cats" value="selected" {$ecard.selected_cats_checked}><label for="ecard_selected_cats"> {'piwecard_authorizations_selected_cats'|@translate}</label>
-				<div id="ecard_selected_cats_options">
-					<div>
-						{$DOUBLE_SELECT}
-					</div>
-				</div>
-			</div>
-			<div class="ecard_radio">
-				<input type="radio" name="ecard_authorized_cats" id="ecard_user_cats" value="user" {$ecard.user_cats_checked} /><label for="ecard_user_cats"> {'piwecard_authorizations_user_cat'|@translate}</label>
-			</div>
-		</fieldset>
-		<div id="ecard_submit">
-			<input type="submit" name="submit" value="{'Submit'|@translate}" />
-		</div>
-	</div>
-</form>
Index: /extensions/Piwecard/admin/template/admin_permissions.tpl
===================================================================
--- /extensions/Piwecard/admin/template/admin_permissions.tpl	(revision 20088)
+++ /extensions/Piwecard/admin/template/admin_permissions.tpl	(revision 20088)
@@ -0,0 +1,47 @@
+{footer_script}
+{literal}
+$(document).ready(function(){
+	if ($("#ecard_selected_cats").prop('checked') == true) {
+		$("#ecard_selected_cats_options").css("display","block");
+	} else {
+		$("#ecard_selected_cats_options").css("display","none");
+	}
+
+	$("#ECardAdminPermissions").click(function(){
+		if ($("#ecard_selected_cats").prop('checked') == true) {
+			$("#ecard_selected_cats_options").show("fast");
+		} else {
+			$("#ecard_selected_cats_options").hide("fast");
+		}
+	});
+});
+{/literal}
+{/footer_script}
+
+<div class="titrePage">
+	<h2>{'piwecard_plugin'|@translate}</h2>
+</div>
+<form method="post" action="" class="properties">
+	<div id="ECardAdminPermissions">
+		<fieldset>
+			<legend>{'piwecard_permissions_cat'|@translate}</legend>
+			<div class="ecard_radio">
+				<input type="radio" name="ecard_authorized_cats" id="ecard_all_cats" value="all" {$ecard.all_cats_checked} /><label for="ecard_all_cats"> {'piwecard_permissions_all_cats'|@translate}</label>
+			</div>
+			<div class="ecard_radio">
+				<input type="radio" name="ecard_authorized_cats" id="ecard_selected_cats" value="selected" {$ecard.selected_cats_checked}><label for="ecard_selected_cats"> {'piwecard_permissions_selected_cats'|@translate}</label>
+				<div id="ecard_selected_cats_options">
+					<div>
+						{$DOUBLE_SELECT}
+					</div>
+				</div>
+			</div>
+			<div class="ecard_radio">
+				<input type="radio" name="ecard_authorized_cats" id="ecard_user_cats" value="user" {$ecard.user_cats_checked} /><label for="ecard_user_cats"> {'piwecard_permissions_user_cat'|@translate}</label>
+			</div>
+		</fieldset>
+		<div id="ecard_submit">
+			<input type="submit" name="submit" value="{'Submit'|@translate}" />
+		</div>
+	</div>
+</form>
Index: /extensions/Piwecard/css/admin.css
===================================================================
--- /extensions/Piwecard/css/admin.css	(revision 20087)
+++ /extensions/Piwecard/css/admin.css	(revision 20088)
@@ -12,9 +12,9 @@
 
 
-#ECardAdminAuthorizations .ecard_radio {
+#ECardAdminPermissions .ecard_radio {
 	margin-top: 0.5em;
 }
 
-#ECardAdminAuthorizations .ecard_radio #ecard_selected_cats_options {
+#ECardAdminPermissions .ecard_radio #ecard_selected_cats_options {
 	margin-left: 5%;
 	margin-right: 5%;
@@ -22,9 +22,9 @@
 }
 
-#ECardAdminAuthorizations h3 {
+#ECardAdminPermissions h3 {
 	font-size: 1.17em !important;
 }
 
-#ECardAdminAuthorizations #ecard_submit, #ECardAdminConfiguration #ecard_submit {
+#ECardAdminPermissions #ecard_submit, #ECardAdminConfiguration #ecard_submit {
 	text-align: center;
 	margin-bottom: 2em;
Index: /extensions/Piwecard/include/config_param.inc.php
===================================================================
--- /extensions/Piwecard/include/config_param.inc.php	(revision 20087)
+++ /extensions/Piwecard/include/config_param.inc.php	(revision 20088)
@@ -5,13 +5,13 @@
 // Fichier contenant les parametres du plugin (pour le parser)
 $ecard_parse = array(
-		'%yourname%'		=> isset($_POST['ecard_sender_name']) ? $_POST['ecard_sender_name'] : ''  ,
-		'%youremail%'		=> isset($_POST['ecard_sender_email']) ? $_POST['ecard_sender_email'] : ''  ,
-		'%recipientname%'	=> isset($_POST['ecard_recipient_name']) ? $_POST['ecard_recipient_name'] : ''  ,
-		'%recipientemail%'	=> isset($_POST['ecard_recipient_email']) ? $_POST['ecard_recipient_email'] : ''  ,
+		'%yourname%'		=> isset($post['ecard_sender_name']) ? $post['ecard_sender_name'] : ''  ,
+		'%youremail%'		=> isset($post['ecard_sender_email']) ? $post['ecard_sender_email'] : ''  ,
+		'%recipientname%'	=> isset($post['ecard_recipient_name']) ? $post['ecard_recipient_name'] : ''  ,
+		'%recipientemail%'	=> isset($post['ecard_recipient_email']) ? $post['ecard_recipient_email'] : ''  ,
 		'%website%'			=> isset($conf['gallery_title']) ? $conf['gallery_title'] : '' ,
 		'%websiteurl%'		=> get_absolute_root_url() ,
 		'%ecardurl%'		=> isset($image_element['ecard_url']) ? $image_element['ecard_url'] : ''  ,
-		'%ecardsubject%'	=> isset($_POST['ecard_title']) ? $_POST['ecard_title'] : ''  ,
-		'%ecardmessage%'	=> isset($_POST['ecard_message']) ? $_POST['ecard_message'] : ''  ,	
+		'%ecardsubject%'	=> isset($post['ecard_title']) ? $post['ecard_title'] : ''  ,
+		'%ecardmessage%'	=> isset($post['ecard_message']) ? $post['ecard_message'] : ''  ,	
 		'%pictureurl%'		=> DerivativeImage::thumb_url($image_element) ,
 		'%pictureinfos%'	=> isset($image_element['picture_infos']) ? $image_element['picture_infos'] : ''  ,
Index: /extensions/Piwecard/include/piwecard.class.php
===================================================================
--- /extensions/Piwecard/include/piwecard.class.php	(revision 20087)
+++ /extensions/Piwecard/include/piwecard.class.php	(revision 20088)
@@ -3,5 +3,5 @@
 
 class Piwecard {
-	var $my_config;
+	var $config;
 	var $user_groups = array();
 	
@@ -19,5 +19,5 @@
 			$row = pwg_db_fetch_row($result);
 			if(is_string($row[0])) {
-				$this->my_config = unserialize(($row[0]));
+				$this->config = unserialize(($row[0]));
 			}
 	    }
@@ -29,6 +29,6 @@
 	    require(PIWECARD_INSTALL_PATH.'default_values.inc.php');
 	    foreach ($ecard_default_values as $key => $value) {
-		    if (!isset($this->my_config[$key]))
-				$this->my_config[$key] = $value;
+		    if (!isset($this->config[$key]))
+				$this->config[$key] = $value;
 		}
 	}
@@ -36,5 +36,5 @@
 	// Save  general configuration to config_database
 	function set_config() {
-		conf_update_param('piwecard', pwg_db_real_escape_string(serialize($this->my_config)));
+		conf_update_param('piwecard', pwg_db_real_escape_string(serialize($this->config)));
 	}
 	
@@ -65,6 +65,5 @@
 	}
 	
-	function parse($data, $post = null, $image_element = NULL) {
-    $_POST = $post;
+	function parse($data, $post, $image_element) {
 		include (PIWECARD_PATH.'include/config_param.inc.php');
 
@@ -187,5 +186,5 @@
 			}
 			
-			if ($this->my_config['authorized_cats'] == 'user') {	// !Function only allowed on user image 
+			if ($this->config['authorized_cats'] == 'user') {	// !Function only allowed on user image 
 				if (isset($cat) and !empty($cat)) {
 					$catname[0] = $cat['name'];
@@ -211,13 +210,13 @@
 			
 			// Only on available cats
-			if (($this->my_config['authorized_cats'] == 'all')		//Parameter : all
-				OR ($this->my_config['authorized_cats'] == 'selected' AND !empty($upper_ids) AND (array_intersect($upper_ids, $this->my_config['selected_cats']) != array())) //Parameter : selected
-				OR	($this->my_config['authorized_cats'] == 'user' AND (in_array($username, $catname) OR $username == $authorname)) //Parameter : user
+			if (($this->config['authorized_cats'] == 'all')		//Parameter : all
+				OR ($this->config['authorized_cats'] == 'selected' AND !empty($upper_ids) AND (array_intersect($upper_ids, $this->config['selected_cats']) != array())) //Parameter : selected
+				OR	($this->config['authorized_cats'] == 'user' AND (in_array($username, $catname) OR $username == $authorname)) //Parameter : user
 			) {
 				// Check if user is guest. 
 				// In this case, force mail to default mail (in configuration)
 				if (is_a_guest()) {
-					if (!empty($this->my_config['default_guest_email']))
-						$user['email'] = $this->my_config['default_guest_email'];
+					if (!empty($this->config['default_guest_email']))
+						$user['email'] = $this->config['default_guest_email'];
 				}
 			
@@ -230,16 +229,16 @@
 						'recipient_name'	=> l10n('piwecard_recipient_name'),
 						'recipient_email' 	=> l10n('piwecard_recipient_email'),
-						'copy'				=> $this->my_config['sender_copy'] ? 'checked="checked"' : '',
-						'changemail' 		=> (!isset($user['email']) OR $this->my_config['sender_email_change']) ? '' : 'disabled="disabled"'
+						'copy'				=> $this->config['sender_copy'] ? 'checked="checked"' : '',
+						'changemail' 		=> (!isset($user['email']) OR $this->config['sender_email_change']) ? '' : 'disabled="disabled"'
 						)
 				);
 
 				// Template add for the active parameter choice by the user
-				if ($this->my_config['validity_choice']) {
-					foreach($this->my_config['validity'] as $validity) {
+				if ($this->config['validity_choice']) {
+					foreach($this->config['validity'] as $validity) {
 						$template->append('ecard_validity', array(
 																	'id' => $validity,
 																	'name' => ($validity == 0) ? l10n('piwecard_nolimit') : $validity.' '.l10n('piwecard_days'),
-																	'selected' => ($this->my_config['validity_default'] == $validity ? 'checked' : '')
+																	'selected' => ($this->config['validity_default'] == $validity ? 'checked' : '')
 																)
 						);
@@ -247,9 +246,9 @@
 				}
 
-				foreach ($this->my_config['email_format_authorized'] as $email_format) {
+				foreach ($this->config['email_format_authorized'] as $email_format) {
 					$template->append('ecard_email_format', array(
 																'id' => $email_format,
 																'name' => l10n('piwecard_email_format_'.$email_format),
-																'selected' => (($this->my_config['email_format_default'] == $email_format) ?  'checked' : ''),
+																'selected' => (($this->config['email_format_default'] == $email_format) ?  'checked' : ''),
 															)
 					);
@@ -261,5 +260,5 @@
 					
 					// If conf doesn't allow to modify the %yourmail% param, force it to user mail
-					if (!$this->my_config['sender_email_change'])
+					if (!$this->config['sender_email_change'])
 						$_POST['ecard_sender_email'] = $user['email'];
 					
@@ -281,5 +280,5 @@
 
 					// Image infos
-					if ($this->my_config['show_image_infos']) {
+					if ($this->config['show_image_infos']) {
 						if (isset($image_element['name'])) {
 							$image_element['picture_infos'] = $image_element['name'];
@@ -324,7 +323,7 @@
 					unset_make_full_url();
 
-					$email_subject = htmlspecialchars_decode($this->parse( $this->my_config['email_subject'], $_POST));
-					$email_message = htmlspecialchars_decode($this->parse($this->my_config['email_message'][$email_format], $_POST, $image_element));
-					$email_arg=array(	'from' => $_POST['ecard_sender_email'],
+					$email_subject = htmlspecialchars_decode($this->parse($this->config['email_subject'], $_POST, $image_element));
+					$email_message = htmlspecialchars_decode($this->parse($this->config['email_message'][$email_format], $_POST, $image_element));
+					$email_arg=array(	'from' 				=> $_POST['ecard_sender_email'],
 										'subject'	 		=> $email_subject,
 										'content' 			=> $email_message,
Index: /extensions/Piwecard/include/publish.inc.php
===================================================================
--- /extensions/Piwecard/include/publish.inc.php	(revision 20087)
+++ /extensions/Piwecard/include/publish.inc.php	(revision 20088)
@@ -4,10 +4,10 @@
 global $template;
 
-$ecard = new Piwecard();
+$piwecard = new Piwecard();
 
 $ecard_id = explode('ecard/', $_SERVER['REQUEST_URI']);
 $ecard_id = $ecard_id[1];
 
-if (isset($ecard_id) and $ecard_id != '' and $ecard->is_valid($ecard_id)) {
+if (isset($ecard_id) and $ecard_id != '' and $piwecard->is_valid($ecard_id)) {
 	$query = 'SELECT * FROM '.PIWECARD_TABLE.' WHERE id = "'.$ecard_id.'";';
 	$result = pwg_query($query);
@@ -40,6 +40,6 @@
 				'sender_email' 	=> $result_array['sender_email'],
 				'sender_name' 	=> $result_array['sender_name'],
-				'image_title'	=> (($ecard->my_config['show_image_infos'] == '1') ? $row['name'] : null),
-				'image_author' 	=> (($ecard->my_config['show_image_infos'] == '1') ? $row['author'] : null),
+				'image_title'	=> (($piwecard->config['show_image_infos'] == '1') ? $row['name'] : null),
+				'image_author' 	=> (($piwecard->config['show_image_infos'] == '1') ? $row['author'] : null),
 				));
 		
Index: /extensions/Piwecard/install/default_values.inc.php
===================================================================
--- /extensions/Piwecard/install/default_values.inc.php	(revision 20087)
+++ /extensions/Piwecard/install/default_values.inc.php	(revision 20088)
@@ -1,4 +1,4 @@
 <?php
-//Authorizations parameters
+//Permissions parameters
 $ecard_default_values['authorized_cats'] = 'selected';				//Determine the page from which the user can send ecard : 'all' (all categories the user can access), 'selected' (only the categories defined in the parameter 'selected_cats') or 'user' (only the categories which are named like the user)
 $ecard_default_values['selected_cats'] = array();					//List of categories where the plugin is active
Index: /extensions/Piwecard/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Piwecard/language/en_UK/plugin.lang.php	(revision 20087)
+++ /extensions/Piwecard/language/en_UK/plugin.lang.php	(revision 20088)
@@ -3,17 +3,17 @@
 
 //admin.php
-$lang['piwecard_admin_authorizations']			= 'Authorizations';
+$lang['piwecard_admin_permissions']			= 'Permissions';
 $lang['piwecard_admin_configuration']			= 'Configuration';
 $lang['piwecard_admin_management']				= 'Management';
 
-//admin_authorizations.php
+//admin_permissions.php
 $lang['piwecard_selected_cats']					= 'Selected categories';
 $lang['piwecard_non_selected_cats']				= 'Non selected categories';
 
-//admin_authorizations.tpl
-$lang['piwecard_authorizations_cat']			= 'Authorizations depending on the category';
-$lang['piwecard_authorizations_all_cats']		= 'Sending of e-cards is authorized on all the categories accessible by the user';
-$lang['piwecard_authorizations_selected_cats']  = 'Sending of e-cards is authorized only on a selection of catetories and if selected categories are accessible by the user';
-$lang['piwecard_authorizations_user_cat']		= 'Sending of e-cards is authorized only if the category or one of its parents is named after the user (case sensitive) or if the user is the author of the image';
+//admin_permissions.tpl
+$lang['piwecard_permissions_cat']			= 'Permissions depending on the category';
+$lang['piwecard_permissions_all_cats']		= 'Sending of e-cards is authorized on all the categories accessible by the user';
+$lang['piwecard_permissions_selected_cats']  = 'Sending of e-cards is authorized only on a selection of catetories and if selected categories are accessible by the user';
+$lang['piwecard_permissions_user_cat']		= 'Sending of e-cards is authorized only if the category or one of its parents is named after the user (case sensitive) or if the user is the author of the image';
 
 //admin_configuration.php
Index: /extensions/Piwecard/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Piwecard/language/fr_FR/plugin.lang.php	(revision 20087)
+++ /extensions/Piwecard/language/fr_FR/plugin.lang.php	(revision 20088)
@@ -3,17 +3,17 @@
 
 //admin.php
-$lang['piwecard_admin_authorizations'] = 'Droits d\'accès';
+$lang['piwecard_admin_permissions'] = 'Permissions';
 $lang['piwecard_admin_configuration'] = 'Configuration';
 $lang['piwecard_admin_management'] = 'Gestion';
 
-//admin_authorizations.php
+//admin_permissions.php
 $lang['piwecard_selected_cats'] = 'Albums sélectionnées';
 $lang['piwecard_non_selected_cats'] = 'Albums non sélectionnés';
 
-//admin_authorizations.tpl
-$lang['piwecard_authorizations_cat'] = 'Droits d\'accès en fonction des albums';
-$lang['piwecard_authorizations_all_cats'] = 'L\'envoi de carte virtuelle est autorisé sur tous les albums accessibles par l\'utilisateur';
-$lang['piwecard_authorizations_selected_cats']  = 'L\'envoi de carte virtuelle est autorisé uniquement sur une sélection d\'albums et si les albums sélectionnés sont accessibles à l\'utilisateur';
-$lang['piwecard_authorizations_user_cat'] = 'L\'envoi de carte virtuelle est autorisé uniquement si l\'album ou une de ses parents porte le même nom que l\'utilisateur (sensible à la casse) ou si l\'utilisateur est l\'auteur de la photo';
+//admin_permissions.tpl
+$lang['piwecard_permissions_cat'] = 'Permissions en fonction des albums';
+$lang['piwecard_permissions_all_cats'] = 'L\'envoi de carte virtuelle est autorisé sur tous les albums accessibles par l\'utilisateur';
+$lang['piwecard_permissions_selected_cats']  = 'L\'envoi de carte virtuelle est autorisé uniquement sur une sélection d\'albums et si les albums sélectionnés sont accessibles à l\'utilisateur';
+$lang['piwecard_permissions_user_cat'] = 'L\'envoi de carte virtuelle est autorisé uniquement si l\'album ou une de ses parents porte le même nom que l\'utilisateur (sensible à la casse) ou si l\'utilisateur est l\'auteur de la photo';
 
 //admin_configuration.php
