From 1f0791df0e766a84454672b7fd30a2babb6c765d Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Mon, 12 Sep 2011 17:54:40 +0200 Subject: [PATCH 1/2] Make the '@rev' part in the regex optional (fixes issue 730). --- NEWS.mdtext | 1 + src/IDF/Template/IssueComment.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.mdtext b/NEWS.mdtext index 4732038..882a660 100644 --- a/NEWS.mdtext +++ b/NEWS.mdtext @@ -31,6 +31,7 @@ or newer to properly run this version of Indefero! a new project or monotone key, in case an error popped up in the middle (issue 697) - Indefero now sends the MD5 checksum as HTTP header when downloading a file from the download area. Additionally, a unneeded redirect has been removed. (issue 716) +- Source links without a specific revision did not work due to a wrong regex (issue 730) - Better error detection and reporting in the SyncMonotone plugin ATTENTION: This needs Pluf 46b7f251 or newer! - Fix the branch links users of the Subversion frontend get when they enter a wrong revision diff --git a/src/IDF/Template/IssueComment.php b/src/IDF/Template/IssueComment.php index da7fe19..f2b8e84 100644 --- a/src/IDF/Template/IssueComment.php +++ b/src/IDF/Template/IssueComment.php @@ -58,7 +58,7 @@ class IDF_Template_IssueComment extends Pluf_Template_Tag implode('|', $nouns); $text = IDF_Template_safePregReplace('#((?:'.$prefix.')(?:\s+r?))([0-9a-f]{1,40}((?:\s+and|\s+or|,)\s+r?[0-9a-f]{1,40})*)\b#i', array($this, 'callbackCommits'), $text); - $text = IDF_Template_safePregReplace('=(src:)([^\s@#,\(\)\\\\]+(?:(\\\\)[\s@#][^\s@#,\(\)\\\\]+){0,})+(?:\@([^\s#,]+))(?:#(\d+))?=im', + $text = IDF_Template_safePregReplace('=(src:)([^\s@#,\(\)\\\\]+(?:(\\\\)[\s@#][^\s@#,\(\)\\\\]+){0,})+(?:\@([^\s#,]+))?(?:#(\d+))?=im', array($this, 'callbackSource'), $text); } if ($wordwrap) $text = Pluf_Text::wrapHtml($text, 69, "\n"); From 13fad756abfc0f29b1f47b9ed18bde66492f7a41 Mon Sep 17 00:00:00 2001 From: William MARTIN Date: Sat, 1 Oct 2011 22:43:00 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20issue=20732=20Commit=20based=20on=20S?= =?UTF-8?q?t=C3=A9phane=20Baron=20patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/IDF/Middleware.php | 1 + src/IDF/Template/Tag/UploadUrl.php | 35 ++++++++++++++++++++++++++ src/IDF/templates/idf/issues/view.html | 2 +- src/IDF/templates/idf/review/view.html | 2 +- src/IDF/templates/idf/user/public.html | 2 +- 5 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 src/IDF/Template/Tag/UploadUrl.php diff --git a/src/IDF/Middleware.php b/src/IDF/Middleware.php index 013929d..5e44abe 100644 --- a/src/IDF/Middleware.php +++ b/src/IDF/Middleware.php @@ -88,6 +88,7 @@ class IDF_Middleware 'showuser' => 'IDF_Template_ShowUser', 'ashowuser' => 'IDF_Template_AssignShowUser', 'appversion' => 'IDF_Template_AppVersion', + 'upload' => 'IDF_Template_Tag_UploadUrl', )); $params['modifiers'] = array_merge($params['modifiers'], array( diff --git a/src/IDF/Template/Tag/UploadUrl.php b/src/IDF/Template/Tag/UploadUrl.php new file mode 100644 index 0000000..a5461ff --- /dev/null +++ b/src/IDF/Template/Tag/UploadUrl.php @@ -0,0 +1,35 @@ + {if $submitter_data.avatar != ''} - + {else}  {/if} diff --git a/src/IDF/templates/idf/review/view.html b/src/IDF/templates/idf/review/view.html index 462a275..d655083 100644 --- a/src/IDF/templates/idf/review/view.html +++ b/src/IDF/templates/idf/review/view.html @@ -109,7 +109,7 @@ to propose more contributions. {foreach $comments as $c}{ashowuser 'submitter', $c.get_submitter(), $request}{assign $submitter = $c.get_submitter()}{assign $submitter_data = $c.get_submitter_data()}
{if $submitter_data.avatar != ''} -  +  {else}  {/if} diff --git a/src/IDF/templates/idf/user/public.html b/src/IDF/templates/idf/user/public.html index 2373a23..91ef8d4 100644 --- a/src/IDF/templates/idf/user/public.html +++ b/src/IDF/templates/idf/user/public.html @@ -3,7 +3,7 @@
{if $user_data.avatar != ''} -  +  {else}  {/if}