mirror of
https://codeberg.org/SeedDMS/paperless
synced 2025-02-06 06:55:28 +00:00
pass inbox tags to __getCategoryData()
This commit is contained in:
parent
af76aa6ee8
commit
58e864f0b6
|
@ -101,10 +101,10 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */
|
|||
$g = hexdec(substr($hexcolor, 3, 2));
|
||||
$b = hexdec(substr($hexcolor, 5, 2));
|
||||
$yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
|
||||
return ($yiq >= 128) ? '000000' : 'ffffff';
|
||||
return ($yiq >= 148) ? '000000' : 'ffffff';
|
||||
}
|
||||
|
||||
protected function __getCategoryData($category) { /* {{{ */
|
||||
protected function __getCategoryData($category, $inboxtags) { /* {{{ */
|
||||
$color = substr(md5($category->getName()), 0, 6);
|
||||
$data = [
|
||||
'id'=>(int)$category->getId(),
|
||||
|
@ -115,7 +115,7 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */
|
|||
'match'=>'',
|
||||
'matching_algorithm'=>6,
|
||||
'is_insensitive'=>true,
|
||||
'is_inbox_tag'=>$category->getName() == 'Computer',
|
||||
'is_inbox_tag'=>in_array($category->getId(), $inboxtags),
|
||||
'document_count'=>0
|
||||
];
|
||||
return $data;
|
||||
|
|
Loading…
Reference in New Issue
Block a user