Merge pull request #3348 from ssahara/issue3339
set proper revinfo when media meta file is not available
This commit is contained in:
commit
c843d5563e
|
@ -193,6 +193,7 @@ class Revisions extends Ui
|
|||
* @param int $first
|
||||
* @param bool $hasNext
|
||||
* @return array revisions to be shown in a pagenated list
|
||||
* @see also https://www.dokuwiki.org/devel:changelog
|
||||
*/
|
||||
protected function getRevisions(&$first, &$hasNext)
|
||||
{
|
||||
|
@ -220,7 +221,18 @@ class Revisions extends Ui
|
|||
// add current page or media as revision[0]
|
||||
if ($this->media_id) {
|
||||
$rev = filemtime(fullpath(mediaFN($this->media_id)));
|
||||
$revisions[] = $changelog->getRevisionInfo($rev) + array(
|
||||
$changelog->setChunkSize(1024);
|
||||
$revinfo = $changelog->getRevisionInfo($rev) ?: array(
|
||||
'date' => $rev,
|
||||
'ip' => null,
|
||||
'type' => null,
|
||||
'id' => $this->media_id,
|
||||
'user' => null,
|
||||
'sum' => null,
|
||||
'extra' => null,
|
||||
'sizechange' => null,
|
||||
);
|
||||
$revisions[] = $revinfo + array(
|
||||
'media' => true,
|
||||
'current' => true,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue