/**
* get the id of the last ran job
*
- * @return int
+ * @return string
*/
public function getLastJob() {
- return \OC_Appconfig::getValue('backgroundjob', 'lastjob', 0);
+ return $this->config->getAppValue('backgroundjob', 'lastjob', 0);
}
/**
/**
* @brief sets up the
- * @param ZipArchive $zip ZipArchive object
- * @param optional $db a MDB2 database object (required for exporttype user)
- * @return boolean|null
+ * @param $zip ZipArchive object
- * @param optional $db a database object (required for exporttype user)
++ * @param $db a database object (required for exporttype user)
+ * @return bool
*/
public function __construct( $zip, $db=null ) {
return true;
}
+ /**
+ * @param string $user
+ */
public static function getUserQuota($user){
- $userQuota = OC_Preferences::getValue($user, 'files', 'quota', 'default');
+ $config = \OC::$server->getConfig();
+ $userQuota = $config->getUserValue($user, 'files', 'quota', 'default');
if($userQuota === 'default') {
- $userQuota = OC_AppConfig::getValue('files', 'default_quota', 'none');
+ $userQuota = $config->getAppValue('files', 'default_quota', 'none');
}
if($userQuota === 'none') {
return \OC\Files\SPACE_UNLIMITED;
* @deprecated
* Gets one queued task
* @param int $id ID of the task
- * @return associative array
+ * @return \OC\BackgroundJob\Job|null array
*/
public static function findQueuedTask($id) {
- $jobList = new JobList();
+ $jobList = \OC::$server->getJobList();
return $jobList->getById($id);
}