0001-Remove-obsolete-environment-plugin-handling-that-mak.patch

elacour, 06/21/2011 03:30 PM

Download (3.62 KB)

View differences:

setup.php
67 67
	//if glpi is loaded
68 68
	if (getLoginUserID()) {
69 69

  
70
		//if environment plugin is installed
71
		if (isset($_SESSION["glpi_plugin_environment_installed"]) && $_SESSION["glpi_plugin_environment_installed"]==1) {
72
			//init $_SESSION for environment using
73
			$_SESSION["glpi_plugin_environment_tlflines"]=1;
74

  
75
			if (plugin_tlflines_haveRight("tlflines","r")) {
76
				$PLUGIN_HOOKS['submenu_entry']['environment']['options']['tlflines']['title'] = $LANG['plugin_tlflines'][4];
77
				$PLUGIN_HOOKS['submenu_entry']['environment']['options']['tlflines']['page'] = '/plugins/tlflines/front/tlflines.php';
78
				$PLUGIN_HOOKS['submenu_entry']['environment']['options']['tlflines']['links']['search'] = '/plugins/tlflines/front/tlflines.php';
79
				//add tlflines to items details
80
				$PLUGIN_HOOKS['headings']['tlflines'] = 'plugin_get_headings_tlflines';
81
				$PLUGIN_HOOKS['headings_action']['tlflines'] = 'plugin_headings_actions_tlflines';
82
				$PLUGIN_HOOKS['headings_actionpdf']['tlflines'] = 'plugin_headings_actionpdf_tlflines';
83
			}
84

  
85
			if (plugin_tlflines_haveRight("tlflines","w")) {
86
				//redirect link to add tlflines
87
				$PLUGIN_HOOKS['submenu_entry']['environment']['options']['tlflines']['links']['add'] = '/plugins/tlflines/front/tlfline.form.php';
88
				//use massiveaction in the plugin
89
				$PLUGIN_HOOKS['use_massive_action']['tlflines']=1;
90

  
91
			}
92
		//if environment plugin isn't installed
93
		} else {
94

  
95
			// Display a menu entry ?
96
			if (plugin_tlflines_haveRight("tlflines","r")) {
97
				//menu entry
98
				$PLUGIN_HOOKS['menu_entry']['tlflines'] = 'front/tlfline.php';
99
				//search link
100
				$PLUGIN_HOOKS['submenu_entry']['tlflines']['search'] = 'front/tlfline.php';
101
				//add tlflines to items details
102
				$PLUGIN_HOOKS['headings']['tlflines'] = 'plugin_get_headings_tlflines';
103
				$PLUGIN_HOOKS['headings_action']['tlflines'] = 'plugin_headings_actions_tlflines';
104
				$PLUGIN_HOOKS['headings_actionpdf']['tlflines'] = 'plugin_headings_actionpdf_tlflines';
105
			}
106

  
107
			if (plugin_tlflines_haveRight("tlflines","w")) {
108
				//add link
109
				$PLUGIN_HOOKS['submenu_entry']['tlflines']['add'] = 'front/tlfline.form.php';
110
				//use massiveaction in the plugin
111
				$PLUGIN_HOOKS['use_massive_action']['tlflines']=1;
112
			}
70
		// Display a menu entry ?
71
		if (plugin_tlflines_haveRight("tlflines","r")) {
72
			//menu entry
73
			$PLUGIN_HOOKS['menu_entry']['tlflines'] = 'front/tlfline.php';
74
			//search link
75
			$PLUGIN_HOOKS['submenu_entry']['tlflines']['search'] = 'front/tlfline.php';
76
			//add tlflines to items details
77
			$PLUGIN_HOOKS['headings']['tlflines'] = 'plugin_get_headings_tlflines';
78
			$PLUGIN_HOOKS['headings_action']['tlflines'] = 'plugin_headings_actions_tlflines';
79
			$PLUGIN_HOOKS['headings_actionpdf']['tlflines'] = 'plugin_headings_actionpdf_tlflines';
80
		}
81

  
82
		if (plugin_tlflines_haveRight("tlflines","w")) {
83
			//add link
84
			$PLUGIN_HOOKS['submenu_entry']['tlflines']['add'] = 'front/tlfline.form.php';
85
			//use massiveaction in the plugin
86
			$PLUGIN_HOOKS['use_massive_action']['tlflines']=1;
113 87
		}
114 88

  
115 89
		// Import from Data_Injection plugin
......
164 138
   return $types;
165 139
}
166 140

  
167
?>
141
?>
168
-