Procházet zdrojové kódy

Fix: restore logout and logged translation key

Laurent Destailleur před 9 roky
rodič
revize
4d1885eb59

+ 1 - 1
dev/translation/sanity_check_en_langfiles.php

@@ -343,7 +343,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
 	    }
 	    
 	    //$search = '\'trans("'.$value.'")\'';
-	    $search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')"';
+	    $search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"';
 		$string =  'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
 		//print $string."<br>\n";
 		exec($string,$output);

+ 3 - 1
htdocs/core/triggers/interface_20_all_Logevents.class.php

@@ -63,7 +63,8 @@ class InterfaceLogevents extends DolibarrTriggers
         if ($action == 'USER_LOGIN')
         {
             dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
-
+            
+            $langs->load("users");
             // Initialisation donnees (date,duree,texte,desc)
             $text="(UserLogged,".$object->login.")";
             $text.=(empty($object->trigger_mesg)?'':' - '.$object->trigger_mesg);
@@ -82,6 +83,7 @@ class InterfaceLogevents extends DolibarrTriggers
         {
             dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
 
+            $langs->load("users");
             // Initialisation donnees (date,duree,texte,desc)
             $text="(UserLogoff,".$object->login.")";
             $desc="(UserLogoff,".$object->login.")";

+ 1 - 0
htdocs/langs/en_US/ldap.lang

@@ -15,6 +15,7 @@ LDAPFieldFirstSubscriptionDate=First subscription date
 LDAPFieldFirstSubscriptionAmount=First subscription amount
 LDAPFieldLastSubscriptionDate=Last subscription date
 LDAPFieldLastSubscriptionAmount=Last subscription amount
+LDAPFieldSkype=Skype id
 UserSynchronized=User synchronized
 GroupSynchronized=Group synchronized
 MemberSynchronized=Member synchronized

+ 2 - 0
htdocs/langs/en_US/users.lang

@@ -100,3 +100,5 @@ WeeklyHours=Weekly hours
 ColorUser=Color of the user
 DisabledInMonoUserMode=Disabled in maintenance mode
 UserAccountancyCode=User accountancy code
+UserLogoff=User logout
+UserLogged=User logged