<commit_before><?php
/**
 * Copyright (c) 2011, <NAME> <<EMAIL>>
 * This file is licensed under the Affero General Public License version 3 or later.
 * See the COPYING-README file.
 */

require_once('../lib/base.php');
OC_Util::checkLoggedIn();

// Highlight navigation entry
OC_Util::addScript( 'settings', 'personal' );
OC_Util::addStyle( 'settings', 'settings' );
OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' );
OC_Util::addStyle( '3rdparty', 'chosen' );
OC_App::setActiveNavigationEntry( 'personal' );

// calculate the disc space
$rootInfo=OC_FileCache::get('');
$sharedInfo=OC_FileCache::get('/Shared');
$used=$rootInfo['size']-$sharedInfo['size'];
$free=OC_Filesystem::free_space();
$total=$free+$used;<commit_msg>Fix used space calculation if shared folder does not exist, fixes bug oc-1331<commit_after><?php
/**
 * Copyright (c) 2011, <NAME> <<EMAIL>>
 * This file is licensed under the Affero General Public License version 3 or later.
 * See the COPYING-README file.
 */

require_once('../lib/base.php');
OC_Util::checkLoggedIn();

// Highlight navigation entry
OC_Util::addScript( 'settings', 'personal' );
OC_Util::addStyle( 'settings', 'settings' );
OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' );
OC_Util::addStyle( '3rdparty', 'chosen' );
OC_App::setActiveNavigationEntry( 'personal' );

// calculate the disc space
$rootInfo=OC_FileCache::get('');
$sharedInfo=OC_FileCache::get('/Shared');
if (!isset($sharedInfo)) {
	$sharedSize = 0;
} else {
	$sharedSize = $sharedInfo['size'];
}
$used=$rootInfo['size']-$sharedSize;
$free=OC_Filesystem::free_space();
$total=$free+$used;
{'fraction_non_alphanumeric': 0.1845679012345679, 'fraction_numerical': 0.011728395061728396, 'mean_word_length': 6.830917874396135, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6679943', 'n_tokens_mistral': 554, 'n_tokens_neox': 538, 'n_words': 122}