|
@@ -116,24 +116,24 @@ class Post extends DataModel
|
|
return false;
|
|
return false;
|
|
} elseif ($this->c->user->isModerator($this)) {
|
|
} elseif ($this->c->user->isModerator($this)) {
|
|
return true;
|
|
return true;
|
|
- } elseif (1 === $this->parent->closed) {
|
|
|
|
|
|
+ } elseif ('1' == $this->parent->closed) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
return $this->user->id === $this->c->user->id
|
|
return $this->user->id === $this->c->user->id
|
|
&& (
|
|
&& (
|
|
(
|
|
(
|
|
- $this->id === $this->parent->first_post_id
|
|
|
|
|
|
+ $this->id == $this->parent->first_post_id
|
|
&& 1 === $this->c->user->g_delete_topics
|
|
&& 1 === $this->c->user->g_delete_topics
|
|
)
|
|
)
|
|
|| (
|
|
|| (
|
|
- $this->id !== $this->parent->first_post_id
|
|
|
|
|
|
+ $this->id != $this->parent->first_post_id
|
|
&& 1 === $this->c->user->g_delete_posts
|
|
&& 1 === $this->c->user->g_delete_posts
|
|
)
|
|
)
|
|
)
|
|
)
|
|
&& (
|
|
&& (
|
|
- 0 === $this->c->user->g_deledit_interval
|
|
|
|
- || 1 === $this->edit_post
|
|
|
|
|
|
+ '0' == $this->c->user->g_deledit_interval
|
|
|
|
+ || '1' == $this->edit_post
|
|
|| \time() - $this->posted < $this->c->user->g_deledit_interval
|
|
|| \time() - $this->posted < $this->c->user->g_deledit_interval
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -165,15 +165,15 @@ class Post extends DataModel
|
|
return false;
|
|
return false;
|
|
} elseif ($this->c->user->isModerator($this)) {
|
|
} elseif ($this->c->user->isModerator($this)) {
|
|
return true;
|
|
return true;
|
|
- } elseif (1 === $this->parent->closed) {
|
|
|
|
|
|
+ } elseif ('1' == $this->parent->closed) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
return $this->user->id === $this->c->user->id
|
|
return $this->user->id === $this->c->user->id
|
|
&& 1 === $this->c->user->g_edit_posts
|
|
&& 1 === $this->c->user->g_edit_posts
|
|
&& (
|
|
&& (
|
|
- 0 === $this->c->user->g_deledit_interval
|
|
|
|
- || 1 === $this->edit_post
|
|
|
|
|
|
+ '0' == $this->c->user->g_deledit_interval
|
|
|
|
+ || '1' == $this->edit_post
|
|
|| \time() - $this->posted < $this->c->user->g_deledit_interval
|
|
|| \time() - $this->posted < $this->c->user->g_deledit_interval
|
|
|| (
|
|
|| (
|
|
$this->user->id === $this->editor_id
|
|
$this->user->id === $this->editor_id
|