Code Duplication    Length = 4-7 lines in 2 locations

apps/files_sharing/lib/helper.php 1 location

@@ 131-137 (lines=7) @@
128
			}
129
130
		}
131
		else {
132
			// not authenticated ?
133
			if ( ! \OC::$server->getSession()->exists('public_link_authenticated')
134
				|| \OC::$server->getSession()->get('public_link_authenticated') !== $linkItem['id']) {
135
				return false;
136
			}
137
		}
138
		return true;
139
	}
140

lib/private/share/share.php 1 location

@@ 2244-2247 (lines=4) @@
2241
			return true;
2242
		}
2243
2244
		if ( \OC::$server->getSession()->exists('public_link_authenticated')
2245
			&& \OC::$server->getSession()->get('public_link_authenticated') === $linkItem['id'] ) {
2246
			return true;
2247
		}
2248
2249
		return false;
2250
	}