id = $id; } /** * Get revisions, and set correct pagenation parameters (first, hasNext) * * @param int $first * @param bool $hasNext * @return array revisions to be shown in a pagenated list * @see also https://www.dokuwiki.org/devel:changelog */ abstract protected function getRevisions(&$first, &$hasNext); /** * Navigation buttons for Pagenation (prev/next) * * @param int $first * @param bool $hasNext * @param callable $callback returns array of hidden fields for the form button * @return array html */ protected function navigation($first, $hasNext, $callback) { global $conf; $html = '
 ';
                    } else {
                        $href = media_managerURL(['image'=> $id, 'rev'=> $rev, 'mediado'=>'diff'], '&');
                        $html = ''
                              . '
';
                    } else {
                        $href = media_managerURL(['image'=> $id, 'rev'=> $rev, 'mediado'=>'diff'], '&');
                        $html = ''
                              . '!['. $lang['diff'] .' '.$lang['diff'] .']('.DOKU_BASE.'lib/images/diff.png) '
                              . ' ';
                    }
                    return $html;
                } else {
                    // page revision
                    if ($this->info['current'] || !page_exists($id, $rev)) {
                        $html = '
'
                              . ' ';
                    }
                    return $html;
                } else {
                    // page revision
                    if ($this->info['current'] || !page_exists($id, $rev)) {
                        $html = ' ';
                    } else {
                        $href = wl($id, "rev=$rev,do=diff", false, '&');
                        $html = ''
                              . '
';
                    } else {
                        $href = wl($id, "rev=$rev,do=diff", false, '&');
                        $html = ''
                              . '!['.$lang['diff'].' '.$lang['diff'].']('.DOKU_BASE.'lib/images/diff.png) '
                              . '';
                    }
                    return $html;
                }
            }
            // size change
            public function sizeChange()
            {
                $class = 'sizechange';
                $value = filesize_h(abs($this->info['sizechange']));
                if ($this->info['sizechange'] > 0) {
                    $class .= ' positive';
                    $value = '+' . $value;
                } elseif ($this->info['sizechange'] < 0) {
                    $class .= ' negative';
                    $value = '-' . $value;
                } else {
                    $value = '±' . $value;
                }
                return ''.$value.'';
            }
        }; // end of anonymous class (objRevInfo)
    }
}
'
                              . '';
                    }
                    return $html;
                }
            }
            // size change
            public function sizeChange()
            {
                $class = 'sizechange';
                $value = filesize_h(abs($this->info['sizechange']));
                if ($this->info['sizechange'] > 0) {
                    $class .= ' positive';
                    $value = '+' . $value;
                } elseif ($this->info['sizechange'] < 0) {
                    $class .= ' negative';
                    $value = '-' . $value;
                } else {
                    $value = '±' . $value;
                }
                return ''.$value.'';
            }
        }; // end of anonymous class (objRevInfo)
    }
}