Code Duplication    Length = 4-4 lines in 2 locations

settings/ajax/setquota.php 1 location

@@ 61-64 (lines=4) @@
58
59
//make sure the quota is in the expected format
60
$quota= (string)$_POST["quota"];
61
if($quota !== 'none' and $quota !== 'default') {
62
	$quota= OC_Helper::computerFileSize($quota);
63
	$quota=OC_Helper::humanFileSize($quota);
64
}
65
66
// Return Success story
67
if($username) {

lib/private/User/User.php 1 location

@@ 375-378 (lines=4) @@
372
	 * @since 9.0.0
373
	 */
374
	public function setQuota($quota) {
375
		if($quota !== 'none' and $quota !== 'default') {
376
			$quota = OC_Helper::computerFileSize($quota);
377
			$quota = OC_Helper::humanFileSize($quota);
378
		}
379
		$this->config->setUserValue($this->uid, 'files', 'quota', $quota);
380
		$this->triggerChange('quota', $quota);
381
	}