GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 57-58 lines in 2 locations

modules/member/member.controller.php 2 locations

@@ 869-926 (lines=58) @@
866
	 *
867
	 * @return void
868
	 */
869
	function insertImageName($member_srl, $target_file)
870
	{
871
		$oMemberModel = getModel('member');
872
		$config = $oMemberModel->getMemberConfig();
873
		$max_width = $config->image_name_max_width;
874
		$max_height = $config->image_name_max_height;
875
		$max_filesize = $config->image_name_max_filesize;
876
877
		Context::loadLang(_XE_PATH_ . 'modules/file/lang');
878
879
		// Get a target path to save
880
		$target_path = sprintf('files/member_extra_info/image_name/%s/', getNumberingPath($member_srl));
881
		FileHandler::makeDir($target_path);
882
883
		$target_filename = sprintf('%s%d.gif', $target_path, $member_srl);
884
		// Get file information
885
		list($width, $height, $type) = @getimagesize($target_file);
886
		// Convert if the image size is larger than a given size or if the format is not a gif
887
		if($width > $max_width || $height > $max_height || $type!=1)
888
		{
889
			$temp_filename = sprintf('files/cache/tmp/image_name_%d.gif', $member_srl, $ext);
890
			FileHandler::createImageFile($target_file, $temp_filename, $max_width, $max_height, 'gif');
891
892
			// 파일 용량 제한
893
			FileHandler::clearStatCache($temp_filename);
894
			$filesize = filesize($temp_filename);
895
			if($max_filesize && $filesize > ($max_filesize * 1024))
896
			{
897
				FileHandler::removeFile($temp_filename);
898
				return $this->stop(implode(' ' , array(
899
					Context::getLang('msg_not_uploaded_image_name'),
900
					Context::getLang('msg_exceeds_limit_size')
901
				)));
902
			}
903
904
			FileHandler::removeFilesInDir($target_path);
905
			FileHandler::moveFile($temp_filename, $target_filename);
906
			FileHandler::clearStatCache($target_filename);
907
		}
908
		else
909
		{
910
			// 파일 용량 제한
911
			$filesize = filesize($target_file);
912
			if($max_filesize && $filesize > ($max_filesize * 1024))
913
			{
914
				return $this->stop(implode(' ' , array(
915
					Context::getLang('msg_not_uploaded_image_name'),
916
					Context::getLang('msg_exceeds_limit_size')
917
				)));
918
			}
919
920
			FileHandler::removeFilesInDir($target_path);
921
			@copy($target_file, $target_filename);
922
			FileHandler::clearStatCache($target_filename);
923
		}
924
925
		return new BaseObject(0, 'success');
926
	}
927
928
	/**
929
	 * Delete profile image
@@ 1012-1068 (lines=57) @@
1009
	 *
1010
	 * @return void
1011
	 */
1012
	function insertImageMark($member_srl, $target_file)
1013
	{
1014
		$oMemberModel = getModel('member');
1015
		$config = $oMemberModel->getMemberConfig();
1016
		$max_width = $config->image_mark_max_width;
1017
		$max_height = $config->image_mark_max_height;
1018
		$max_filesize = $config->image_mark_max_filesize;
1019
1020
		Context::loadLang(_XE_PATH_ . 'modules/file/lang');
1021
1022
		$target_path = sprintf('files/member_extra_info/image_mark/%s/', getNumberingPath($member_srl));
1023
		FileHandler::makeDir($target_path);
1024
1025
		$target_filename = sprintf('%s%d.gif', $target_path, $member_srl);
1026
		// Get file information
1027
		list($width, $height, $type, $attrs) = @getimagesize($target_file);
1028
1029
		if($width > $max_width || $height > $max_height || $type!=1)
1030
		{
1031
			$temp_filename = sprintf('files/cache/tmp/image_mark_%d.gif', $member_srl);
1032
			FileHandler::createImageFile($target_file, $temp_filename, $max_width, $max_height, 'gif');
1033
1034
			// 파일 용량 제한
1035
			FileHandler::clearStatCache($temp_filename);
1036
			$filesize = filesize($temp_filename);
1037
			if($max_filesize && $filesize > ($max_filesize * 1024))
1038
			{
1039
				FileHandler::removeFile($temp_filename);
1040
				return $this->stop(implode(' ' , array(
1041
					Context::getLang('msg_not_uploaded_group_image_mark'),
1042
					Context::getLang('msg_exceeds_limit_size')
1043
				)));
1044
			}
1045
1046
			FileHandler::removeFilesInDir($target_path);
1047
			FileHandler::moveFile($temp_filename, $target_filename);
1048
			FileHandler::clearStatCache($target_filename);
1049
		}
1050
		else
1051
		{
1052
			$filesize = filesize($target_file);
1053
			if($max_filesize && $filesize > ($max_filesize * 1024))
1054
			{
1055
				FileHandler::removeFile($target_file);
1056
				return $this->stop(implode(' ' , array(
1057
					Context::getLang('msg_not_uploaded_group_image_mark'),
1058
					Context::getLang('msg_exceeds_limit_size')
1059
				)));
1060
			}
1061
1062
			FileHandler::removeFilesInDir($target_path);
1063
			@copy($target_file, $target_filename);
1064
			FileHandler::clearStatCache($target_filename);
1065
		}
1066
1067
		return new BaseObject(0, 'success');
1068
	}
1069
1070
	/**
1071
	 * Delete Image Mark