Indefero

View 0002-Only-add-token-to-timeline-feed-URL-if-project-is-pr.patch

1From f2cd880074d90bff33ca62cf42ece1b569517fc6 Mon Sep 17 00:00:00 2001
2From: Ciaran Gultnieks <ciaran@ciarang.com>
3Date: Tue, 24 Mar 2009 21:23:31 +0000
4Subject: [PATCH] Only add token to timeline feed URL if project is private. Fixes issue #167.
5
6---
7 src/IDF/Views/Project.php | 5 +++--
8 1 files changed, 3 insertions(+), 2 deletions(-)
9
10diff --git a/src/IDF/Views/Project.php b/src/IDF/Views/Project.php
11index 6766161..ab26d56 100644
12--- a/src/IDF/Views/Project.php
13+++ b/src/IDF/Views/Project.php
14@@ -120,7 +120,8 @@ class IDF_Views_Project
15 $tags = IDF_Views_Wiki::getWikiTags($prj);
16 $pages = $tags[0]->get_idf_wikipage_list();
17 }
18- if (!$request->user->isAnonymous()) {
19+ // Generate feed URL. A token can only be required if the project is private
20+ if ($prj->private) {
21 $feedurl = Pluf_HTTP_URL_urlForView('idf_project_timeline_feed_auth',
22 array($prj->shortname,
23 IDF_Precondition::genFeedToken($prj, $request->user)));
24@@ -515,4 +516,4 @@ class IDF_Views_Project
25 ),
26 $request);
27 }
28-}
29\ No newline at end of file
30+}
31--
321.5.6.5
33
34

Archive Download this file

Attachment to issue 167

Created: 4 years 1 month ago by Ciaran Gultnieks