From 179d148335bb82636ef3da930130d1ccb6bab30a Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 1 Oct 2018 12:32:05 +0200 Subject: [PATCH] Add triggers feature on LStemplate class --- .../includes/class/class.LStemplate.php | 77 +++++++++- public_html/includes/functions.php | 23 ++- .../lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo | Bin 45598 -> 46050 bytes .../lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.po | 136 ++++++++++-------- public_html/lang/ldapsaisie.pot | 130 +++++++++-------- 5 files changed, 242 insertions(+), 124 deletions(-) diff --git a/public_html/includes/class/class.LStemplate.php b/public_html/includes/class/class.LStemplate.php index 874fb87d..af65cf6b 100644 --- a/public_html/includes/class/class.LStemplate.php +++ b/public_html/includes/class/class.LStemplate.php @@ -20,7 +20,7 @@ ******************************************************************************/ -/** +/** * Manage template * * This class is use to manage template in LdapSaisie. @@ -40,7 +40,7 @@ class LStemplate { * 'compile_dir' => '/path/to/compile/directory', * 'debug' => True, * 'debug_smarty' => True - * ) + * ) * **/ private static $config = array ( @@ -55,7 +55,7 @@ class LStemplate { // Smarty object public static $_smarty = NULL; - + // Smarty version private static $_smarty_version = NULL; @@ -65,6 +65,9 @@ class LStemplate { LS_THEME ); + // Registered events + private static $_events = array(); + /** * Start LStemplate * @@ -76,6 +79,9 @@ class LStemplate { * @retval boolean True on success, False instead **/ public static function start($config) { + // Trigger starting event + self :: fireEvent('starting'); + foreach ($config as $key => $value) { self :: $config[$key] = $value; } @@ -124,6 +130,9 @@ class LStemplate { self :: registerFunction("css", "LStemplate_smarty_css"); self :: registerFunction("uniqid", "LStemplate_smarty_uniqid"); + // Trigger started event + self :: fireEvent('started'); + return True; } else { @@ -291,7 +300,13 @@ class LStemplate { * @retval void **/ public static function display($template) { - return self :: $_smarty -> display("ls:$template"); + // Trigger displaying event + self :: fireEvent('displaying'); + + self :: $_smarty -> display("ls:$template"); + + // Trigger displayed event + self :: fireEvent('displayed'); } /** @@ -317,6 +332,54 @@ class LStemplate { LStemplate_register_function($name,$function_name); } + /** + * Registered an action on a specific event + * + * @param[in] $event string The event name + * @param[in] $callable callable The callable to run on event + * @param[in] $param mixed Paremeters that will be pass to the callable + * + * @retval void + */ + function addEvent($event,$callable,$param=NULL) { + self :: $_events[$event][] = array( + 'callable' => $callable, + 'param' => $param, + ); + } + + /** + * Run triggered actions on specific event + * + * @param[in] $event string Event name + * + * @retval boolean True if all triggered actions succefully runned, false otherwise + */ + function fireEvent($event) { + $return = true; + + // Binding via addEvent + if (isset(self :: $_events[$event]) && is_array(self :: $_events[$event])) { + foreach (self :: $_events[$event] as $e) { + if (is_callable($e['callable'])) { + try { + call_user_func_array($e['callable'],array(&$e['param'])); + } + catch(Exception $er) { + LSerror :: addErrorCode('LStemplate_03',array('callable' => getCallableName($e['callable']),'event' => $event)); + $return = false; + } + } + else { + LSerror :: addErrorCode('LStemplate_02',array('callable' => getCallableName($e['callable']),'event' => $event)); + $return = false; + } + } + } + + return $return; + } + } function LStemplate_smarty_getFData($params) { @@ -349,3 +412,9 @@ function LStemplate_smarty_uniqid($params, &$smarty) { LSerror :: defineError('LStemplate_01', _("LStemplate : Template %{file} not found.") ); +LSerror :: defineError('LStemplate_02', +_("LStemplate : Fail to execute trigger %{callable} on event %{event} : is not callable.") +); +LSerror :: defineError('LStemplate_03', +_("LStemplate : Error during the execution of the trigger %{callable} on event %{event}.") +); diff --git a/public_html/includes/functions.php b/public_html/includes/functions.php index c150480f..6ff54fb2 100644 --- a/public_html/includes/functions.php +++ b/public_html/includes/functions.php @@ -632,4 +632,25 @@ function LSdebugDefined() { return date ('YmdHis').'Z'; } -?> + + /** + * Format callable name + * + * @param[in] $callable The callable + * + * @retval string The formated callable name + **/ + function getCallableName($callable) { + if (is_string($callable)) { + return $callable; + } + elseif(is_array($callable) && count($callable)==2) { + if (is_string($callable[0])) { + return $callable[0].'::'.$callable[1].'()'; + } + elseif(is_object($callable[0])) { + return "object ".get_class($callable[0])."->".$callable[1].'()'; + } + } + return "unknown : ".(string)$callable; + } diff --git a/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo b/public_html/lang/fr_FR.UTF8/LC_MESSAGES/ldapsaisie.mo index 4ec632f5d8b23ddfc6a198b9024f13c9c41eb054..4632228467c41061a6118933869bd221c1d8d8fc 100644 GIT binary patch delta 7692 zcma*r30PKT-pBD9R6xZY5ft?3=iKXgz^xa& zKmEen^Kr}i8w|%7FJnURsYb@ULAhUR)fzL6%5cobP+X3_xEsUpY3zunFay8Ep4g9z z1F#%Za5-k<37mv&+Z!{;7>}u<(3^@w*buK^ef$X{@E7#Khz|C_u^336gbi>6@=TM1 zSvUt<;7iD}%t_=H<}36^f0w;aF#7X+(~$z5HnFG&_rWGO0GnYJssU55B^II|-h~u7=@Q9=!9QqJLDsqT@B(6qH;q#~levBHqo7fzEBN%_pWe`_s?&463=5Evw zuEnOf3+v+n)KnctAFM@9(VM6#`v803Mbt=zb~WY>jKoY_feY~rmf^@q#y_9JOEgz@ zh+@U!5*&e7aTcaV8?zIi#krWv#LmQHs0So;GiDU7L5;{c?1PE1c0@{XB>7<{_l>jl zIUWjWoY;nH`32PW368fzKMDttKY}TE8X0ZVGQk*T&GbeM^%T@~%kWM-fy|cak!bHT z5&M&G!QuEmYKlFb_^A($#{yk|TD3QD1V+-TZ8#6tV;fqhsd@_4@avd|1CorHid#_~ zxPb#Pv6pRNIcfwR!(#jrQ?>tddoz4gY(hF`-f;4tumgDv<2V4bkijvlFd2^`Z8SeP zc@&j8??y)7Y(VXXTAYCAaU3T1HD)%hMYs09S3ldM8IA{0J@;a~;P#i`lBD zatdxojo?jG&r<027_7nZcms7^Zi;n3YKofjp&mTnETo{h`~&I%XD|cP86UNL4Nk>N zI2nhs2X(`pcn4}83Lp4;AdEbCwF z1)nwhP;1~DTvW?3k}mJ&9r^=HLp{^=Fa6GZD;N43;3HZ#H5yzK0B& z@n$9JdFdk=|E?4sp&|tjqdssQHPn4Z**V>STBJ8o_3@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@<&NLQ@?GNdKzZm zj=X0Qd&tL#ilVhV${Jf``O7Tj-r_**@xp7Qd`jDK&uxmtV^qE*3o(cL`;zHP?}|OQ z(Rnh2Uy8PQ{x2RX&dl>yS>_x^b!@*|J8AZ9i5JBlEmXC=My#n=Q4a+85+`yc1$G+vTg|F%EEi`{?N#d-m8o zcWG6gKau-a`nyxUbix={~t8#;r#3s>I%n^mZ_=xQr zalfb`hUX`~Lwk|x$v$Bnp7j1t{Mb>F#xe-{4`2Z%GoL*g^h z(Ee^BwoxqFE4zNySX8TzxDd_E3YE{t*#Lp%N@j)VvP9h{;$n;;(IYr#CD13 z=-4;PGjCCTEn4bp7}u|=agdJDdz|ob`E=1#JR@RjZ2#$;ASy+NZFxrdzwer9mpJCx zyl*ejN0BVrqu zk)CEf`+njyak6+yoFje|twbODJF|uOLCpQN{*5Gei#8&*-VUtG%gQqsk>9EPr#!!p zALQ+$b6;d-@u27~4i-m=e~N0Nr*o9?Kn~`A#bi%2leh&w&szUP4>t;Z{9w$c<|\n" "Language-Team: LdapSaisie \n" @@ -57,8 +57,8 @@ msgstr "Recherche approximative" msgid "Recursive search" msgstr "Recherche récursive" -#: select.php:70 includes/class/class.LSsession.php:1204 -#: includes/class/class.LSsession.php:2259 +#: select.php:70 includes/class/class.LSsession.php:1209 +#: includes/class/class.LSsession.php:2264 msgid "Level" msgstr "Niveau" @@ -105,7 +105,7 @@ msgstr "" #: custom_search_action.php:73 includes/class/class.LSconfirmBox.php:37 #: includes/class/class.LSsmoothbox.php:39 -#: includes/class/class.LSsession.php:1244 includes/class/class.LSform.php:68 +#: includes/class/class.LSsession.php:1249 includes/class/class.LSform.php:68 #: custom_action.php:83 remove.php:51 msgid "Validate" msgstr "Valider" @@ -509,33 +509,49 @@ msgstr "Maintenant." msgid "Today." msgstr "Aujourd'hui." -#: includes/class/class.LStemplate.php:88 +#: includes/class/class.LStemplate.php:94 msgid "LStemplate : compile directory is not writable (dir : " msgstr "" "LStemplate : Le dossier de compilation n'est pas accessible en écriture " "(dossier : " -#: includes/class/class.LStemplate.php:107 +#: includes/class/class.LStemplate.php:113 msgid "LStemplate : Can't load Smarty 2 support file" msgstr "LStemplate : Impossible de charger le fichier de support de Smarty 2." -#: includes/class/class.LStemplate.php:114 +#: includes/class/class.LStemplate.php:120 msgid "LStemplate : Can't load Smarty 3 support file" msgstr "LStemplate : Impossible de charger le fichier de support de Smarty 3." -#: includes/class/class.LStemplate.php:118 +#: includes/class/class.LStemplate.php:124 msgid "LStemplate : Smarty version not recognized." msgstr "LStemplate : Version de Smarty non reconnue." -#: includes/class/class.LStemplate.php:130 +#: includes/class/class.LStemplate.php:139 msgid "LStemplate : Can't load Smarty." msgstr "" "LStemplate : Impossible de charger le moteur de gestion de template Smarty." -#: includes/class/class.LStemplate.php:350 +#: includes/class/class.LStemplate.php:413 msgid "LStemplate : Template %{file} not found." msgstr "LStemplate : le template %{file} est introuvable." +#: includes/class/class.LStemplate.php:416 +msgid "" +"LStemplate : Fail to execute trigger %{callable} on event %{event} : is not " +"callable." +msgstr "" +"LStemplate : Échec d'exécution du déclencheur %{callable} lors de événement " +"%{event} : il n'est pas un callable." + +#: includes/class/class.LStemplate.php:419 +msgid "" +"LStemplate : Error during the execution of the trigger %{callable} on event " +"%{event}." +msgstr "" +"LStemplate : Erreur durant l'exécution du déclencheur %{callable} lors de " +"événement %{event}." + #: includes/class/class.LSattr_html_select_object.php:231 msgid "" "LSattr_html_select_object : LSobject type is undefined (attribute : %{attr})." @@ -661,73 +677,73 @@ msgstr "" msgid "Clear" msgstr "Nettoyer" -#: includes/class/class.LSsession.php:1184 +#: includes/class/class.LSsession.php:1189 msgid "Connection" msgstr "Connexion" -#: includes/class/class.LSsession.php:1194 -#: includes/class/class.LSsession.php:1233 +#: includes/class/class.LSsession.php:1199 +#: includes/class/class.LSsession.php:1238 msgid "LDAP server" msgstr "Serveur LDAP" -#: includes/class/class.LSsession.php:1205 -#: includes/class/class.LSsession.php:1243 +#: includes/class/class.LSsession.php:1210 +#: includes/class/class.LSsession.php:1248 msgid "Identifier" msgstr "Identifiant" -#: includes/class/class.LSsession.php:1206 +#: includes/class/class.LSsession.php:1211 msgid "Password" msgstr "Mot de passe" -#: includes/class/class.LSsession.php:1207 +#: includes/class/class.LSsession.php:1212 msgid "Connect" msgstr "Se connecter" -#: includes/class/class.LSsession.php:1208 +#: includes/class/class.LSsession.php:1213 msgid "Forgot your password ?" msgstr "Mot de passe perdu ?" -#: includes/class/class.LSsession.php:1226 +#: includes/class/class.LSsession.php:1231 msgid "Recovery of your credentials" msgstr "Récupération de votre mot de passe" -#: includes/class/class.LSsession.php:1245 +#: includes/class/class.LSsession.php:1250 msgid "Back" msgstr "Retour" -#: includes/class/class.LSsession.php:1247 +#: includes/class/class.LSsession.php:1252 msgid "Please fill the identifier field to proceed recovery procedure" msgstr "" "Merci d'entrer votre identifiant pour poursuivre la procédure de récupération" -#: includes/class/class.LSsession.php:1251 +#: includes/class/class.LSsession.php:1256 msgid "" "An email has been sent to %{mail}. Please follow the instructions on it." msgstr "" "Un e-mail vient de vous être envoyé à l'adresse %{mail}. Merci de suivre les " "indications qu'il contient." -#: includes/class/class.LSsession.php:1259 +#: includes/class/class.LSsession.php:1264 msgid "Your new password has been sent to %{mail}. " msgstr "Votre nouveau mot de passe vous a été envoyé à l'adresse %{mail}." -#: includes/class/class.LSsession.php:1404 +#: includes/class/class.LSsession.php:1409 msgid "Refresh" msgstr "Rafraîchir" -#: includes/class/class.LSsession.php:1420 +#: includes/class/class.LSsession.php:1425 msgid "Language" msgstr "Langue" -#: includes/class/class.LSsession.php:1442 +#: includes/class/class.LSsession.php:1447 msgid "Connected as" msgstr "Connecté en tant que" -#: includes/class/class.LSsession.php:2387 +#: includes/class/class.LSsession.php:2411 msgid "LSsession : The constant %{const} is not defined." msgstr "LSsession : La constante %{const} n'est pas définie." -#: includes/class/class.LSsession.php:2390 +#: includes/class/class.LSsession.php:2414 msgid "" "LSsession : The %{addon} support is uncertain. Verify system compatibility " "and the add-on configuration." @@ -735,52 +751,52 @@ msgstr "" "LSsession : Le support %{addon} est incertain. Vérifiez la compatibilité du " "système et la configuration de l'add-on." -#: includes/class/class.LSsession.php:2393 +#: includes/class/class.LSsession.php:2417 msgid "" "LSsession : LDAP server's configuration data are invalid. Can't connect." msgstr "" "LSsession : Les données de configuration du serveur LDAP sont invalide. " "Impossible de s'y connecter." -#: includes/class/class.LSsession.php:2396 +#: includes/class/class.LSsession.php:2420 msgid "LSsession : Failed to load LSobject type %{type} : unknon type." msgstr "" "LSsession : Impossible de charger le type d'LSobject %{type} : type inconnu." -#: includes/class/class.LSsession.php:2399 +#: includes/class/class.LSsession.php:2423 msgid "LSsession : Failed to load LSclass %{class}." msgstr "LSsession : Impossible de charger la LSclass %{class}." -#: includes/class/class.LSsession.php:2402 +#: includes/class/class.LSsession.php:2426 msgid "LSsession : Login or password incorrect." msgstr "LSsession : Identifiant ou mot de passe incorrects." -#: includes/class/class.LSsession.php:2405 +#: includes/class/class.LSsession.php:2429 msgid "LSsession : Impossible to identify you : Duplication of identities." msgstr "LSsession : Impossible de vous identifier : Duplication d'identité." -#: includes/class/class.LSsession.php:2408 +#: includes/class/class.LSsession.php:2432 msgid "LSsession : Can't load class of authentification (%{class})." msgstr "" "LSsession : Impossible de charger la classe d'authentification (%{class})." -#: includes/class/class.LSsession.php:2411 +#: includes/class/class.LSsession.php:2435 msgid "LSsession : Can't connect to LDAP server." msgstr "LSsession : Impossible de se connecter au serveur LDAP." -#: includes/class/class.LSsession.php:2414 +#: includes/class/class.LSsession.php:2438 msgid "LSsession : Impossible to authenticate you." msgstr "LSsession : Impossible de vous identifier." -#: includes/class/class.LSsession.php:2417 +#: includes/class/class.LSsession.php:2441 msgid "LSsession : Your are not authorized to do this action." msgstr "LSsession : Vous n'êtes pas autorisé à faire cette action." -#: includes/class/class.LSsession.php:2420 +#: includes/class/class.LSsession.php:2444 msgid "LSsession : Some informations are missing to display this page." msgstr "LSsession : Des informations sont manquant pour afficher cette page." -#: includes/class/class.LSsession.php:2423 +#: includes/class/class.LSsession.php:2447 msgid "" "LSsession : The function of the custom action %{name} does not exists or is " "not configured." @@ -788,24 +804,24 @@ msgstr "" "LSsearch : La fonction de l'action personnalisée %{name} n'existe pas ou " "n'est pas configurée." -#: includes/class/class.LSsession.php:2426 +#: includes/class/class.LSsession.php:2450 msgid "LSsession : Fail to retreive user's LDAP credentials from LSauth." msgstr "" "LSsession : Erreur en récupérant les identifiants LDAP de l'utilisateur " "depuis LSauth." -#: includes/class/class.LSsession.php:2429 +#: includes/class/class.LSsession.php:2453 msgid "" "LSsession : Fail to reconnect to LDAP server with user's LDAP credentials." msgstr "" "LSsession : Impossible de se reconnecter au serveur LDAP avec les " "identifiants de l'utilisateur." -#: includes/class/class.LSsession.php:2432 +#: includes/class/class.LSsession.php:2456 msgid "LSsession : No import/export format define for this object type." msgstr "LSsession : Aucun format d'entrée/sortie définie pour ce type d'objet." -#: includes/class/class.LSsession.php:2435 +#: includes/class/class.LSsession.php:2459 msgid "" "LSsession : Error during creation of list of levels. Contact administrators. " "(Code : %{code})" @@ -813,13 +829,13 @@ msgstr "" "LSsession : Erreur durant la création de la liste des niveaux. Contacter les " "administrateurs. (Code : %{type})" -#: includes/class/class.LSsession.php:2438 +#: includes/class/class.LSsession.php:2462 msgid "LSsession : The password recovery is disabled for this LDAP server." msgstr "" "LSsession : La récupération de mot de passe est désactivée pour ce serveur " "LDAP." -#: includes/class/class.LSsession.php:2441 +#: includes/class/class.LSsession.php:2465 msgid "" "LSsession : Some informations are missing to recover your password. Contact " "administrators." @@ -827,7 +843,7 @@ msgstr "" "LSsession : Des informations sont manques pour pouvoir récupérer votre mot " "de passe. Contacter les administrateurs." -#: includes/class/class.LSsession.php:2444 +#: includes/class/class.LSsession.php:2468 msgid "" "LSsession : Error during password recovery. Contact administrators.(Step : " "%{step})" @@ -835,22 +851,22 @@ msgstr "" "LSsession : Erreur durant la récupération de votre mot de passe. Contacter " "les administrateurs. (Etape : %{step})" -#: includes/class/class.LSsession.php:2447 +#: includes/class/class.LSsession.php:2471 msgid "" "LSsession : call function %{func} do not provided from LSaddon %{addon}." msgstr "" "LSsession : la fonction %{func} n'est pas fournie par le LSaddon %{addon}." -#: includes/class/class.LSsession.php:2450 +#: includes/class/class.LSsession.php:2474 msgid "LSsession : problem during initialisation." msgstr "LSsession : Problème durant l'initialisation." -#: includes/class/class.LSsession.php:2453 +#: includes/class/class.LSsession.php:2477 msgid "LSsession : view function %{func} for LSaddon %{addon} doet not exist." msgstr "" "LSsession : la fonction de vue %{func} du LSaddon %{addon} n'existe pas." -#: includes/class/class.LSsession.php:2456 +#: includes/class/class.LSsession.php:2480 msgid "LSsession : invalid related object's DN pass in parameter." msgstr "LSsession : DN d'objet en relation incorrect dans les paramètres." @@ -1654,7 +1670,7 @@ msgstr "Cliquer pour supprimer cette photo." msgid "Chat with this person." msgstr "Discuter avec cette personne." -#: includes/class/class.LSattr_html_select_list.php:370 +#: includes/class/class.LSattr_html_select_list.php:392 msgid "" "LSattr_html_select_list : Configuration data are missing to generate the " "select list of the attribute %{attr}." @@ -1662,7 +1678,7 @@ msgstr "" "LSattr_html_select_list : Des données de configuration sont manquantes pour " "générer la liste de sélection de l'attribut %{attr}." -#: includes/class/class.LSattr_html_select_list.php:373 +#: includes/class/class.LSattr_html_select_list.php:395 msgid "" "LSattr_html_select_list : Invalid attribute %{attr} reference as " "OTHER_ATTRIBUTE possible values." @@ -1670,7 +1686,7 @@ msgstr "" "LSattr_html_select_list : Référence invalide à l'attribut %{attr} comme " "valeurs possibles (OTHER_ATTRIBUTE)." -#: includes/class/class.LSattr_html_select_list.php:376 +#: includes/class/class.LSattr_html_select_list.php:398 msgid "" "LSattr_html_select_list : Attribute %{attr} referenced as OTHER_ATTRIBUTE " "possible values is not a jsonCompositeAttribute." @@ -1678,7 +1694,7 @@ msgstr "" "LSattr_html_select_list : L'attribute %{attr} référencé comme valeurs " "possibles (OTHER_ATTRIBUTE) n'est pas du type jsonCompositeAttribute." -#: includes/class/class.LSattr_html_select_list.php:379 +#: includes/class/class.LSattr_html_select_list.php:401 msgid "" "LSattr_html_select_list : Fail to decode the following attribute %{attr} " "value as JSON : %{value}" @@ -1686,7 +1702,7 @@ msgstr "" "LSattr_html_select_list : Impossible de décodé la valeur JSON suivante de " "l'attribut %{attr} : %{value}" -#: includes/class/class.LSattr_html_select_list.php:382 +#: includes/class/class.LSattr_html_select_list.php:404 msgid "" "LSattr_html_select_list : No component %{component} found in the following " "attribute %{attr} JSON value : %{value}" @@ -1773,16 +1789,16 @@ msgstr "" "LSioFormat : Le pilote d'IOformat %{driver} est invalide ou n'est pas " "disponible." -#: includes/functions.php:113 +#: includes/functions.php:112 msgid "" "Function 'getFData' : The method %{meth} of the object %{obj} doesn't exist." msgstr "Fonction getFData : La méthode %{meth} de l'objet %{obj} n'existe pas." -#: includes/functions.php:175 +#: includes/functions.php:205 msgid "[not string value]" msgstr "[pas une chaîne de caractères]" -#: includes/functions.php:214 +#: includes/functions.php:251 msgid "Folder not found" msgstr "Dossier introuvable" @@ -1798,7 +1814,7 @@ msgstr "" msgid "Missing parameter" msgstr "Paramètre manquant" -#: index.php:28 +#: index.php:31 msgid "Home" msgstr "Accueil" diff --git a/public_html/lang/ldapsaisie.pot b/public_html/lang/ldapsaisie.pot index e5b1870d..51a3a9b3 100644 --- a/public_html/lang/ldapsaisie.pot +++ b/public_html/lang/ldapsaisie.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-07 18:40+0200\n" +"POT-Creation-Date: 2018-10-01 12:17+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -54,8 +54,8 @@ msgstr "" msgid "Recursive search" msgstr "" -#: select.php:70 includes/class/class.LSsession.php:1204 -#: includes/class/class.LSsession.php:2259 +#: select.php:70 includes/class/class.LSsession.php:1209 +#: includes/class/class.LSsession.php:2264 msgid "Level" msgstr "" @@ -98,7 +98,7 @@ msgstr "" #: custom_search_action.php:73 includes/class/class.LSconfirmBox.php:37 #: includes/class/class.LSsmoothbox.php:39 -#: includes/class/class.LSsession.php:1244 includes/class/class.LSform.php:68 +#: includes/class/class.LSsession.php:1249 includes/class/class.LSform.php:68 #: custom_action.php:83 remove.php:51 msgid "Validate" msgstr "" @@ -446,30 +446,42 @@ msgstr "" msgid "Today." msgstr "" -#: includes/class/class.LStemplate.php:88 +#: includes/class/class.LStemplate.php:94 msgid "LStemplate : compile directory is not writable (dir : " msgstr "" -#: includes/class/class.LStemplate.php:107 +#: includes/class/class.LStemplate.php:113 msgid "LStemplate : Can't load Smarty 2 support file" msgstr "" -#: includes/class/class.LStemplate.php:114 +#: includes/class/class.LStemplate.php:120 msgid "LStemplate : Can't load Smarty 3 support file" msgstr "" -#: includes/class/class.LStemplate.php:118 +#: includes/class/class.LStemplate.php:124 msgid "LStemplate : Smarty version not recognized." msgstr "" -#: includes/class/class.LStemplate.php:130 +#: includes/class/class.LStemplate.php:139 msgid "LStemplate : Can't load Smarty." msgstr "" -#: includes/class/class.LStemplate.php:350 +#: includes/class/class.LStemplate.php:413 msgid "LStemplate : Template %{file} not found." msgstr "" +#: includes/class/class.LStemplate.php:416 +msgid "" +"LStemplate : Fail to execute trigger %{callable} on event %{event} : is not " +"callable." +msgstr "" + +#: includes/class/class.LStemplate.php:419 +msgid "" +"LStemplate : Error during the execution of the trigger %{callable} on event " +"%{event}." +msgstr "" + #: includes/class/class.LSattr_html_select_object.php:231 msgid "" "LSattr_html_select_object : LSobject type is undefined (attribute : %{attr})." @@ -570,171 +582,171 @@ msgstr "" msgid "Clear" msgstr "" -#: includes/class/class.LSsession.php:1184 +#: includes/class/class.LSsession.php:1189 msgid "Connection" msgstr "" -#: includes/class/class.LSsession.php:1194 -#: includes/class/class.LSsession.php:1233 +#: includes/class/class.LSsession.php:1199 +#: includes/class/class.LSsession.php:1238 msgid "LDAP server" msgstr "" -#: includes/class/class.LSsession.php:1205 -#: includes/class/class.LSsession.php:1243 +#: includes/class/class.LSsession.php:1210 +#: includes/class/class.LSsession.php:1248 msgid "Identifier" msgstr "" -#: includes/class/class.LSsession.php:1206 +#: includes/class/class.LSsession.php:1211 msgid "Password" msgstr "" -#: includes/class/class.LSsession.php:1207 +#: includes/class/class.LSsession.php:1212 msgid "Connect" msgstr "" -#: includes/class/class.LSsession.php:1208 +#: includes/class/class.LSsession.php:1213 msgid "Forgot your password ?" msgstr "" -#: includes/class/class.LSsession.php:1226 +#: includes/class/class.LSsession.php:1231 msgid "Recovery of your credentials" msgstr "" -#: includes/class/class.LSsession.php:1245 +#: includes/class/class.LSsession.php:1250 msgid "Back" msgstr "" -#: includes/class/class.LSsession.php:1247 +#: includes/class/class.LSsession.php:1252 msgid "Please fill the identifier field to proceed recovery procedure" msgstr "" -#: includes/class/class.LSsession.php:1251 +#: includes/class/class.LSsession.php:1256 msgid "" "An email has been sent to %{mail}. Please follow the instructions on it." msgstr "" -#: includes/class/class.LSsession.php:1259 +#: includes/class/class.LSsession.php:1264 msgid "Your new password has been sent to %{mail}. " msgstr "" -#: includes/class/class.LSsession.php:1404 +#: includes/class/class.LSsession.php:1409 msgid "Refresh" msgstr "" -#: includes/class/class.LSsession.php:1420 +#: includes/class/class.LSsession.php:1425 msgid "Language" msgstr "" -#: includes/class/class.LSsession.php:1442 +#: includes/class/class.LSsession.php:1447 msgid "Connected as" msgstr "" -#: includes/class/class.LSsession.php:2387 +#: includes/class/class.LSsession.php:2411 msgid "LSsession : The constant %{const} is not defined." msgstr "" -#: includes/class/class.LSsession.php:2390 +#: includes/class/class.LSsession.php:2414 msgid "" "LSsession : The %{addon} support is uncertain. Verify system compatibility " "and the add-on configuration." msgstr "" -#: includes/class/class.LSsession.php:2393 +#: includes/class/class.LSsession.php:2417 msgid "" "LSsession : LDAP server's configuration data are invalid. Can't connect." msgstr "" -#: includes/class/class.LSsession.php:2396 +#: includes/class/class.LSsession.php:2420 msgid "LSsession : Failed to load LSobject type %{type} : unknon type." msgstr "" -#: includes/class/class.LSsession.php:2399 +#: includes/class/class.LSsession.php:2423 msgid "LSsession : Failed to load LSclass %{class}." msgstr "" -#: includes/class/class.LSsession.php:2402 +#: includes/class/class.LSsession.php:2426 msgid "LSsession : Login or password incorrect." msgstr "" -#: includes/class/class.LSsession.php:2405 +#: includes/class/class.LSsession.php:2429 msgid "LSsession : Impossible to identify you : Duplication of identities." msgstr "" -#: includes/class/class.LSsession.php:2408 +#: includes/class/class.LSsession.php:2432 msgid "LSsession : Can't load class of authentification (%{class})." msgstr "" -#: includes/class/class.LSsession.php:2411 +#: includes/class/class.LSsession.php:2435 msgid "LSsession : Can't connect to LDAP server." msgstr "" -#: includes/class/class.LSsession.php:2414 +#: includes/class/class.LSsession.php:2438 msgid "LSsession : Impossible to authenticate you." msgstr "" -#: includes/class/class.LSsession.php:2417 +#: includes/class/class.LSsession.php:2441 msgid "LSsession : Your are not authorized to do this action." msgstr "" -#: includes/class/class.LSsession.php:2420 +#: includes/class/class.LSsession.php:2444 msgid "LSsession : Some informations are missing to display this page." msgstr "" -#: includes/class/class.LSsession.php:2423 +#: includes/class/class.LSsession.php:2447 msgid "" "LSsession : The function of the custom action %{name} does not exists or is " "not configured." msgstr "" -#: includes/class/class.LSsession.php:2426 +#: includes/class/class.LSsession.php:2450 msgid "LSsession : Fail to retreive user's LDAP credentials from LSauth." msgstr "" -#: includes/class/class.LSsession.php:2429 +#: includes/class/class.LSsession.php:2453 msgid "" "LSsession : Fail to reconnect to LDAP server with user's LDAP credentials." msgstr "" -#: includes/class/class.LSsession.php:2432 +#: includes/class/class.LSsession.php:2456 msgid "LSsession : No import/export format define for this object type." msgstr "" -#: includes/class/class.LSsession.php:2435 +#: includes/class/class.LSsession.php:2459 msgid "" "LSsession : Error during creation of list of levels. Contact administrators. " "(Code : %{code})" msgstr "" -#: includes/class/class.LSsession.php:2438 +#: includes/class/class.LSsession.php:2462 msgid "LSsession : The password recovery is disabled for this LDAP server." msgstr "" -#: includes/class/class.LSsession.php:2441 +#: includes/class/class.LSsession.php:2465 msgid "" "LSsession : Some informations are missing to recover your password. Contact " "administrators." msgstr "" -#: includes/class/class.LSsession.php:2444 +#: includes/class/class.LSsession.php:2468 msgid "" "LSsession : Error during password recovery. Contact administrators.(Step : " "%{step})" msgstr "" -#: includes/class/class.LSsession.php:2447 +#: includes/class/class.LSsession.php:2471 msgid "" "LSsession : call function %{func} do not provided from LSaddon %{addon}." msgstr "" -#: includes/class/class.LSsession.php:2450 +#: includes/class/class.LSsession.php:2474 msgid "LSsession : problem during initialisation." msgstr "" -#: includes/class/class.LSsession.php:2453 +#: includes/class/class.LSsession.php:2477 msgid "LSsession : view function %{func} for LSaddon %{addon} doet not exist." msgstr "" -#: includes/class/class.LSsession.php:2456 +#: includes/class/class.LSsession.php:2480 msgid "LSsession : invalid related object's DN pass in parameter." msgstr "" @@ -1420,31 +1432,31 @@ msgstr "" msgid "Chat with this person." msgstr "" -#: includes/class/class.LSattr_html_select_list.php:370 +#: includes/class/class.LSattr_html_select_list.php:392 msgid "" "LSattr_html_select_list : Configuration data are missing to generate the " "select list of the attribute %{attr}." msgstr "" -#: includes/class/class.LSattr_html_select_list.php:373 +#: includes/class/class.LSattr_html_select_list.php:395 msgid "" "LSattr_html_select_list : Invalid attribute %{attr} reference as " "OTHER_ATTRIBUTE possible values." msgstr "" -#: includes/class/class.LSattr_html_select_list.php:376 +#: includes/class/class.LSattr_html_select_list.php:398 msgid "" "LSattr_html_select_list : Attribute %{attr} referenced as OTHER_ATTRIBUTE " "possible values is not a jsonCompositeAttribute." msgstr "" -#: includes/class/class.LSattr_html_select_list.php:379 +#: includes/class/class.LSattr_html_select_list.php:401 msgid "" "LSattr_html_select_list : Fail to decode the following attribute %{attr} " "value as JSON : %{value}" msgstr "" -#: includes/class/class.LSattr_html_select_list.php:382 +#: includes/class/class.LSattr_html_select_list.php:404 msgid "" "LSattr_html_select_list : No component %{component} found in the following " "attribute %{attr} JSON value : %{value}" @@ -1523,16 +1535,16 @@ msgstr "" msgid "LSioFormat : IOformat driver %{driver} invalid or unavailable." msgstr "" -#: includes/functions.php:113 +#: includes/functions.php:112 msgid "" "Function 'getFData' : The method %{meth} of the object %{obj} doesn't exist." msgstr "" -#: includes/functions.php:175 +#: includes/functions.php:205 msgid "[not string value]" msgstr "" -#: includes/functions.php:214 +#: includes/functions.php:251 msgid "Folder not found" msgstr "" @@ -1546,7 +1558,7 @@ msgstr "" msgid "Missing parameter" msgstr "" -#: index.php:28 +#: index.php:31 msgid "Home" msgstr ""