Code Duplication    Length = 4-7 lines in 2 locations

apps/files_sharing/lib/helper.php 1 location

@@ 161-167 (lines=7) @@
158
			}
159
160
		}
161
		else {
162
			// not authenticated ?
163
			if ( ! \OC::$server->getSession()->exists('public_link_authenticated')
164
				|| \OC::$server->getSession()->get('public_link_authenticated') !== (string)$linkItem['id']) {
165
				return false;
166
			}
167
		}
168
		return true;
169
	}
170

lib/private/share/share.php 1 location

@@ 2479-2482 (lines=4) @@
2476
			return true;
2477
		}
2478
2479
		if ( \OC::$server->getSession()->exists('public_link_authenticated')
2480
			&& \OC::$server->getSession()->get('public_link_authenticated') === (string)$linkItem['id'] ) {
2481
			return true;
2482
		}
2483
2484
		return false;
2485
	}