[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Calendar: Use SEFURL for event links in the calendar RSS feed

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6908cd4e2290c_2c3050e8056343@gitlab-sidekiq-low-urgency-cpu-bound-v2-7d7df8dcd9-d7thn.mail>

ushindi bienvenu pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
7fd1568b by MAGENE Sem Joel at 2025-11-03T15:33:38+00:00
[FIX] Calendar: Use SEFURL for event links in the calendar RSS feed
---
* [FIX] Calendar: Use SEFURL for event links in the calendar RSS feed

See merge request tikiwiki/tiki!8795

- - - - -


2 changed files:

- lib/smarty_tiki/Modifier/Sefurl.php
- tiki-calendars_rss.php


Changes:

=====================================
lib/smarty_tiki/Modifier/Sefurl.php
=====================================
@@ -56,7 +56,7 @@ class Sefurl
                 break;
 
             case 'calendaritem':
-                $href = "tiki-ajax_services.php?controller=calendar&action=view_item&calitemId=$source";
+                $href = $sefurl ? "tiki-calendar-view_item?calitemId=$source" : "tiki-ajax_services.php?controller=calendar&action=view_item&calitemId=$source";
                 break;
 
             case 'calendar event':


=====================================
tiki-calendars_rss.php
=====================================
@@ -5,6 +5,7 @@
 // All Rights Reserved. See copyright.txt for details and a complete list of authors.
 // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
 require_once('tiki-setup.php');
+require_once('tiki-sefurl.php');
 TikiLib::lib('header')->setXRobotsTag($robots);
 $rsslib = TikiLib::lib('rss');
 $calendarlib = TikiLib::lib('calendar');
@@ -45,7 +46,6 @@ if ($output["data"] == "EMPTY") {
     $descId = "body";
     $dateId = "start";
     $authorId = "user";
-    $readrepl = "tiki-ajax_services.php?controller=calendar&action=view_item&calitemId=%s";
 
     $rawcals = $calendarlib->list_calendars();
     $rawcals['data'] = Perms::filter([ 'type' => 'calendar' ], 'object', $rawcals['data'], [ 'object' => 'calendarId' ], 'view_calendar');
@@ -73,13 +73,14 @@ if ($output["data"] == "EMPTY") {
          $item["body"] .= "<abbr class=\"dtstart\" title=\"" . $start_d . "\">" . tra("Start:") . " " . smarty_modifier_tiki_long_datetime($item["start"]) . "</abbr>" . "<br />\n";
         $item["body"] .= "<abbr class=\"dtend\" title=\"" . $end_d . "\">" . tra("End:") . " " . smarty_modifier_tiki_long_datetime($item["end"]) . "</abbr>" . "<br />\n";
         $item["body"] .= "<span class=\"description\">" . ($item["description"]) . "</span>" . "</div>";
+        $item["sefurl"] = smarty_modifier_sefurl($item["calitemId"], 'calendaritem');
     }
     unset($item);
 
     $changes = ['data' => $items];
     unset($items);
 
-    $output = $rsslib->generate_feed($feed, $uniqueid, '', $changes, $readrepl, '', $id, $title, $titleId, $desc, $descId, $dateId, $authorId);
+    $output = $rsslib->generate_feed($feed, $uniqueid, '', $changes, '', '', $id, $title, $titleId, $desc, $descId, $dateId, $authorId);
 }
 header("Content-type: " . $output["content-type"]);
 print $output["data"];



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7fd1568be56691da1a4c0297c18a2f807d9841f8

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7fd1568be56691da1a4c0297c18a2f807d9841f8
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.