aboutsummaryrefslogtreecommitdiff
path: root/app/class/art2.php
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2019-01-30 21:15:17 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-30 23:16:26 +0100
commit8ac5a09605992f1e434cb793ceca7497c6f46d23 (patch)
tree091f9879f8f94b849300fef2d1a1238f3881f78e /app/class/art2.php
parent396a5776cd043e899e4897ec50fc8edc52585512 (diff)
downloadwcms-8ac5a09605992f1e434cb793ceca7497c6f46d23.tar.gz
wcms-8ac5a09605992f1e434cb793ceca7497c6f46d23.zip
feat: editBy to store the current editor of an art
Diffstat (limited to 'app/class/art2.php')
-rw-r--r--app/class/art2.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/app/class/art2.php b/app/class/art2.php
index 7354e8c..4f04858 100644
--- a/app/class/art2.php
+++ b/app/class/art2.php
@@ -39,6 +39,7 @@ class Art2
protected $affcount;
protected $visitcount;
protected $editcount;
+ protected $editby;
const LEN = 255;
@@ -110,6 +111,7 @@ class Art2
$this->setaffcount(0);
$this->setvisitcount(0);
$this->seteditcount(0);
+ $this->seteditby([]);
}
@@ -441,6 +443,10 @@ class Art2
return $this->editcount;
}
+ public function editby($type = 'array')
+ {
+ return $this->editby;
+ }
@@ -761,6 +767,13 @@ class Art2
}
}
+ public function seteditby($editby)
+ {
+ if(is_array($editby)) {
+ $this->editby = $editby;
+ }
+ }
+
// __________________________________ C O U N T E R S ______________________________
@@ -794,6 +807,21 @@ class Art2
}
}
+ public function addeditby(string $id)
+ {
+ $this->editby[$id] = true;
+ }
+
+ public function removeeditby(string $id)
+ {
+ unset($this->editby[$id]);
+ }
+
+ public function iseditedby()
+ {
+ return count($this->editby) > 0;
+ }
+
}