Skip to content

Commit

Permalink
remove obsolete editby Page param close #346
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-peugnet committed Nov 12, 2023
1 parent 8135c1c commit c99e480
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 44 deletions.
1 change: 0 additions & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Page related api
"displaycount": 1,
"visitcount": 0,
"editcount": 3,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion app/class/Controllerpage.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ public function update($page)
$this->routedirect('pageedit', ['page' => $this->page->id()]);
} else {
$this->page->updateedited();
$this->page->removeeditby($this->user->id());

$this->pagemanager->update($this->page);
}
Expand Down
29 changes: 0 additions & 29 deletions app/class/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ abstract class Page extends Item
protected $displaycount;
protected $visitcount;
protected $editcount;
protected $editby;
protected $sleep;
protected $redirection;
protected $refresh;
Expand Down Expand Up @@ -124,7 +123,6 @@ public function reset()
$this->setvisitcount(0);
$this->seteditcount(0);
$this->setdisplaycount(0);
$this->seteditby([]);
$this->setsleep(0);
$this->setredirection('');
$this->setrefresh(0);
Expand Down Expand Up @@ -398,11 +396,6 @@ public function editcount($type = 'int'): int
return $this->editcount;
}

public function editby($type = 'array')
{
return $this->editby;
}

public function sleep($type = 'int')
{
return $this->sleep;
Expand Down Expand Up @@ -752,13 +745,6 @@ public function seteditcount($editcount)
}
}

public function seteditby($editby)
{
if (is_array($editby)) {
$this->editby = $editby;
}
}

public function setredirection($redirection)
{
if (is_string($redirection) && strlen($redirection) <= 64) {
Expand Down Expand Up @@ -833,21 +819,6 @@ public function addauthor(string $id)
}
}

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;
}

public function setsleep($sleep)
{
$sleep = abs(intval($sleep));
Expand Down
2 changes: 0 additions & 2 deletions app/class/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ public function match()
['GET', '/[cid:page]/login', 'Controllerpage#login', 'pagelogin'],
['POST', '/[cid:page]/edit', 'Controllerpage#update', 'pageupdate'],
['POST', '/workspace/update', 'Controllerworkspace#update', 'workspaceupdate'],
['POST', '/[cid:page]/editby', 'Controllerpage#editby', 'pageeditby'],
['POST', '/[cid:page]/removeeditby', 'Controllerpage#removeeditby', 'pageremoveeditby'],
['GET', '/[cid:page]/delete', 'Controllerpage#delete', 'pagedelete'],
['POST', '/[cid:page]/delete', 'Controllerpage#confirmdelete', 'pageconfirmdelete'],
['GET', '/[cid:page]/duplicate:[cid:duplicate]', 'Controllerpage#duplicate', 'pageduplicate'],
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv1Test/body-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"displaycount": 16,
"visitcount": 0,
"editcount": 48,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv1Test/date-time-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"displaycount": 0,
"visitcount": 0,
"editcount": 0,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv1Test/empty-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"displaycount": 0,
"visitcount": 0,
"editcount": 0,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv1Test/external-links-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"displaycount": 85,
"visitcount": 0,
"editcount": 24,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv1Test/markdown-test-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"displaycount": 2,
"visitcount": 0,
"editcount": 1,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv1Test/markdown-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"displaycount": 9,
"visitcount": 0,
"editcount": 14,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv2Test/body-test-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"displaycount": 12,
"visitcount": 0,
"editcount": 24,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv2Test/date-time-test-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"displaycount": 2,
"visitcount": 0,
"editcount": 4,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv2Test/empty-test-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"displaycount": 1,
"visitcount": 0,
"editcount": 0,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv2Test/external-links-test-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"displaycount": 1,
"visitcount": 0,
"editcount": 1,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/data/Servicerenderv2Test/markdown-test-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"displaycount": 1,
"visitcount": 0,
"editcount": 1,
"editby": [],
"sleep": 0,
"redirection": "",
"refresh": 0,
Expand Down

0 comments on commit c99e480

Please sign in to comment.