| 1 | From f2cd880074d90bff33ca62cf42ece1b569517fc6 Mon Sep 17 00:00:00 2001␊ |
| 2 | From: Ciaran Gultnieks <ciaran@ciarang.com>␊ |
| 3 | Date: Tue, 24 Mar 2009 21:23:31 +0000␊ |
| 4 | Subject: [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 | ␊ |
| 10 | diff --git a/src/IDF/Views/Project.php b/src/IDF/Views/Project.php␊ |
| 11 | index 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 | -- ␊ |
| 32 | 1.5.6.5␊ |
| 33 | ␊ |
| 34 |
