Calendar and CalendarList plugins return incorrect links array
Christof Meerwald <[email protected]> Wed, 9 Feb 2022 19:07:48 +0100
| Newsgroups | gmane.comp.web.wiki.phpwiki.talk |
|---|---|
| Message-ID | <[email protected]> |
--RYJh/3oyKhIjGcML
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
just noticed that both the Calendar and CalendarList plugins return
incorrect links array from "getWikiPageLinks".
Attached is a patch for this, although removing the whole
getWikiPageLinks from those plugins might be the better option (as the
comment says "static only as of action=edit") as it's not really
useful that way.
Christof
--
https://cmeerw.org sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org xmpp:cmeerw at cmeerw.org
--RYJh/3oyKhIjGcML
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="calendar.diff"
Index: lib/plugin/Calendar.php
===================================================================
--- lib/plugin/Calendar.php (revision 10988)
+++ lib/plugin/Calendar.php (working copy)
@@ -148,12 +148,12 @@
$mday = HTML::strong($mday);
$td->setAttr('class', 'cal-today');
} elseif ($dbi->isWikiPage($page_for_date)) {
- $this->_links[] = $page_for_date;
+ $this->_links[] = array('linkto' => $page_for_date);
$td->setAttr('class', 'cal-day');
}
if ($dbi->isWikiPage($page_for_date)) {
- $this->_links[] = $page_for_date;
+ $this->_links[] = array('linkto' => $page_for_date);
$date = HTML::a(array('class' => 'cal-day',
'href' => WikiURL($page_for_date),
'title' => $page_for_date),
Index: lib/plugin/CalendarList.php
===================================================================
--- lib/plugin/CalendarList.php (revision 10988)
+++ lib/plugin/CalendarList.php (working copy)
@@ -140,7 +140,7 @@
array('action' => 'edit')),
'title' => sprintf(_("Edit %s"), $page_for_date)),
$date_string);
- $this->_links[] = $page_for_date;
+ $this->_links[] = array('linkto' => $page_for_date);
$a = array(HTML::dt($link), HTML::dd($content));
} else {
$a = array();
--RYJh/3oyKhIjGcML
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--RYJh/3oyKhIjGcML
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Phpwiki-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpwiki-talk
--RYJh/3oyKhIjGcML--