Code Duplication    Length = 4-5 lines in 2 locations

includes/librairies/eav/attributes_set.class.php 1 location

@@ 551-554 (lines=4) @@
548
' . wpshop_form::form_input(self::getDbTable() . '_form_has_modification', self::getDbTable() . '_form_has_modification', 'no' , 'hidden') . $the_form_content_hidden . wpshop_display::custom_page_output_builder($bloc_list, WPSHOP_ATTRIBUTE_SET_EDITION_PAGE_LAYOUT) . '
549
	<div class="wpshop_edition_button wpshop_edition_button_'.self::currentPageCode.'" >';
550
551
		if(($action == 'add') && (current_user_can('wpshop_add_attribute_set')))
552
			$the_form .= '<input type="submit" class="button-primary" id="add" name="add" value="' . __('Add', 'wpshop') . '" />';
553
		elseif(current_user_can('wpshop_edit_attribute_set'))
554
			$the_form .= '<input type="submit" class="button-primary" id="save" name="save" value="' . __('Save', 'wpshop') . '" />';
555
556
		if(current_user_can('wpshop_delete_attribute_set') && ($action != 'add'))
557
			$the_form .= '<input type="button" class="button-secondary wpshop_delete_element_button wpshop_delete_element_button_'.self::currentPageCode.'" id="delete" name="delete" value="' . __('Delete', 'wpshop') . '" />';

includes/librairies/eav/attributes.class.php 1 location

@@ 1250-1254 (lines=5) @@
1247
1248
		 //$currentPageButton .= '<h2 class="cancelButton alignleft" ><a href="' . admin_url('edit.php?post_type='.WPSHOP_NEWTYPE_IDENTIFIER_ENTITIES.'&amp;page=' . self::getListingSlug()) . '" class="button add-new-h2" >' . __('Back', 'wpshop') . '</a></h2>';
1249
1250
		if(($action == 'add') && (current_user_can('wpshop_add_attributes')))
1251
			$currentPageButton .= '<input type="button" class="button-primary" id="add" name="add" value="' . __('Add', 'wpshop') . '" />';
1252
1253
		elseif(current_user_can('wpshop_edit_attributes'))
1254
		$currentPageButton .= '<input type="button" class="button-primary" id="save" name="save" value="' . __('Save', 'wpshop') . '" />';
1255
1256
		$attribute_undeletable = unserialize(WPSHOP_ATTRIBUTE_UNDELETABLE);
1257
		$attribute = self::getElement($element_id, "'valid', 'moderated', 'notused'", 'id');