Code Duplication    Length = 16-17 lines in 2 locations

programs/configuration.php 2 locations

@@ 186-202 (lines=17) @@
183
	public $altbg = true;
184
185
186
	public function __construct()
187
	{
188
		global $babDB;
189
		$addon = bab_getAddonInfosInstance('LibCaldav');
190
191
		$this->res = $babDB->db_query("SELECT * FROM libcaldav_servers");
192
193
194
		$this->t_name = caldav_translate('Name');
195
		$this->t_server_url = caldav_translate('Caldav Server Url');
196
		$this->t_user_calendar_path = caldav_translate('User calendar path');
197
		$this->t_add = caldav_translate('Add');
198
		$this->t_use_unique_id = caldav_translate('Use unique ID');
199
200
		$this->addurl = $addon->getUrl().'configuration&idx=server';
201
202
	}
203
204
	public function getnext()
205
	{
@@ 258-273 (lines=16) @@
255
	public $altbg = true;
256
	
257
	
258
	public function __construct()
259
	{
260
		global $babDB;
261
		$addon = bab_getAddonInfosInstance('LibCaldav');
262
		
263
		$this->res = $babDB->db_query("SELECT * FROM libcaldav_resources");
264
		
265
		
266
		$this->t_name = caldav_translate('Name');
267
		$this->t_url = caldav_translate('Url');
268
		$this->t_add = caldav_translate('Add');
269
		$this->t_access = caldav_translate('Access');
270
		
271
		$this->addurl = $addon->getUrl().'configuration&idx=resource';
272
		
273
	}
274
	
275
	public function getnext()
276
	{