-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for odt export in datatable and datalist #169
base: master
Are you sure you want to change the base?
Changes from 4 commits
c72f6d0
3bcf52f
ad3b9a2
5cf7853
783d290
c888f35
37c355c
25f9fa9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,7 +220,7 @@ public function ensureAbsoluteId($id) { | |
* @param Doku_Renderer_xhtml $R | ||
* @return string | ||
*/ | ||
function _formatData($column, $value, Doku_Renderer_xhtml $R) { | ||
function _formatData($column, $value, Doku_Renderer $R) { | ||
global $conf; | ||
$vals = explode("\n", $value); | ||
$outs = array(); | ||
|
@@ -274,20 +274,16 @@ function _formatData($column, $value, Doku_Renderer_xhtml $R) { | |
case 'mail': | ||
list($id, $title) = explode(' ', $val, 2); | ||
$id = $this->_addPrePostFixes($column['type'], $id); | ||
$id = obfuscate(hsc($id)); | ||
if(!$title) { | ||
$title = $id; | ||
} else { | ||
$title = hsc($title); | ||
} | ||
if($conf['mailguard'] == 'visible') { | ||
$id = rawurlencode($id); | ||
} | ||
$outs[] = '<a href="mailto:' . $id . '" class="mail" title="' . $id . '">' . $title . '</a>'; | ||
$outs[] = $R->emaillink($id, $title, true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The _formatDataOld() has some rawurlencoding applied, which is applied to the content of the The old code reuses the encoded $id: if($conf['mailguard'] == 'visible') {
$id = rawurlencode($id);
}
$outs[] = '<a href="mailto:' . $id . '" class="mail" title="' . $id . '">' . $title . '</a>'; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ich kehre zur�ck am 10.08.2015. Ich werde Ihre Nachricht nach meiner R�ckkehr beantworten. Herzlichen Dank I will answer your message after returning. Hinweis: Dies ist eine automatische Antwort auf Ihre Nachricht "Re: Diese ist die einzige Benachrichtigung, die Sie empfangen werden, w�hrend |
||
break; | ||
case 'url': | ||
$val = $this->_addPrePostFixes($column['type'], $val); | ||
$outs[] = $this->external_link($val, false, 'urlextern'); | ||
$outs[] = $R->externallink($val, null, true); | ||
break; | ||
case 'tag': | ||
// per default use keyname as target page, but prefix on aliases | ||
|
@@ -297,9 +293,12 @@ function _formatData($column, $value, Doku_Renderer_xhtml $R) { | |
$target = $this->_addPrePostFixes($column['type'], ''); | ||
} | ||
|
||
$outs[] = '<a href="' . wl(str_replace('/', ':', cleanID($target)), $this->_getTagUrlparam($column, $val)) | ||
. '" title="' . sprintf($this->getLang('tagfilter'), hsc($val)) | ||
. '" class="wikilink1">' . hsc($val) . '</a>'; | ||
$params = buildURLparams($this->_getTagUrlparam($column, $val)); | ||
$url = str_replace('/', ':', cleanID($target)) . '?' . $params; | ||
// FIXME: The title is lost when moving to $R->internallink, | ||
// but this syntax is required to support different renderers. | ||
// $title = sprintf($this->getLang('tagfilter'), hsc($val)); | ||
$outs[] = $R->internallink($url, hsc($val), true); | ||
break; | ||
case 'timestamp': | ||
$outs[] = dformat($val); | ||
|
@@ -326,7 +325,7 @@ function _formatData($column, $value, Doku_Renderer_xhtml $R) { | |
} | ||
$instructions = array_slice($allinstructions, $wraps, -$wraps); | ||
|
||
$outs[] = p_render('xhtml', $instructions, $byref_ignore); | ||
$outs[] = p_render($R->getFormat(), $instructions, $byref_ignore); | ||
$ID = $oldid; | ||
break; | ||
default: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the type in the PHPDocs.
Can you add also PHPDocs for the functions where your add new arguments to the function?
(and just a suggestion: some IDEs can generate the PHPDocs for you (and perform many other inspections as well). For example you could have a look at https://www.dokuwiki.org/devel:intellij_idea )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I'll update that. You mean the functions in #1239? I tried to comment every changed function signature, did I miss some?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean in the files
helper.php
,syntax/list.php
etc.For example:
Doku_Renderer_xhtml
at line 220, can now be updated toDoku_Renderer
Further the before_val, before_item,after_...(), etc doesn't have PHPDocs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Note: this are inline comments, maybe in the Github view two discussions are mixed)