Code Duplication    Length = 5-7 lines in 2 locations

web_interface/astpp/application/libraries/astpp/common.php 2 locations

@@ 886-890 (lines=5) @@
883
	function build_custome_edit_button($button_params, $field, $linkid) {
884
		$link = base_url() . $button_params->url . "" . $linkid;
885
		if(isset($button_params->layout)){
886
			if ($button_params->mode == 'popup') {
887
				return '<a href="' . $link . '" style="cursor:pointer;color:#005298;" rel="facebox_medium" title="Update">' . $field . '</a>&nbsp;';
888
			} else {
889
				return '<a href="' . $link . '" style="cursor:pointer;color:#005298;" title="Edit">' . $field . '</a>&nbsp;';
890
			}
891
		} else{ 
892
			if ($button_params->mode == 'popup') {
893
				return '<a href="' . $link . '" style="cursor:pointer;color:#005298;" rel="facebox" title="Update">' . $field . '</a>&nbsp;';
@@ 891-897 (lines=7) @@
888
			} else {
889
				return '<a href="' . $link . '" style="cursor:pointer;color:#005298;" title="Edit">' . $field . '</a>&nbsp;';
890
			}
891
		} else{ 
892
			if ($button_params->mode == 'popup') {
893
				return '<a href="' . $link . '" style="cursor:pointer;color:#005298;" rel="facebox" title="Update">' . $field . '</a>&nbsp;';
894
			} else {
895
				return '<a href="' . $link . '" style="cursor:pointer;color:#005298;" title="Edit">' . $field . '</a>&nbsp;';
896
			}
897
		}
898
	}
899
900
	/************************************ */