- Migrated from https://github.com/Yetangitu/owncloud-apps
- substantial bit rot accrued in 4 years of non-maintenance which made Reader unusable - Reader now works reliably on public pages - or at least it _Works For Me™_ - Refactored a substantial part of the code to comply to the "current" (ha ha) Nextcloud API - Dropped Owncloud compatibility for lack of a testing installation - Dropped IE (<11) support - Dropped compatibility with older (<20) Nextcloud versions - Dropped app-specific ajax code, now handled by SettingsController - Updated dependencies where applicable
This commit is contained in:
parent
16afbe45fe
commit
b190e180ef
137 changed files with 30984 additions and 2 deletions
42
lib/Db/Preference.php
Normal file
42
lib/Db/Preference.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Frank de Lange
|
||||
* @copyright 2015 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
namespace OCA\Files_Reader\Db;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
class Preference extends ReaderEntity implements \JsonSerializable {
|
||||
|
||||
protected $userId; // user for whom this preference is valid
|
||||
protected $scope; // scope (default or specific renderer)
|
||||
protected $fileId; // file for which this preference is set
|
||||
protected $name; // preference name
|
||||
protected $value; // preference value
|
||||
protected $lastModified; // modification timestamp
|
||||
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
'scope' => $this->getScope(),
|
||||
'fileId' => $this->getFileId(),
|
||||
'name' => $this->getName(),
|
||||
'value' => $this->conditional_json_decode($this->getValue()),
|
||||
'lastModified' => $this->getLastModified(),
|
||||
];
|
||||
}
|
||||
|
||||
public function toService() {
|
||||
return [
|
||||
'name' => $this->getName(),
|
||||
'value' => $this->conditional_json_decode($this->getValue()),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue