diff options
Diffstat (limited to 'lib/models/WikiPage.class.php')
| -rw-r--r-- | lib/models/WikiPage.class.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/models/WikiPage.class.php b/lib/models/WikiPage.class.php index d349aa1..67ddd7e 100644 --- a/lib/models/WikiPage.class.php +++ b/lib/models/WikiPage.class.php @@ -92,7 +92,7 @@ class WikiPage extends SimpleORMap implements PrivacyObject protected function createVersion() { - $this->user_id = User::findCurrent()->id; + $last_version = $this->versions[0]; if ( !$this->isNew() && $this->content['content'] !== $this->content_db['content'] @@ -100,6 +100,7 @@ class WikiPage extends SimpleORMap implements PrivacyObject $this->content_db['user_id'] !== $this->content['user_id'] || $this->content_db['chdate'] < time() - 60 * 30 ) + && (!$last_version || $last_version['content'] !== $this['content']) ) { //Neue Version anlegen: WikiVersion::create([ |
