Lines Matching +full:update +full:- +full:user +full:- +full:info -(+path:inc +path:lang) -(+path:lib +path:plugins +path:lang) -(+path:lib +path:tpl +path:dokuwiki +path:lang)

32         $this->id = $id;
33 $this->changelog = new PageChangeLog($this->id);
39 return $this->id;
45 return wikiFN($this->id, $rev);
58 $revInfo = $rev ? $this->changelog->getRevisionInfo($rev) : false;
61 : io_readWikiPage($this->getPath($rev), $this->id, $rev); // retrieve from attic
63 return io_readWikiPage($this->getPath(), $this->id, '');
75 * @param string $summary summary of text update
76 * @param bool $minor mark this saved version as minor update
94 if (isset($this->data)) return;
96 $pagefile = $this->getPath();
98 $currentContent = $this->rawWikiText();
103 'id' => $this->id,// should not be altered by any handlers
114 'sizechange' => strlen($text) - strlen($currentContent),
129 $is_minor_change = ($minor && $conf['useacl'] && $INPUT->server->str('REMOTE_USER'));
135 $this->data = $data;
139 if (!$event->advise_before()) return;
144 // Check whether the pagefile has modified during $event->advise_before()
150 $this->detectExternalEdit();
168 // send "update" event with empty data, so plugins can react to page deletion
169 $ioData = [[$pagefile, '', false], getNS($this->id), noNS($this->id), false];
171 // pre-save deleted revision
174 $data['newRevision'] = $this->saveOldRevision();
178 // don't remove old meta info as it should be saved, plugins can use
180 // purge non-persistant meta data
181 p_purge_metadata($this->id);
183 io_sweepNS($this->id, 'datadir');
184 io_sweepNS($this->id, 'mediadir');
187 io_writeWikiPage($pagefile, $data['newContent'], $this->id);
188 // pre-save the revision, to keep the attic in sync
189 $data['newRevision'] = $this->saveOldRevision();
192 $data['sizechange'] = $filesize_new - $filesize_old;
194 $event->advise_after();
199 $logEntry = $this->changelog->addLogEntry([
203 'id' => $this->id,
204 'user' => $INPUT->server->str('REMOTE_USER'),
209 // update metadata
210 $this->updateMetadata($logEntry);
212 // update the purgefile (timestamp of the last time anything within the wiki was changed)
228 $revInfo = $this->changelog->getCurrentRevisionInfo();
236 $fileLastMod = $this->getPath();
240 $msg = "PageFile($this->id)::detectExternalEdit(): timestamp successfully modified";
241 $details = '(' . $wrong_timestamp . ' -> ' . $revInfo['date'] . ')';
245 $msg = "PageFile($this->id)::detectExternalEdit(): page file should be newer than last revision "
246 . '(' . filemtime($fileLastMod) . ' < ' . $this->changelog->lastRevision() . ')';
255 $this->saveOldRevision();
257 $this->changelog->addLogEntry($revInfo);
259 $cache = new CacheInstructions($this->id, $this->getPath());
260 $cache->removeCache();
272 $oldfile = $this->getPath();
275 $newfile = $this->getPath($date);
276 io_writeWikiPage($newfile, $this->rawWikiText(), $this->id, $date);
281 * Update metadata of changed page
287 global $INFO;
289 ['date' => $date, 'type' => $changeType, 'user' => $user, ] = $logEntry;
296 $createdDate = @filectime($this->getPath());
300 $oldmeta = p_read_metadata($this->id)['persistent'];
309 if ($user) {
310 $meta['creator'] = $INFO['userinfo']['name'] ?? null;
311 $meta['user'] = $user;
314 // re-created / restored
318 if ($user) {
319 $meta['contributor'][$user] = $INFO['userinfo']['name'] ?? null;
321 } elseif (!$wasMinorEdit) { // non-minor modification
323 if ($user) {
324 $meta['contributor'][$user] = $INFO['userinfo']['name'] ?? null;
328 p_set_metadata($this->id, $meta);