}elseif(($method=='get') and ($ex[$paracount-5] == 'v1.php') and ($ex[$paracount-4]=='cloud') and ($ex[$paracount-3] == 'system') and ($ex[$paracount-2] == 'webapps')){
OC_OCS::systemwebapps($format);
// quotaget
// quotaget
}elseif(($method=='get') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'quota')){
$user=$ex[$paracount-3];
OC_OCS::quotaget($format,$user);
// quotaset
// quotaset
}elseif(($method=='post') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'quota')){
$user=$ex[$paracount-3];
$quota = self::readData('post', 'quota', 'int');
OC_OCS::quotaset($format,$user,$quota);
// keygetpublic
// keygetpublic
}elseif(($method=='get') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'publickey')){
$user=$ex[$paracount-3];
OC_OCS::publicKeyGet($format,$user);
// keygetprivate
// keygetprivate
}elseif(($method=='get') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'privatekey')){
$errors[]=array('error'=>"Can't write into apps directory",'hint'=>"You can usually fix this by giving the webserver user write access to the apps directory
$errors[]=array('error'=>"Can't write into apps directory",'hint'=>"You can usually fix this by giving the webserver user write access to the apps directory
in owncloud or disabling the appstore in the config file.");
}
}
@ -410,15 +410,15 @@ class OC_Util {
// cleanup old tokens garbage collector
// only run every 20th time so we don't waste cpu cycles
if(rand(0,20)==0) {
if(rand(0,20)==0) {
foreach($_SESSION as $key=>$value) {
// search all tokens in the session
if(substr($key,0,12)=='requesttoken') {
if($value+$maxtime<time()){
// remove outdated tokens
unset($_SESSION[$key]);
unset($_SESSION[$key]);
}
}
}
}
}
// return the token
@ -465,13 +465,13 @@ class OC_Util {
exit;
}
}
/**
* @brief Public function to sanitize HTML
*
* This function is used to sanitize HTML and should be applied on any
* string or array of strings before displaying it on a web page.
*
*
* @param string or array of strings
* @return array with sanitized strings or a single sanitized string, depends on the input parameter.