From c5c7ebff04aef21ce8952e259b49c7448e0242bd Mon Sep 17 00:00:00 2001 From: Matthew Dawson Date: Wed, 1 Sep 2010 14:50:04 +0200 Subject: [PATCH 1/3] Improved the wiki links to have better descripting links. --- src/IDF/Template/Markdown.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/IDF/Template/Markdown.php b/src/IDF/Template/Markdown.php index feb8512..3054ca8 100644 --- a/src/IDF/Template/Markdown.php +++ b/src/IDF/Template/Markdown.php @@ -46,25 +46,32 @@ class IDF_Template_Markdown extends Pluf_Template_Tag array($this, 'callbackEmbeddedDoc'), $text); } + // Replace [Page]([[PageName]]) with corresponding link to the page, with link text being Page. + $text = preg_replace_callback('#\[([^\]]+)\]\(\[\[([A-Za-z0-9\-]+)\]\]\)#im', + array($this, 'callbackWikiPage'), + $text); // Replace [[PageName]] with corresponding link to the page. $text = preg_replace_callback('#\[\[([A-Za-z0-9\-]+)\]\]#im', - array($this, 'callbackWikiPage'), + array($this, 'callbackWikiPageNoName'), $text); $filter = new IDF_Template_MarkdownPrefilter(); echo $filter->go(Pluf_Text_MarkDown_parse($text)); } + function callbackWikiPageNoName($m) + { + $m[2] = $m[1]; //Set the link text to be the same as the page name. + return $this->callbackWikiPage($m); + } + function callbackWikiPage($m) { $sql = new Pluf_SQL('project=%s AND title=%s', - array($this->project->id, $m[1])); + array($this->project->id, $m[2])); $pages = Pluf::factory('IDF_WikiPage')->getList(array('filter'=>$sql->gen())); - if ($pages->count() != 1 and !$this->request->rights['hasWikiAccess']) { - return $m[0]; - } if ($pages->count() != 1 and $this->request->rights['hasWikiAccess'] and !$this->request->user->isAnonymous()) { - return ' '.$m[1].''; + return ' '.$m[1].''; } if (!$this->request->rights['hasWikiAccess'] or $pages->count() == 0) { return $m[1]; From b4f8cf8c50ef5f58e7271a0006f7c4ff56051190 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 1 Sep 2010 15:06:02 +0200 Subject: [PATCH 2/3] Corrected grammar in instructions. --- src/IDF/locale/cs/idf.po | 2 +- src/IDF/locale/de/idf.po | 2 +- src/IDF/locale/fr/idf.po | 2 +- src/IDF/locale/ru/idf.po | 2 +- src/IDF/locale/sl/idf.po | 2 +- src/IDF/templates/idf/review/create.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/IDF/locale/cs/idf.po b/src/IDF/locale/cs/idf.po index 8e9f055..28cead4 100644 --- a/src/IDF/locale/cs/idf.po +++ b/src/IDF/locale/cs/idf.po @@ -970,7 +970,7 @@ msgid "" "" msgstr "" diff --git a/src/IDF/locale/de/idf.po b/src/IDF/locale/de/idf.po index 0547f12..c558fad 100644 --- a/src/IDF/locale/de/idf.po +++ b/src/IDF/locale/de/idf.po @@ -970,7 +970,7 @@ msgid "" "" msgstr "" diff --git a/src/IDF/locale/fr/idf.po b/src/IDF/locale/fr/idf.po index 491fb6b..4be8ba9 100644 --- a/src/IDF/locale/fr/idf.po +++ b/src/IDF/locale/fr/idf.po @@ -1026,7 +1026,7 @@ msgid "" "" msgstr "" "

Pour démarrer une revue de code vous devez fournir :

\n" diff --git a/src/IDF/locale/ru/idf.po b/src/IDF/locale/ru/idf.po index 40de7a9..5d83baf 100644 --- a/src/IDF/locale/ru/idf.po +++ b/src/IDF/locale/ru/idf.po @@ -1019,7 +1019,7 @@ msgid "" "" msgstr "" diff --git a/src/IDF/locale/sl/idf.po b/src/IDF/locale/sl/idf.po index f826710..3d0fe69 100644 --- a/src/IDF/locale/sl/idf.po +++ b/src/IDF/locale/sl/idf.po @@ -997,7 +997,7 @@ msgid "" "" msgstr "" diff --git a/src/IDF/templates/idf/review/create.html b/src/IDF/templates/idf/review/create.html index 7275bbe..1a5a74e 100644 --- a/src/IDF/templates/idf/review/create.html +++ b/src/IDF/templates/idf/review/create.html @@ -57,7 +57,7 @@ {/blocktrans} {/block} From 132c4f6c89e7c56c72dce9f76b0350cad107719b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20d=27Anterroches?= Date: Wed, 1 Sep 2010 15:17:24 +0200 Subject: [PATCH 3/3] Fixed ticket 481, problem with registration link. --- INSTALL.mdtext | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/INSTALL.mdtext b/INSTALL.mdtext index 947323d..d0f6c01 100644 --- a/INSTALL.mdtext +++ b/INSTALL.mdtext @@ -212,4 +212,14 @@ If you access a Subversion server with a self-signed certificate, you may have problems as your certificate is not trusted, check the [procedure provided here][svnfix] to solve the problem. -[svnfix]: http://projects.ceondo.com/p/indefero/issues/319/#ic1358 \ No newline at end of file +[svnfix]: http://projects.ceondo.com/p/indefero/issues/319/#ic1358 + +## If the registration links are not working + +If You have standard instalaction of PHP ie in Debian, php.ini sets +mbstring.func_overload to value "2" for overloading str* +functions. You need to prevent the overload as it does not make sense +anyway (magic in the background is bad!). +See the [corresponding ticket][reglink]. + +[reglink]: http://projects.ceondo.com/p/indefero/issues/481/ \ No newline at end of file