Lines Matching +full:- +full:- +full:date

41         $this->preference['fromAjax'] = false;  // see dokuwiki\Ajax::callMediadiff()
42 $this->preference['showIntro'] = false;
43 $this->preference['difftype'] = 'both'; // diff view type: both, opacity or portions
51 $this->changelog = new MediaChangeLog($this->id);
67 if ($INPUT->has('difftype')) {
68 $this->preference['difftype'] = $INPUT->str('difftype');
77 $changelog =& $this->changelog;
83 $changelogRev1 = $changelog->getRevisionInfo($this->rev1);
84 $changelogRev2 = $changelog->getRevisionInfo($this->rev2);
86 $this->RevInfo1 = new RevisionInfo($changelogRev1);
87 $this->RevInfo2 = new RevisionInfo($changelogRev2);
89 $this->is_img = preg_match('/\.(jpe?g|gif|png)$/', $this->id);
91 foreach ([$this->RevInfo1, $this->RevInfo2] as $RevInfo) {
92 $isCurrent = $changelog->isCurrentRevision($RevInfo->val('date'));
93 $RevInfo->isCurrent($isCurrent);
95 if ($this->is_img) {
96 $rev = $isCurrent ? '' : $RevInfo->val('date');
97 $meta = new JpegMeta(mediaFN($this->id, $rev));
99 $RevInfo->append([
100 'previewSize' => media_image_preview_size($this->id, $rev, $meta)
105 // re-check image, ensure minimum image width for showImageDiff()
106 $this->is_img = ($this->is_img
107 && ($this->RevInfo1->val('previewSize')[0] ?? 0) >= 30
108 && ($this->RevInfo2->val('previewSize')[0] ?? 0) >= 30
111 if (!$this->is_img) {
112 $this->preference['difftype'] = 'both';
126 $ns = getNS($this->id);
129 if ($auth < AUTH_READ || !$this->id || !$conf['mediarevisions']) return;
132 $this->handle();
134 $this->preProcess();
137 if ($this->preference['showIntro']) echo p_locale_xhtml('diff');
140 if ($this->is_img && !$this->preference['fromAjax']) {
141 $this->showDiffViewSelector();
145 match ($this->preference['difftype']) {
146 'opacity', 'portions' => $this->showImageDiff(),
147 default => $this->showFileDiff(),
150 if ($this->is_img && !$this->preference['fromAjax']) {
161 // use timestamp for current revision, date may be false when revisions < 2
162 [$rev1, $rev2] = [(int)$this->RevInfo1->val('date'), (int)$this->RevInfo2->val('date')];
172 $form->addTagOpen('div')->addClass('no');
173 $form->setHiddenField('sectok', null);
174 $form->setHiddenField('mediado', 'diff');
175 $form->setHiddenField('rev2[0]', $rev1);
176 $form->setHiddenField('rev2[1]', $rev2);
177 $form->addTagClose('div');
178 echo $form->toHTML();
191 $rev1 = $this->RevInfo1->isCurrent() ? '' : $this->RevInfo1->val('date');
192 $rev2 = $this->RevInfo2->isCurrent() ? '' : $this->RevInfo2->val('date');
195 $type = $this->preference['difftype'];
198 $rev1Size = $this->RevInfo1->val('previewSize');
199 $rev2Size = $this->RevInfo2->val('previewSize');
206 $rev1Src = ml($this->id, ['rev' => $rev1, 'h' => $rev1Size[1], 'w' => $rev1Size[0]]);
207 $rev2Src = ml($this->id, ['rev' => $rev2, 'h' => $rev1Size[1], 'w' => $rev1Size[0]]);
210 echo '<div class="slider" style="max-width: ' . ($rev1Size[0] - 20) . 'px;" ></div>';
214 echo '<div class="image1" style="max-width: ' . $rev1Size[0] . 'px;">';
217 echo '<div class="image2" style="max-width: ' . $rev1Size[0] . 'px;">';
232 $ns = getNS($this->id);
235 $rev1 = $this->RevInfo1->isCurrent() ? '' : (int)$this->RevInfo1->val('date');
236 $rev2 = $this->RevInfo2->isCurrent() ? '' : (int)$this->RevInfo2->val('date');
239 …$rev1Title = trim($this->RevInfo1->showRevisionTitle() . ' ' . $this->RevInfo1->showCurrentIndicat…
240 $rev1Summary = ($this->RevInfo1->val('date'))
241 ? $this->RevInfo1->showEditSummary() . ' ' . $this->RevInfo1->showEditor()
243 …$rev2Title = trim($this->RevInfo2->showRevisionTitle() . ' ' . $this->RevInfo2->showCurrentIndicat…
244 $rev2Summary = ($this->RevInfo2->val('date'))
245 ? $this->RevInfo2->showEditSummary() . ' ' . $this->RevInfo2->showEditor()
248 $rev1Meta = new JpegMeta(mediaFN($this->id, $rev1));
249 $rev2Meta = new JpegMeta(mediaFN($this->id, $rev2));
261 media_preview($this->id, $auth, $rev1, $rev1Meta); // $auth not used in media_preview()?
265 media_preview($this->id, $auth, $rev2, $rev2Meta);
271 media_preview_buttons($this->id, $auth, $rev1); // $auth used in media_preview_buttons()
275 media_preview_buttons($this->id, $auth, $rev2);
281 // FIXME rev2Tags-only stuff ignored
299 if (!$value) $value = '-';
303 if ($tag['tag'][2] == 'date') {