. * */ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('storage_charts'); if(in_array($_POST['k'], Array('hu_size','sc_sort','hu_size_hus'))){ switch($_POST['o']){ case 'set': $i = NULL; if(is_array($_POST['i'])){ $i = serialize($_POST['i']); }elseif(is_numeric($_POST['i'])){ $i = $_POST['i']; } OC_DLStCharts::setUConfValue($_POST['k'], $i); break; case 'get': $v = OC_DLStCharts::getUConfValue($_POST['k']); OCP\JSON::encodedPrint(Array('r' => $v['uc_val'])); break; } }