Replace remove.php by a LSurl route

This commit is contained in:
Benjamin Renard 2020-05-04 10:49:11 +02:00
parent ed3d2cda59
commit 9bbd41468b
7 changed files with 245 additions and 256 deletions

View file

@ -181,7 +181,7 @@ class LSsearchEntry {
if (LSsession :: canRemove($this -> LSobject,$this -> dn)) {
$this -> cache['actions'][] = array (
'label' => _('Delete'),
'url' => 'remove.php?LSobject='.$this -> LSobject.'&dn='.urlencode($this -> dn),
'url' => 'object/'.$this -> LSobject.'/'.urlencode($this -> dn).'/remove',
'action' => 'delete'
);
}

View file

@ -13,13 +13,13 @@ var LSview = new Class({
el.addEvent('click',this.onTdLSobjectListNamesClick.bind(this,el));
}, this);
$$('a.LSobject-list-actions').each(function(el) {
var checkRemove = /remove\.php.*/;
var checkRemove = /\/remove$/;
if (checkRemove.exec(el.href)) {
el.addEvent('click',this.onRemoveListBtnClick.bindWithEvent(this,el));
}
}, this);
$$('a.LSview-actions').each(function(el) {
var checkRemove = /remove\.php.*/;
var checkRemove = /\/remove$/;
if (checkRemove.exec(el.href)) {
el.addEvent('click',this.onRemoveViewBtnClick.bindWithEvent(this,el));
}
@ -80,7 +80,7 @@ var LSview = new Class({
},
removeFromA: function(a) {
document.location = a.href+'&valid';
document.location = a.href+'?valid';
},
onCustomActionBtnClick: function(event,a) {

View file

@ -402,7 +402,7 @@ function handle_LSobject_show($request) {
if (LSsession :: canRemove($LSobject, $dn)) {
$LSview_actions[] = array(
'label' => _('Delete'),
'url' => 'remove.php?LSobject='.$LSobject.'&dn='.urlencode($dn),
'url' => "object/$LSobject/".urlencode($dn)."/remove",
'action' => 'delete'
);
}
@ -536,7 +536,7 @@ function handle_LSobject_modify($request) {
if (LSsession :: canRemove($LSobject,$object -> getDn())) {
$LSview_actions[] = array(
'label' => _('Delete'),
'url' => 'remove.php?LSobject='.$LSobject.'&dn='.urlencode($object -> getDn()),
'url' => "object/$LSobject/".urlencode($object -> getDn())."/remove",
'action' => 'delete'
);
}
@ -569,6 +569,68 @@ function handle_old_modify_php($request) {
}
LSurl :: add_handler('#^modify.php#', 'handle_old_modify_php');
/*
* Handle LSobject remove request
*
* @param[in] $request LSurlRequest The request
*
* @retval void
**/
function handle_LSobject_remove($request) {
$object = get_LSobject_from_request(
$request,
true, // instanciate object
array('LSsession', 'canRemove') // Check access method
);
if (!$object)
return;
$LSobject = $object -> getType();
$dn = $object -> getDn();
$objectname = $object -> getDisplayName();
// Remove object (if validated)
if (isset($_GET['valid'])) {
if ($object -> remove()) {
LSsession :: addInfo(getFData(_('%{objectname} has been successfully deleted.'), $objectname));
LSurl :: redirect("object/$LSobject?refresh");
}
else {
LSerror :: addErrorCode('LSldapObject_15', $objectname);
}
}
// Define page title
LStemplate :: assign('pagetitle', getFData(_('Deleting : %{objectname}'), $objectname));
LStemplate :: assign('question', getFData(_('Do you really want to delete <strong>%{displayName}</strong> ?'), $objectname));
LStemplate :: assign('validation_url', "object/$LSobject/".urlencode($dn)."/remove?valid");
LStemplate :: assign('validation_label', _('Validate'));
// Set & display template
LSsession :: setTemplate('question.tpl');
LSsession :: displayTemplate();
}
LSurl :: add_handler('#^object/(?P<LSobject>[^/]+)/(?P<dn>[^/]+)/remove/?$#', 'handle_LSobject_remove');
/*
* Handle old remove.php request for retro-compatibility
*
* @param[in] $request LSurlRequest The request
*
* @retval void
**/
function handle_old_remove_php($request) {
if (!isset($_GET['LSobject']) || !isset($_GET['dn']))
$url = null;
elseif (isset($_GET['valid']))
$url = "object/".$_GET['LSobject']."/".$_GET['dn']."/remove?valid";
else
$url = "object/".$_GET['LSobject']."/".$_GET['dn']."/remove";
LSerror :: addErrorCode('LSsession_26', 'remove.php');
LSurl :: redirect($url);
}
LSurl :: add_handler('#^remove.php#', 'handle_old_remove_php');
/*
************************************************************
* LSaddon views

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: LdapSaisie\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2020-05-03 18:40+0200\n"
"PO-Revision-Date: 2020-05-04 10:44+0200\n"
"Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n"
"Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise."
"org>\n"
@ -21,18 +21,18 @@ msgstr ""
"X-Generator: Poedit 2.2.1\n"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/select.php:67
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:217
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:222
#: templates/default/global_search.tpl:7
msgid "Search"
msgstr "Rechercher"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/select.php:68
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:218
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:223
msgid "Approximative search"
msgstr "Recherche approximative"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/select.php:69
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:219
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:224
msgid "Recursive search"
msgstr "Recherche récursive"
@ -42,58 +42,11 @@ msgstr "Recherche récursive"
msgid "Level"
msgstr "Niveau"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:54
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannCompositeAttribute.php:106
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:260
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:68
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannLabeledValue.php:62
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:167
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:263
msgid "Modify"
msgstr "Modifier"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:60
msgid "The object has been partially modified."
msgstr "L'objet a été partiellement modifié."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:63
msgid "The object has been modified successfully."
msgstr "L'objet a bien été modifié."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:104
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:159
msgid "View"
msgstr "Voir"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:111
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:216
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:215
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:69
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:85
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:183
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:279
msgid "Delete"
msgstr "Supprimer"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/import.php:59
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:166
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:171
msgid "Import"
msgstr "Importer"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/create.php:75
msgid "Data entry form"
msgstr "Masque de saisie"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/create.php:81
msgid "Object has been added."
msgstr "L'objet a été ajouté."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/create.php:120
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:267
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:160
msgid "New"
msgstr "Nouveau"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/custom_search_action.php:53
msgid ""
"The custom action %{title} have been successfully execute on this search."
@ -112,8 +65,8 @@ msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsmoothbox.php:39
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsession.php:1359
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:68
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:607
#: /home/brenard/dev/ldapsaisie_clean3/public_html/custom_action.php:83
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:51
msgid "Validate"
msgstr "Valider"
@ -607,6 +560,16 @@ msgstr ""
"LSattr_html_%{type} : Les données multiples ne sont pas supportées pour ce "
"type de champ."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannCompositeAttribute.php:106
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:260
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:68
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannLabeledValue.php:62
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:167
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:388
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:546
msgid "Modify"
msgstr "Modifier"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannCompositeAttribute.php:107
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:75
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannLabeledValue.php:63
@ -917,7 +880,7 @@ msgid "Your new password has been sent to %{mail}."
msgstr "Votre nouveau mot de passe vous a été envoyé à l'adresse %{mail}."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsession.php:1522
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:173
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:178
#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:36
msgid "Refresh"
msgstr "Rafraîchir"
@ -1400,7 +1363,7 @@ msgid "updating relations"
msgstr "mise à jour des relations"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:214
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:213
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:214
msgid "Do you really want to delete"
msgstr "Voulez-vous vraiment supprimer"
@ -1408,11 +1371,27 @@ msgstr "Voulez-vous vraiment supprimer"
msgid "Warning"
msgstr "Attention"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:216
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:216
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:69
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:85
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:183
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:404
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:538
msgid "Delete"
msgstr "Supprimer"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:243
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:365
msgid "No object."
msgstr "Aucun objet."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:267
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:165
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:343
msgid "New"
msgstr "Nouveau"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:453
msgid ""
"LSrelation : The function %{function} for action '%{action}' on the relation "
@ -1563,20 +1542,20 @@ msgstr ""
"des constantes suivantes : LSAUTH_CAS_SERVER_SSL_CACERT ou "
"LSAUTH_CAS_SERVER_NO_SSL_VALIDATION"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:98
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:99
msgid "Add a field to add another values."
msgstr "Ajouter une autre valeur à ce champ."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:99
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:100
msgid "Delete this field."
msgstr "Supprimer cette valeur."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:121
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:248
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:122
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:249
msgid "No field."
msgstr "Aucun champ."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:202
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:203
#: /home/brenard/dev/ldapsaisie_clean3/public_html/custom_action.php:73
msgid ""
"Do you really want to execute custom action %{customAction} on "
@ -1585,49 +1564,49 @@ msgstr ""
"Êtes-vous vraiment sûre de vouloir exécuter l'action personnalisée "
"%{customAction} sur %{objectname} ?"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:214
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:215
msgid "Caution"
msgstr "Attention"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:269
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:270
msgid "%{label} attribute data is not valid."
msgstr "Les données de l'attribut %{label} sont incorrectes."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:347
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:348
msgid "Mandatory field"
msgstr "Champ obligatoire"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:779
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:780
msgid "LSform : Error during the recovery of the values of the form."
msgstr "LSform : Erreur durant la récupération des valeurs du formulaire."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:782
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:783
msgid ""
"LSform : Error durring the recovery of the value of the field '%{element}'."
msgstr ""
"LSform : Erreur durant la recupération de la valeur du champ %{element}."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:789
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:790
msgid "LSform : The field %{element} doesn't exist."
msgstr "LSform : Le champ %{element} n'existe pas."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:792
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:793
msgid "LSfom : Field type unknow (%{type})."
msgstr "LSform : Type de champ inconnu (%{type})."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:795
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:796
msgid "LSform : Error during the creation of the element '%{element}'."
msgstr "LSform : Erreur durant la création de l'élément %{element}."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:798
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:799
msgid "LSform : The data entry form %{name} doesn't exist."
msgstr "LSform : Le masque de saisie %{name} n'existe pas."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:801
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:802
msgid "LSform : The data entry form %{name} is not correctly configured."
msgstr "LSform : Le masque de saisie %{name} n'est pas correctement configuré."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:804
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:805
msgid ""
"LSform : The element %{name}, listed as displayed in data entry form "
"configuration, doesn't exist."
@ -2036,8 +2015,13 @@ msgstr "Stop"
msgid "Unknown error : %{error}"
msgstr "Erreur inconnu : %{error}"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:159
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:530
msgid "View"
msgstr "Voir"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:175
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:271
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:396
msgid "Copy"
msgstr "Copier"
@ -2063,14 +2047,42 @@ msgstr ""
msgid "Home"
msgstr "Accueil"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:178
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:183
msgid "Reset"
msgstr "Réinitialiser"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:310
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:302
msgid "Data entry form"
msgstr "Masque de saisie"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:308
msgid "Object has been added."
msgstr "L'objet a été ajouté."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:435
msgid "My account"
msgstr "Mon compte"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:488
msgid "The object has been partially modified."
msgstr "L'objet a été partiellement modifié."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:491
msgid "The object has been modified successfully."
msgstr "L'objet a bien été modifié."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:595
msgid "%{objectname} has been successfully deleted."
msgstr "%{objectname} a bien été supprimé."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:604
msgid "Deleting : %{objectname}"
msgstr "Suppression : %{objectname}"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:605
msgid "Do you really want to delete <strong>%{displayName}</strong> ?"
msgstr "Voulez-vous vraiment supprimer <strong>%{displayName}</strong> ?"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/functions.php:112
msgid ""
"Function 'getFData' : The method %{meth} of the object %{obj} doesn't exist."
@ -2092,19 +2104,6 @@ msgstr ""
"L'action personnalisée %{customAction} a été correctement exécutée sur "
"%{objectname}."
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:37
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:48
msgid "Deleting"
msgstr "Suppression"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:39
msgid "has been deleted successfully"
msgstr "a bien été supprimé"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:49
msgid "Do you really want to delete <strong>%{displayName}</strong> ?"
msgstr "Voulez-vous vraiment supprimer <strong>%{displayName}</strong> ?"
#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:30
msgid "You must provide pattern for global search."
msgstr "Vous devez fournir un mot clé pour les recherches globales."
@ -2227,6 +2226,12 @@ msgstr "non"
msgid "yes"
msgstr "oui"
#~ msgid "Deleting"
#~ msgstr "Suppression"
#~ msgid "has been deleted successfully"
#~ msgstr "a bien été supprimé"
#~ msgid "Missing parameter"
#~ msgstr "Paramètre manquant"

View file

@ -1,16 +1,16 @@
#: /home/brenard/dev/ldapsaisie_clean3/public_html/select.php:67
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:217
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:222
#: templates/default/global_search.tpl:7
msgid "Search"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/select.php:68
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:218
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:223
msgid "Approximative search"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/select.php:69
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:219
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:224
msgid "Recursive search"
msgstr ""
@ -20,58 +20,11 @@ msgstr ""
msgid "Level"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:54
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannCompositeAttribute.php:106
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:260
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:68
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannLabeledValue.php:62
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:167
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:263
msgid "Modify"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:60
msgid "The object has been partially modified."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:63
msgid "The object has been modified successfully."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:104
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:159
msgid "View"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/modify.php:111
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:216
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:215
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:69
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:85
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:183
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:279
msgid "Delete"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/import.php:59
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:166
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:171
msgid "Import"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/create.php:75
msgid "Data entry form"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/create.php:81
msgid "Object has been added."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/create.php:120
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:267
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:160
msgid "New"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/custom_search_action.php:53
msgid ""
"The custom action %{title} have been successfully execute on this search."
@ -86,8 +39,8 @@ msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsmoothbox.php:39
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsession.php:1359
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:68
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:607
#: /home/brenard/dev/ldapsaisie_clean3/public_html/custom_action.php:83
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:51
msgid "Validate"
msgstr ""
@ -516,6 +469,16 @@ msgid ""
"LSattr_html_%{type} : Multiple data are not supported for this field type."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannCompositeAttribute.php:106
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:260
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:68
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannLabeledValue.php:62
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:167
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:388
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:546
msgid "Modify"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannCompositeAttribute.php:107
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:75
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_supannLabeledValue.php:63
@ -780,7 +743,7 @@ msgid "Your new password has been sent to %{mail}."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsession.php:1522
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:173
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:178
#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:36
msgid "Refresh"
msgstr ""
@ -1177,7 +1140,7 @@ msgid "updating relations"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:214
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:213
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:214
msgid "Do you really want to delete"
msgstr ""
@ -1185,11 +1148,27 @@ msgstr ""
msgid "Warning"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:216
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:216
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:69
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSformElement_select_object.php:85
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:183
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:404
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:538
msgid "Delete"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:243
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:365
msgid "No object."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:267
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:165
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:343
msgid "New"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSrelation.php:453
msgid ""
"LSrelation : The function %{function} for action '%{action}' on the relation "
@ -1310,68 +1289,68 @@ msgid ""
"LSAUTH_CAS_SERVER_SSL_CACERT or LSAUTH_CAS_SERVER_NO_SSL_VALIDATION"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:98
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:99
msgid "Add a field to add another values."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:99
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:100
msgid "Delete this field."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:121
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:248
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:122
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:249
msgid "No field."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:202
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:203
#: /home/brenard/dev/ldapsaisie_clean3/public_html/custom_action.php:73
msgid ""
"Do you really want to execute custom action %{customAction} on "
"%{objectname} ?"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:214
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:215
msgid "Caution"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:269
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:270
msgid "%{label} attribute data is not valid."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:347
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:348
msgid "Mandatory field"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:779
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:780
msgid "LSform : Error during the recovery of the values of the form."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:782
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:783
msgid ""
"LSform : Error durring the recovery of the value of the field '%{element}'."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:789
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:790
msgid "LSform : The field %{element} doesn't exist."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:792
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:793
msgid "LSfom : Field type unknow (%{type})."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:795
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:796
msgid "LSform : Error during the creation of the element '%{element}'."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:798
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:799
msgid "LSform : The data entry form %{name} doesn't exist."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:801
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:802
msgid "LSform : The data entry form %{name} is not correctly configured."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:804
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSform.php:805
msgid ""
"LSform : The element %{name}, listed as displayed in data entry form "
"configuration, doesn't exist."
@ -1732,8 +1711,13 @@ msgstr ""
msgid "Unknown error : %{error}"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:159
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:530
msgid "View"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/class/class.LSsearchEntry.php:175
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:271
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:396
msgid "Copy"
msgstr ""
@ -1755,14 +1739,42 @@ msgstr ""
msgid "Home"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:178
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:183
msgid "Reset"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:310
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:302
msgid "Data entry form"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:308
msgid "Object has been added."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:435
msgid "My account"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:488
msgid "The object has been partially modified."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:491
msgid "The object has been modified successfully."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:595
msgid "%{objectname} has been successfully deleted."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:604
msgid "Deleting : %{objectname}"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/routes.php:605
msgid "Do you really want to delete <strong>%{displayName}</strong> ?"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/includes/functions.php:112
msgid ""
"Function 'getFData' : The method %{meth} of the object %{obj} doesn't exist."
@ -1782,19 +1794,6 @@ msgid ""
"%{objectname}."
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:37
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:48
msgid "Deleting"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:39
msgid "has been deleted successfully"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/remove.php:49
msgid "Do you really want to delete <strong>%{displayName}</strong> ?"
msgstr ""
#: /home/brenard/dev/ldapsaisie_clean3/public_html/global_search.php:30
msgid "You must provide pattern for global search."
msgstr ""

View file

@ -1,77 +0,0 @@
<?php
/*******************************************************************************
* Copyright (C) 2007 Easter-eggs
* http://ldapsaisie.labs.libre-entreprise.org
*
* Author: See AUTHORS file in top-level directory.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
******************************************************************************/
require_once 'core.php';
if(LSsession :: startLSsession()) {
if ((isset($_GET['LSobject'])) && (isset($_GET['dn']))) {
$LSobject=urldecode($_GET['LSobject']);
$dn=urldecode($_GET['dn']);
if (LSsession ::loadLSobject($LSobject)) {
if ( LSsession :: canRemove($LSobject,$dn) ) {
$object = new $LSobject();
if ($object -> loadData($dn)) {
if (isset($_GET['valid'])) {
$objectname=$object -> getDisplayName();
LStemplate :: assign('pagetitle',_('Deleting').' : '.$objectname);
if ($object -> remove()) {
LSsession :: addInfo($objectname.' '._('has been deleted successfully').'.');
LSurl :: redirect("object/$LSobject?refresh");
}
else {
LSerror :: addErrorCode('LSldapObject_15',$objectname);
}
}
else {
// Définition du Titre de la page
LStemplate :: assign('pagetitle',_('Deleting').' : '.$object -> getDisplayName());
LStemplate :: assign('question', getFData(_('Do you really want to delete <strong>%{displayName}</strong> ?'), $object -> getDisplayName()));
LStemplate :: assign('validation_url','remove.php?LSobject='.$LSobject.'&amp;dn='.urlencode($dn).'&amp;valid');
LStemplate :: assign('validation_label',_('Validate'));
}
LSsession :: setTemplate('question.tpl');
}
else {
LSerror :: addErrorCode('LSsession_12');
}
}
else {
LSerror :: addErrorCode('LSsession_11');
}
}
else {
LSerror :: addErrorCode('LSldapObject_01');
}
}
else {
LSerror :: addErrorCode('LSsession_12');
}
}
else {
LSsession :: setTemplate('login.tpl');
}
// Affichage des retours d'erreurs
LSsession :: displayTemplate();