mirror of
				https://github.com/pluginsGLPI/example.git
				synced 2025-10-31 03:43:29 +01:00 
			
		
		
		
	Fix '_e()' deprecated calls
This commit is contained in:
		| @@ -45,5 +45,5 @@ Session::checkRight("config", UPDATE); | |||||||
| Plugin::load('example'); | Plugin::load('example'); | ||||||
|  |  | ||||||
| Html::header("TITRE", $_SERVER['PHP_SELF'], "config", "plugins"); | Html::header("TITRE", $_SERVER['PHP_SELF'], "config", "plugins"); | ||||||
| _e("This is the plugin config page", 'example'); | echo __("This is the plugin config page", 'example'); | ||||||
| Html::footer(); | Html::footer(); | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								hook.php
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								hook.php
									
									
									
									
									
								
							| @@ -292,7 +292,7 @@ function plugin_example_MassiveActionsFieldsDisplay($options=array()) { | |||||||
|       // Table fields |       // Table fields | ||||||
|       switch ($table.".".$field) { |       switch ($table.".".$field) { | ||||||
|          case 'glpi_plugin_example_examples.serial' : |          case 'glpi_plugin_example_examples.serial' : | ||||||
|             _e("Not really specific - Just for example", 'example'); |             echo __("Not really specific - Just for example", 'example'); | ||||||
|             //Html::autocompletionTextField($linkfield,$table,$field); |             //Html::autocompletionTextField($linkfield,$table,$field); | ||||||
|             // Dropdown::showYesNo($linkfield); |             // Dropdown::showYesNo($linkfield); | ||||||
|             // Need to return true if specific display |             // Need to return true if specific display | ||||||
| @@ -303,7 +303,7 @@ function plugin_example_MassiveActionsFieldsDisplay($options=array()) { | |||||||
|       // Linked Fields |       // Linked Fields | ||||||
|       switch ($table.".".$field) { |       switch ($table.".".$field) { | ||||||
|          case "glpi_plugin_example_dropdowns.name" : |          case "glpi_plugin_example_dropdowns.name" : | ||||||
|             _e("Not really specific - Just for example", 'example'); |             echo __("Not really specific - Just for example", 'example'); | ||||||
|             // Need to return true if specific display |             // Need to return true if specific display | ||||||
|             return true; |             return true; | ||||||
|       } |       } | ||||||
| @@ -323,7 +323,7 @@ function plugin_example_searchOptionsValues($options=array()) { | |||||||
|     // Table fields |     // Table fields | ||||||
|    switch ($table.".".$field) { |    switch ($table.".".$field) { | ||||||
|       case "glpi_plugin_example_examples.serial" : |       case "glpi_plugin_example_examples.serial" : | ||||||
|             _e("Not really specific - Use your own dropdown - Just for example", 'example'); |             echo __("Not really specific - Use your own dropdown - Just for example", 'example'); | ||||||
|             Dropdown::show(getItemTypeForTable($options['searchoption']['table']), |             Dropdown::show(getItemTypeForTable($options['searchoption']['table']), | ||||||
|                                                array('value'    => $options['value'], |                                                array('value'    => $options['value'], | ||||||
|                                                      'name'     => $options['name'], |                                                      'name'     => $options['name'], | ||||||
|   | |||||||
| @@ -239,11 +239,11 @@ class PluginExampleExample extends CommonDBTM { | |||||||
|  |  | ||||||
|       switch ($item->getType()) { |       switch ($item->getType()) { | ||||||
|          case 'Phone' : |          case 'Phone' : | ||||||
|             _e("Plugin Example on Phone", 'example'); |             echo __("Plugin Example on Phone", 'example'); | ||||||
|             break; |             break; | ||||||
|  |  | ||||||
|          case 'Central' : |          case 'Central' : | ||||||
|             _e("Plugin central action", 'example'); |             echo __("Plugin central action", 'example'); | ||||||
|             break; |             break; | ||||||
|  |  | ||||||
|          case 'Preference' : |          case 'Preference' : | ||||||
| @@ -266,15 +266,15 @@ class PluginExampleExample extends CommonDBTM { | |||||||
|             break; |             break; | ||||||
|  |  | ||||||
|          case 'Notification' : |          case 'Notification' : | ||||||
|             _e("Plugin mailing action", 'example'); |             echo __("Plugin mailing action", 'example'); | ||||||
|             break; |             break; | ||||||
|  |  | ||||||
|          case 'ComputerDisk' : |          case 'ComputerDisk' : | ||||||
|          case 'Supplier' : |          case 'Supplier' : | ||||||
|             if ($tabnum==1) { |             if ($tabnum==1) { | ||||||
|                _e('First tab of Plugin example', 'example'); |                echo __('First tab of Plugin example', 'example'); | ||||||
|             } else { |             } else { | ||||||
|                _e('Second tab of Plugin example', 'example'); |                echo __('Second tab of Plugin example', 'example'); | ||||||
|             } |             } | ||||||
|             break; |             break; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user